Unify and manage your data

Bulk Delete Relationships

Learn about using this API to delete relationships based on the specified URIs..

The Delete Entity Relations API deletes all relationships for the specified URIs.

Request

POST {TenantURL}/relations/deleteByUris?mode={mode}
Table 1. Parameters
ParametersName Required Description
HeadersAuthorizationYes Information about authentication access token in format "Bearer <accessToken>". For more information, see Authentication API.
QuerymodeNoDenotes the method in which the relations are removed, which can be one of the following:
  • soft: The relations are marked as deleted, but will remain in the database. This is used by default if you do not specify a mode.
  • hard: The relations are removed from the database.
BodyYesJSON object representing the delete relations list.

Sample Request and Response

POST {TenantURL}/relations/deleteByUris?mode=soft
Headers: Authorization: Bearer c3f28fdd-e082-4f90-8840-9896914eaf41
[
    "relations/0000KCz",
    "relations/0000OTF"
]
{
    "id": "f5a31183-427e-4cce-b03b-951b076c72f5",
    "groupId": "42b56ced-f0c0-43e8-9c21-af28c009d0da",
    "createdTime": 1687838581111,
    "createdBy": "pavel.gizatullin@reltio.com",
    "updatedTime": 1687838581111,
    "updatedBy": "john.smith@reltio.com",
    "type": "com.reltio.businesslogic.tasks.delete.DeleteRelationsTask",
    "status": "SCHEDULED",
    "name": "Soft Delete Relations",
    "createdOnHost": "rlt-l-pg01",
    "parallelExecution": false,
    "nodesGroup": "default",
    "parameters": {
        "tenantId": "LocalTenantNew",
        "mode": "soft",
        "relationUriList": "[\r\n    \"relations/0000KCz\",\r\n    \"relations/0000OTF\"\r\n]"
    },
    "currentState": {},
    "duration": "0s"
}

This API submits a task to perform the requested deletes. You can get information about this task by using the following request:

GET {TenantURL}/tasks/{taskId}
Headers: Authorization: Bearer c3f28fdd-e082-4f90-8840-9896914eaf41
Response

JSON Object representing information about the launched manual tasks that deleted al relations for the specified entity:

  • numberOfProcessedObjects - the number of relations that were deleted when the task was launched.
  • objectsFailedToDeleteCount - the number of relations that were not deleted.
  • objectsFailedToDelete - the IDs of the relations that were not deleted. This lists a maximum of 100 IDs.
  • name - The name of the manual task in the format <Hard/Soft> Delete Relations
  • started - The time when the task was launched.
  • throughput - The current speed of the task, which is the number of relations deleted per second.
  • tenant - The tenant where the task was launched.
  • current - The current time.

An example is given below:

{
    "id": "f5a31183-427e-4cce-b03b-951b076c72f5",
    "groupId": "42b56ced-f0c0-43e8-9c21-af28c009d0da",
    "createdTime": 1687838581111,
    "createdBy": "john.smith@reltio.com",
    "updatedTime": 1687838581111,
    "updatedBy": "john.smith@reltio.com",
    "type": "com.reltio.businesslogic.tasks.delete.DeleteRelationsTask",
    "status": "COMPLETED",
    "name": "Soft Delete Relations",
    "createdOnHost": "rlt-l-pg01",
    "executedOnHost": "rlt-l-pg01",
    "parallelExecution": false,
    "nodesGroup": "default",
    "startTime": 1687838581326,
    "endTime": 1687838590873,
    "parameters": {
        "tenantId": "LocalTenantNew",
        "mode": "soft",
        "relationUriList": "[\r\n    \"relations/0000KCz\",\r\n    \"relations/0000OTF\"\r\n]"
    },
    "currentState": {
        "objectsFailedToDelete": [],
        "deletedObjectsCount": 2,
        "objectsFailedToDeleteCount": 0,
        "numberOfFailedToPublishEvents": 0,
        "lastHourThroughput": 0.0,
        "numberOfProcessedObjects": 2,
        "status": "Completed"
    },
    "throughput": 0.22222222,
    "duration": "9s"
}