Get Relation Event Stats (Total, Types Facet)
This operation allows API user to get statistics for all relation events by different facets.
Request:
GET {TenantURL}/relations/_events/_total?facet={list_of_facets}&startTime={start_time}&endTime={end_time}
Parameter | Required | Details | |
---|---|---|---|
Headers |
Authorization
|
Yes | Information about authentication access token in format "Bearer
<accessToken> " (see details in Authentication API ). |
Query |
startTime
|
Yes | Start time from which event should be displayed. |
endTime
|
Yes | End time from which event should be displayed. | |
facet
|
Yes | Comma-separated list of facets to apply for search query.
Possible values are:
|
|
types
|
No | Comma-separated list of event types by which the events should be filtered. |
Response:
JSON Object with a total number of entity events per entity URI and facets.
Get Relation Event Stats Example
Request
GET {TenantURL}/relations/_events/_total?facet=type,year&startTime=04-14-2013&endTime=04-15-2013
Headers: Authorization: Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512
Response
GET{
TenantURL
}/relations/_events/_total?facet=type,
year&startTime=04-14-2013&endTime=04-15-2013
Headers:Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512{
"total":20152,
"facets":{
"type":[
{
"term":"UPDATED",
"count":1046
},
{
"term":"CREATED",
"count":19106
}
],
"year":[
{
"term":"2013",
"count":20152
}
]
}
}