How to get the comments of a data change request through the API?

Question

We read data change requests (DCRs: suggested changes that wait for review) with GET https://<environment>.reltio.com/reltio/api/<tenantId>/changeRequests/<changeRequestId>. The response has the DCR's state and changes, but not the comments that reviewers added. How do we get the comments?

Answer

The Data Change Request API doesn't return comments. Comments that reviewers add when they approve, reject, or reassign a DCR belong to the DCR's review workflow process, so you read them with the Workflow API. All Workflow API requests go to your workflow service URL ({workflowPath}) and need an EnvironmentURL header with your Reltio environment URL, for example https://<environment>.reltio.com.

Get the comments in one call

Retrieve the DCR's review tasks by filtering on the change request URI. Each task in the response includes processInstanceId and processInstanceComments, the comments of the whole review process, each with message, author, and time:

POST {workflowPath}/workflow/<tenantId>/tasks/history
Authorization: Bearer <access_token>
EnvironmentURL: https://<environment>.reltio.com
Content-Type: application/json

{ "objectURIs": ["changeRequests/<changeRequestId>"], "processTypes": ["dataChangeRequestReview"] }

This returns both open and completed tasks. You only get a task if you had READ access to its objects when the task was created. If no task is returned, filter on the URI of the entity that the DCR changes instead, and use the task whose objectURIs include the change request.

Get the comments of a known process instance

If you already have the processInstanceId, for example from the response above or from POST {workflowPath}/workflow/<tenantId>/processInstances/_search with the same objectURIs, read its comments directly:

GET {workflowPath}/workflow/<tenantId>/processInstances/<processInstanceId>/_comment
Authorization: Bearer <access_token>
EnvironmentURL: https://<environment>.reltio.com

Comments that users add on profile attributes in the Reltio UI are a different feature, collaboration comments, and aren't returned by these requests.

 

 

Was this article helpful?
1 out of 1 found this helpful

Comments

0 comments

Please sign in to leave a comment.