Unify and manage your data

Delete Entity Relations

Learn about using this API to delete all relationships for an entity.

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

Request

POST {TenantURL}/entities/{id}/deleteRelations?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.

Sample Request and Response

POST {TenantURL}/entities/{id}/deleteRelations
Headers: Authorization: Bearer c3f28fdd-e082-4f90-8840-9896914eaf41
{
    "id": "b26b8206-60f9-4177-a95e-5d43996c96c0",
    "groupId": "09e29bd8-992b-479e-89f9-4efc371ed23f",
    "createdTime": 1687834302378,
    "createdBy": "john.smith@reltio.com",
    "updatedTime": 1687834302378,
    "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",
        "entityUriList": "[\"entities/0000AcP\"]"
    },
    "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": "b26b8206-60f9-4177-a95e-5d43996c96c0",
    "groupId": "09e29bd8-992b-479e-89f9-4efc371ed23f",
    "createdTime": 1687834302378,
    "createdBy": "john.smith@reltio.com",
    "updatedTime": 1687834302378,
    "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": 1687834302744,
    "endTime": 1687834304271,
    "parameters": {
        "tenantId": "LocalTenantNew",
        "mode": "soft",
        "entityUriList": "[\"entities/0000AcP\"]"
    },
    "currentState": {
        "objectsFailedToDelete": [],
        "deletedObjectsCount": 3,
        "objectsFailedToDeleteCount": 0,
        "numberOfFailedToPublishEvents": 0,
        "lastHourThroughput": 0.0,
        "numberOfProcessedObjects": 3,
        "status": "Completed"
    },
    "throughput": 3.0,
    "duration": "1s"
}