curl --request POST \
--url https://api.example.com/api/events/count-by/{countable} \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"occurred": {
"since": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
},
"event": {
"prefix": [
"<string>"
],
"exclude_prefix": [
"<string>"
],
"name": [
"<string>"
],
"exclude_name": [
"<string>"
]
},
"resource": {
"id": [
"<string>"
],
"id_prefix": [
"<string>"
],
"labels": {},
"distinct": false
},
"related": {
"id": [
"<string>"
],
"role": [
"<string>"
],
"resources_in_roles": [
"<array>"
],
"labels": {}
},
"any_resource": {
"id": [
"<string>"
],
"id_prefix": [
"<string>"
],
"labels": {}
},
"id": {
"id": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"text": {
"query": "<string>"
},
"order": "DESC"
},
"time_unit": "day",
"time_interval": 1
}
'[
{
"value": "<string>",
"label": "<string>",
"count": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
]Returns distinct objects and the count of events associated with them. Objects that can be counted include the day the event occurred, the type of event, or the IDs of the resources associated with the event.
curl --request POST \
--url https://api.example.com/api/events/count-by/{countable} \
--header 'Content-Type: application/json' \
--data '
{
"filter": {
"occurred": {
"since": "2023-11-07T05:31:56Z",
"until": "2023-11-07T05:31:56Z"
},
"event": {
"prefix": [
"<string>"
],
"exclude_prefix": [
"<string>"
],
"name": [
"<string>"
],
"exclude_name": [
"<string>"
]
},
"resource": {
"id": [
"<string>"
],
"id_prefix": [
"<string>"
],
"labels": {},
"distinct": false
},
"related": {
"id": [
"<string>"
],
"role": [
"<string>"
],
"resources_in_roles": [
"<array>"
],
"labels": {}
},
"any_resource": {
"id": [
"<string>"
],
"id_prefix": [
"<string>"
],
"labels": {}
},
"id": {
"id": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
},
"text": {
"query": "<string>"
},
"order": "DESC"
},
"time_unit": "day",
"time_interval": 1
}
'[
{
"value": "<string>",
"label": "<string>",
"count": 123,
"start_time": "2023-11-07T05:31:56Z",
"end_time": "2023-11-07T05:31:56Z"
}
]day, time, event, resource Show child attributes
Filter criteria for the event name
Show child attributes
Only include events matching one of these prefixes
Exclude events matching one of these prefixes
Only include events matching one of these names exactly
Exclude events matching one of these names exactly
Filter criteria for the resource of the event
Show child attributes
Only include events for resources with these IDs
Only include events for resources with IDs starting with these prefixes.
Only include events for distinct resources
Filter criteria for the related resources of the event
Show child attributes
Only include events for related resources with these IDs
Only include events for related resources in these roles
Only include events with specific related resources in specific roles
2 elementsFilter criteria for any resource involved in the event
Show child attributes
Only include events for resources with these IDs
Only include events for resources with IDs starting with these prefixes
The order to return filtered events
ASC, DESC week, day, hour, minute, second x >= 0.01Successful Response
Was this page helpful?