Get a list of alarms using parameters
This API allows retrieving a list of alarms using parameters.
Request
GET /api/v2/alarms?clientID={clientID}&facilityID={facilityID}&deviceID={deviceID}&endpointID={deviceID}&maxCount={maxCount} HTTP/1.1
Host: gear.cloud.studio
Authorization: Bearer {accessToken}Parameters
| Name | Description |
|---|---|
| accessToken | Access token with permissions to read alarm information. See this page for more information. The access token can also be sent as part of the query string, using the "accessToken" parameter. |
| clientID | Optional identifier indicating that only alarms for the given client should be retrieved. |
| facilityID | Optional identifier indicating that only alarms for the given facility should be retrieved. |
| deviceID | Optional identifier indicating that only alarms for the given device should be retrieved. |
| dateFrom | Date from which alarms for the given device should be retrieved. |
| dateTo | Date until which alarms for the given device should be retrieved. |
| endpointID | Optional identifier indicating that only alerts for the given endpoint should be retrieved. |
| state | Alarm state identifier. Possible values are "open", "closed", and "all". |
| maxCount | Optional parameter indicating the maximum number of records to include in the result. Values greater than 500 are limited to 500 regardless of the value sent in the request. |
| It is mandatory to include one (and only one) of the parameters "clientID", "facilityID", "deviceID", or "endpointID". |
|---|
Response
The response contains the list of matching alarms, as shown in this example:
[
{
"AlarmID":1266896,
"DeviceID":7370,
"DeviceDescription":"Controlador RUPANCO",
"EndpointID":0,
"AlarmTypeID":1,
"AlarmTypeDescription":"Dispositivo fuera de línea",
"AlarmSeverityID":3,
"AlarmSeverityDescription":"Alta",
"Details":"",
"DateTimeCreated_UTC":"2021-10-15T17:34:35",
"DateTimeClosed_UTC":"2021-10-15T18:21:39",
"SequenceNumber":28885207,
"MTTRMinutes":47.0
},
{
"AlarmID":1266922,
"DeviceID":7370,
"DeviceDescription":"Controlador RUPANCO",
"EndpointID":0,
"AlarmTypeID":1,
"AlarmTypeDescription":"Dispositivo fuera de línea",
"AlarmSeverityID":3,
"AlarmSeverityDescription":"Alta",
"Details":"",
"DateTimeCreated_UTC":"2021-10-15T19:36:41",
"DateTimeClosed_UTC":"2021-10-15T19:37:23",
"SequenceNumber":28885384,
"MTTRMinutes":47.0
}
]