Endpoint: GET /v1/alarm-status/{nodeId}
Calling this endpoint requires that the client user has the POINT_ALARM_STATUS::GET_ALARM_STATUS action for the given nodeId.
Here is an example of a successful response, which includes an inspection alarm and an external alarm.
{
"nodeId": "123e4567-e89b-12d3-a456-426614174000",
"updatedAt": 1633939101250,
"status": 3,
"inspectionAlarm":
{
"status": 2,
"triggeringMeasurement": "123e4567-e89b-12d3-a456-426614174000"
},
"externalAlarm":
{
"status": 3,
"setBy": "123e4567-e89b-12d3-a456-426614174000"
}
}
Errors include a response body as described here.
Endpoint: PUT /v1/alarm-status/{nodeId}
Calling this endpoint requires that the client user has the POINT_ALARM_STATUS::UPDATE_ALARM_STATUS action for the given nodeId.
If the request body is empty, the alarm status updates based on the current alarm threshold and the latest measurement. Else, the alarm status will be updated based on the data in the request body.
An empty request body is accepted.
Example request body with data:
{
"nodeId": "123e4567-e89b-12d3-a456-426614174000",
"measurementId": "123e4567-e89b-12d3-a456-426614174000",
"createdAt": "2021-09-10T11:52:38.299Z",
"contentType": "DATA_POINT",
"dataPoint":
{
"coordinate":
{
"x": 1615280620000,
"y": 3.14159
},
"xUnit": "ms",
"yUnit": "gE"
}
}
This endpoint does not return any response body on success.
Errors include a response body as described here.
Endpoint: PUT /v1/alarm-status/{nodeId}/status/external
This endpoint is used to set the “external” part of an alarm to the provided status. The setBy field is optional.
Calling this endpoint requires that the client user has the POINT_ALARM_STATUS::SET_EXTERNAL_ALARM_STATUS action for the given nodeId.
{
"status": 4,
"setBy": "123e4567-e89b-12d3-a456-426614174000"
}
This endpoint does not return any response body on success.
Errors include a response body as described here.