How can I perform cumulative entity updates via API?
In the Entities API there is an option to do a Cumulative Entity Update:
This 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.
All changes, except "DELETE_ATTRIBUTE", must have "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.
Please sign in to leave a comment.