countSiteAlarms
GET https://{{host}}/api/v1/sites/:site_id/alarms/count
Response Parameters
Parameter | Type | Description |
---|---|---|
results | list | List of result objects |
string | A field based on which alarms are grouped & counted | |
count | int | Number of alarms grouped by distinct parameter value |
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
type | null | string, Key-name of the alarms; accepts multiple values separated by comma | |
ack_admin_name | null | string, Name of the admins who have acked the alarms; accepts multiple values separated by comma | |
acked | null | boolean | |
group | null | string, Alarm group name; accepts multiple values separated by comma | |
severity | null | string, Alarm severity; accepts multiple values separated by comma | |
distinct | null | string, Group by and count the alarms by some distinct field (e.g. type, group, severity etc.); default=type |
RESPONSES
status: OK
{"results":[{"type":"switch_restarted","count":2},{"type":"device_down","count":1},{"type":"device_restarted","count":1}],"start":1625477727.0,"end":1625566540.9141023,"limit":10,"distinct":"group","total":1,"percentage":100}