Question
How can I perform cumulative entity updates via API?
Answer
In the Entities API there is an option to do a Cumulative Entity Update:
POST {Tenant_URL}/{Object_URI}/_updateThis endpoint allows users to make multiple changes to entity attributes.
AddAttribute operation adds a new attribute value to an entity. For every source type listed in sourceTypes: if the entity has crosswalks from a "winner" entity, the value is bound to all such "winner" crosswalks and "loser" crosswalks are ignored; if the entity has only crosswalks from a "loser" entity, the value is bound to all "loser" crosswalks; if there are no crosswalks for a listed source type, a new crosswalk will be created.
UpdateAttribute operation updates existing attribute values. If all source types which a value is bound to are listed in sourceTypes, the value is updated and the value URI is preserved; if the value is bound to one or more crosswalks whose source types are not listed in sourceTypes, a new value with a new URI is added and is bound to all crosswalks listed in sourceTypes, and the old value preserves its URI and is bound to all crosswalks not listed in sourceTypes. If there are one or more source types in sourceTypes which the old value isn't bound to, the updated value (or the new value) is bound to an existing or new (if there are no existing) crosswalks of such source types.
DeleteAttribute operation affects all attribute values which pass valueFilter and has corresponding attributeURI . Values with crosswalk source types listed in sourceTypes are deleted. Values with other crosswalks are ignored.
- INSERT_ATTRIBUTE
- UPDATE_ATTRIBUTE
- DELETE_ATTRIBUTE
- PIN_ATTRIBUTE
- IGNORE_ATTRIBUTE
- UPDATE_TAGS
- UPDATE_ROLES
- UPDATE_START_DATE
- UPDATE_END_DATE
All changes, except "DELETE_ATTRIBUTE", must have the "newValue" property - new value of an attribute, tags, or roles.
"INSERT_ATTRIBUTE", "UPDATE_ATTRIBUTE", "DELETE_ATTRIBUTE", "PIN_ATTRIBUTE", "IGNORE_ATTRIBUTE" changes must have "URI" property - URI of attribute.
"INSERT_ATTRIBUTE", "UPDATE_ATTRIBUTE", "DELETE_ATTRIBUTE" changes must have "crosswalk" property - crosswalk for which this attribute should be updated.
Please refer to the documentation below for information on parameters, responses, and examples.
Related Documentation:
Our Doc Links can change over time, so please search for the Documentation based on the titles shared below. Thank you.
- Cumulative Entity Update
Comments
Please sign in to leave a comment.