Entity History
Learn about the api to retrieve entity history.
This request is used to retrieve timestamps (UTC) reflecting when an entity was modified, the user who made the changes, and the type of change.
Request
GET {TenantURL} /entities/{entity object URI}/_changes
Parameter | Required | Description | ||
---|---|---|---|---|
Headers | Authorization
| Yes | Information about authentication access token in format "Bearer <accessToken> " (see details in Authentication API). | |
Query | max
| No | Positive Integer value to identify maximum number of entities to return in a response. Can be used to organize pagination in combination with "offset" parameter. Default value is 50 . This has a hard limit of 1000 records. | max=10 |
offset
| No | Positive Integer value to identify starting what element in a result set should be returned in a response. Can be used to organize pagination in combination with "max" parameter. Default value is 0 . | offset=120 | |
order
| No | Order of sorting. Can be used in combination with "sort" parameter to have reverse order. Possible values:
desc . | order=desc | |
filter
| No | Enables entities filtering by a condition. Format for filter query parameter: filter=({Condition Type}[AND/OR {Condition Type}]*) There are tree Condition Types:
The For more information see Filtering Entities |
Filter historical events with changes of FirstName attributes, made by 'test.uset'
Filter historical events with timestamp less than specified value.
Filter all '
| |
showAll
| No | Specifies if the response should contain all historical events, despite any real changes on attributes. Filter is ignored if showAll is set to true . Default value is false . | showAll=true | |
showMajorEventsonly | No | Indicates whether the response must contain only major events. When enabled, only the 1000 most recent major events are returned. If disabled, all events are retrieved up to a limit of 1000 Following events are considered major events: ENTITY_CREATED ENTITIES_SPLITTED ENTITIES_MERGED_ON_THE_FLY ENTITIES_MERGED ENTITIES_MERGED_MANUALLY | showMajorEventsonly=true | |
options | No | Comma-separated list of different options which affect JSON content in the response. Available options:
| options=skipReferenceAttributesProcessing |
We recommend you use these methods to reduce the response time for a request:
- Use the
skipReferenceAttributesProcessing
option to significantly reduce response time, even when there are no reference attributes. - If there is no
changes
filter, useshowAll=true
to also reduce response time.
showMajorEventsOnly
parameter is set to true. . Pagination won't work beyond this limit. Response
JSON array with timestamps when an entity was modified.
Request
GET {TenantURL}/entities/11/_changes?filter=
changes(configuration/entityTypes/HCP/attributes/FirstName)
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Response
GET {TenantURL}/entities/11/_changes?order=asc
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
[{
"timestamp": 1428308955399,
"user": "test.user",
"type": "ENTITY_CREATED"
}, {
"timestamp": 1428309071535,
"user": "test.user",
"type": "ENTITY_CHANGED"
}]