Unify and manage your data

Data Cleanse Task (Asynchronous)

Learn about the API operation to cleanse persisted entity data in the tenant.

Use this API operation to start an asynchronous background task that cleanses the persisted entity data in the tenant. This task does not capture any entity information but acts only on the stored data. Note that this task supports the Pause and Stop functionalities.

No events are generated, and entities are not updated if the cleanse task detects no changes in the cleansed entity's data during execution. However, if the justCalculateHashes flag is set, entities are updated, and events are generated. This behavior also applies to cleansing entities that previously failed.

Requests

POST {ApplicationURL}/api/{tenantId}/cleanse
Note: Tenant admin role is required.
Table 1. Parameters:
Parameter Required Description
tenantId Yes This is the ID of the tenant to cleanse the entities.
entityType No This is the entity type to be checked (all entity types are checked if this parameter is absent). If provided, restricts cleansing to a specific entity type.
skipEntitiesCount No This indicates the number of entities, which are skipped during data cleansing. The default value is 0.
updatedSince No This is the timestamp in UNIX format. If this parameter is specified, only entities with greater or equal timestamp are cleansed.
failedOnlyNo

If set to true, the recleanse task processes only entities that weren't cleansed successfully. This includes entities where the cleanseInputsHashes field is absent for the cleanse-crosswalk (for example, ReltioCleanser).

If set to false, the task processes all entities regardless of their previous cleanse status. The default value is false.

justCalculateHashes No If set to true, the re-cleanse task recalculates only the cleanseInputsHashes fields of ReltioCleanser crosswalks for already cleansed entities. The default value is false.
distributedNoIf this parameter is set to true, the task is run in distributed mode. The default value is false.
distributedTaskIndexNoThis indicates the cleanse task index. The default value is false.
taskPartsCount No

This indicates the number of tasks that are created for distributed cleansing. Each task cleanses its own objects and all of them may be executed on different API nodes in parallel.

Recommended value: Count of API nodes that can execute the tasks.

Default value: 2

Note: This parameter is used only in distributed mode when distributed=true otherwise, it is ignored.
forceCleansingNoBy default, the value is false, which indicates that entity data is cleansing only if there is a change in the data or cleanse configuration. If the value is true, the entity data is force-cleansed in spite of any change in the data or cleanse configuration.

Body (optional):

The body consists of a JSON Array of entity URIs to cleanse (Entity URIs separated by comma (,)). Only these entities are cleansed in this task.

["entities/2Dt0KKX", "entities/0jA3Q5A"]

Response

[
  {
    "id": "df60ee13-6db1-4e07-a6dd-439cf56bf05a",
    "groupId": "0d8fdb67-cb73-4fd1-87a8-e10b36717a43",
    "createdTime": 1603177884880,
    "createdBy": "john.doe@abc.com",
    "updatedTime": 1603177884880,
    "updatedBy": "john.doe@abc.com",
    "type": "com.reltio.businesslogic.tasks.cleanse.ReCleanseDataTask",
    "status": "SCHEDULED",
    "name": "Re-cleansing of configuration/entityTypes/Organization in tenant test background task. (started by john.doe@abc.com)",
    "createdOnHost": "dataload-7d75b9655c-z9cf2",
    "parallelExecution": false,
    "nodesGroup": "default",
    "parameters": {
      "tenantId": "test",
      "entityType": "Organization",
      "skipEntitiesCount": "0",
      "updatedSince": "0",
      "uriList": "[\"entities/2Dt0KKX\", \"entities/0jA3Q5A\"]",
      "failedOnly": "false",
      "forceCleansing": "false",
      "justCalculateHashes": "false"
    },
    "currentState": {},
    "duration": "0s"
  }
]

Recleanse entire tenant

Call the API operation with forceCleansing=true, for example:
POST https://test.reltio.com/reltio/api/12345jHspM0osuG/cleanse?forceCleansing=true

Recleanse seveal entities

Call the API operation with forceCleansing=true and specify the entities in the body, for example:
POST https://test.reltio.com/reltio/api/12345jHspM0osuG/cleanse?forceCleansing=true
Body: 
["entities/<entity-1>",
"entities/<entity-2>"]

Recleanse by entity type

Call the API operation with forceCleansing=true and entityType, for example:
POST https://test.reltio.com/reltio/api/12345jHspM0osuG/cleanse?forceCleansing=true&entityType=Location