Updating Entity Attributes

Entity attribute values can change based on the values in the Update Date property and update Attribute Update Dates On Actual Changes flag.

The value of the updateAttributeUpdateDatesOnActualChanges flag is only considered when the POST {{api_uri}}/{{tenant}}/entities request does not contain the updateDate property.

The updateDate value of the entity and singleAttributesUpdateDates values of the entity attributes work together as described below.

Scenario 1: With Update Date

When the updateDate is available in the request query and updateAttributeUpdateDatesOnActualChanges flag is set to either true or false in the request body, the following sub-scenarios are possible:

Table 1. Entity's update date is available in the request
Number Sub-scenario 'updateDate' and 'singleAttributesUpdateDates' values
1 If no entity attributes are changed in the request body. The updateDate value in the response and singleAttributeUpdateDates values of the attributes do not change.
2 If one or more entity attributes are changed and the other attributes are not available in the request body.
  • When the partialOverride option is used in the request query, the values of updateDate and singleAttributeUpdateDates attributes do not change in the response.
  • When both the partialOverride and updateAttributeUpdateDates options are used in the request query:
    • If the updateDate specified in the request is earlier than the current updateDate , then the values of updateDate and singleAttributeUpdateDates attributes do not change in the response.
    • If the updateDate specified in the request is later than or the same as the current updateDate value, then the updateDate value does not change in the response but singleAttributeUpdateDates values for all attributes specified in the request body change to the updateDate value specified in the request.
3 If one or more entity attributes are changed and all attributes are available in the request body.
  • The updateDate value in the response will be the same as the updateDate value in the request query.
  • Value of singleAttributeUpdateDates will be set to empty for all changed entity attributes and attributes that have a singleAttributeUpdateDates value earlier than the updateDate specified in the request.
  • The singleAttributesUpdateDates values do not change for the other attributes.
4 If one or more entity attributes are changed and one or more attributes are not available in the request body.
  • The updateDate value in the response will be the same as the updateDate value in the request query.
  • If the new updateDate is later than or the same as the current updateDate, then the singleAttributeUpdateDates value of the changed attributes is the same as the updateDate specified in the request.
  • If the updateDate value in the request query is earlier than the current updateDate, then the singleAttributeUpdateDates value is set to empty for changed entity attributes.
  • The singleAttributesUpdateDates values do not change for the other attributes.

Scenario 2: Without Update Date

When the UpdateDate is not available in the request query and updateAttributeUpdateDatesOnActualChanges flag is set to either true or false in the request body, the following sub-scenarios are possible:

Table 2. Entity's update date is not available in the request
Number Sub-scenario 'updateDate' and 'singleAttributesUpdateDates' values
1 If no entity attributes are changed in the request body. The updateDate value in the response and singleAttributeUpdateDates values of the attributes do not change.
2 If one or more entity attributes are changed and the other attributes are not available in the request body. The updateDate value in the response and singleAttributeUpdateDates values of the attributes do not change.
3 If one or more entity attributes are changed and all attributes are available in the request body.
  • When the partialOverride option is used in the request query:
    • the updateDate value in the response does not change.
    • the singleAttributeUpdateDates value is set to empty for changed entity attributes.
    • The singleAttributesUpdateDates values do not change for the other attributes.
  • When the partialOverride or updateAttributeUpdateDates options are both used in the request query:
    • If the updateAttributeUpdateDatesOnActualChanges flag is set to false in the request body, then the updateDate value in the response does not change and the singleAttributeUpdateDates values of all attributes change to the current date (the date on which the request was sent).
    • If the updateAttributeUpdateDatesOnActualChanges flag is set to true in the request body, then the updateDate value in the response does not change and the singleAttributeUpdateDates values of only the changed attributes change to the current date.
4 If one or more entity attributes are changed and the other attributes are not available in the request body.
  • The updateDate value in the response does not change.
  • The singleAttributeUpdateDates values of all attributes present in the request change to the current date.
  • The singleAttributesUpdateDates values do not change for the other attributes.