Unify and manage your data

Cumulative Relations Update

You can make multiple changes to an entity's relation attribute at the same time using a cumulative update request.

The following request allows you to do a cumulative relations update:

Request

POST {TenantURL}/{objectURI}/_update
Table 1. Parameters
Parameter Required Details
Headers Authorization Yes Information about the authentication access token must be in the following format "Bearer <accessToken>". For more information, see Authentication API.
Query changeRequestId No If this parameter is present, all changes will be added to the DCR with a given ID instead of updating the relation.
alwaysCreateDCR No If true, create a DCR without updating a relation.

Example:

POST {{api_uri}}/{{tenant}}/relations/{{relation_id}}/_update?alwaysCreateDCR=true
[
  {
    "type": "UPDATE_ATTRIBUTE",
    "uri": "relations/{{relationID}}/attributes/FirstName/{{FirstNameID}}",
    "newValue": {
      "value": "Updated"
    },
    "crosswalk": {
      "type": "configuration/sources/Reltio",
      "value": "{{relationID}}"
    }
  },
  {
    "type": "DELETE_ATTRIBUTE",
    "uri": "relations/{{relationID}}/attributes/LastName/{{LastNameID}}",
    "crosswalk": {
      "type": "configuration/sources/Reltio",
      "value": "{{relationID}}"
    }
  },
  {
    "type": "IGNORE_ATTRIBUTE",
    "uri": "relations/{{relationID}}/attributes/MiddleName/{{MiddleNameID}}",
    "newValue": {
      "value": true
    }
  },
  {
    "type": "INSERT_ATTRIBUTE",
    "uri": "relations/{{relationID}}/attributes/Int",
    "newValue": [
      {
        "value": "55"
      }
    ]
  }
]
overwriteDefaultCrosswalkValue No If set to false, the process of normalization of Reltio crosswalk is skipped. Default is true.
Body Request definition Yes Array of JSON objects, where each object represents changing of an attribute, tags, or roles. Each object must have a type property, which is the type of change.

The following types of changes can be done for a relation:

  • Insert an attribute
  • Update an attribute
  • Delete an attribute
  • Pin an attribute
  • Ignore an attribute
  • Create a relationship
  • Delete a relationship
  • Update tags
  • Update the start date
  • Update the end date
Consider the following:
  • All changes, except the delete an attribute change must have a newValue property, which is the new value of attributes, tags, or roles.
  • The Insert an attribute, Update an attribute, Delete an attribute, Pin an attribute, and Ignore an attribute changes must have the uri property,which is the URI of the attribute.
  • The Insert an attribute, Update an attribute, and Delete an attribute changes must have the crosswalk property, which is the crosswalk for which this attribute should be updated.

Sample Request

[
   {
      "type":"INSERT_ATTRIBUTE",
      "uri":"relations/{relationId}/attributes/Language/{languageId}/DMDMApproval",
      "newValue":[
         {
            "value":"Approved"
         }
      ]
   }
]

Response

The response contains the changed relation or data change request, if changeRequestId is defined or if you do not have access to update the object, but you have permission to initiate a data change request.

Note: If the cumulative update request contains a crosswalk of an existing entity that does not belong to the entity being updated, such a request is rejected, and the following error message is returned: Cumulative update request should not contain crosswalk of already existing entity.