Unify and manage your data

Delete Entity Relations

Learn more about how to use this API to delete all relationships for a specified entity.

Use the Delete Entity Relations to delete all relationships for the specified Entity ID.

The Delete Entity Relations submits a task to perform the requested deletes.

HTTP method and endpoint

Use the following HTTP method and endpoint path to submit the request to delete all relationships for the specified entity.

POST {TenantURL}/entities/{id}/deleteRelations?mode={mode}

The following table describes the endpoint path parameters.

ParameterTypeRequiredDescription
idStringYesThe unique identifier of the entity whose relationships you want to delete.

Query parameters

The following table describes the query parameters and their values. A query parameter is a key-value pair added to the end of a URL to modify or refine a request.

ParameterTypeRequiredDescriptionAccepted values / Default
modeStringNoDenotes the method used to remove relations.soft or hard. soft marks the relations as deleted, but keeps them in the database. hard removes the relations from the database. Default: soft.

Request headers

The following request headers must be included.

HeaderValueRequired
AuthorizationBearer <accessToken>Yes

For more information, see Authentication API.

Request body

This operation does not require a request body.

Example request

Use the following example to see how a complete request is structured with headers.

POST {TenantURL}/entities/{id}/deleteRelations
Headers: Authorization: Bearer {your-access-token}

Response body

The following table describes the fields returned in the response body.

ParameterTypeDescription
idStringUnique identifier of the launched task.
groupIdStringIdentifier of the task group.
createdTimeNumberTimestamp when the task was created.
createdByStringUser who created the task.
updatedTimeNumberTimestamp when the task was last updated.
updatedByStringUser who last updated the task.
typeStringInternal type of the launched task.
statusStringStatus of the launched task.
nameStringName of the launched task.
createdOnHostStringHost on which the task was created.
parallelExecutionBooleanIndicates whether the task runs in parallel execution mode.
nodesGroupStringNode group where the task runs.
parametersObjectTask parameters, including tenant, mode, and entity URI list.
currentStateObjectCurrent state of the task.
durationStringElapsed task duration.

Example response

The following example shows a response with the launched delete task details.

{
    "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"
}

Check task status

Use the following request to get information about this task:

GET {TenantURL}/tasks/{taskId}
Headers: Authorization: Bearer {your-access-token}

The response is a JSON object that represents information about the launched manual task that deleted all 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 list contains 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.

The following example shows the task response:

{
    "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"
}