Alarm - Alarm History
The Admin interface handles web service calls from the Admin web gui. The base url for this is at:
/api/alarm-center-admin
A JSON file with OpenAPI data about all business-related admin APIs can be downloaded here
.
The Alarm History APIs handles those alarm that were marked as handled or has remained active for a time range specified in the
configuration variable DAYS_FOR_ALARMS_TO_HISTORY
, and will be removed after a time range specified
in the variable DAYS_FOR_ALARMS_HISTORY_DELETE
Get historicized alarm
Gets details about a specific alarm:
- GET /v1/alarm-history/{alarmId}
Get a single alarm
- Parameters
alarmId (integer) –
- Status Codes
200 OK – Success
Returns a plain Json negative message if there was a problem retrieving the detail or a Json positive response with the requested details:
{
ID: 1234, // Int
Guid: '777ded6e-34f7-4af9-88de-bb3b1ae06878', // Guid
CreatedDate: '2020-01-01 01:30:00', // Date
LastUpdated: '2020-01-01 01:30:00', // Date
LastUpdatedBy: 'Operator name', // String (nullable)
CommunityGuid: '3f1e45f7-a43c-499e-add4-44b64b364ebf', // Guid
Community: 'Community name', // String
CommunityID: 567, // Int
Type: 0, // Int
Priority: 0, // Int
InvolvedEntityGuid: '64aa9b62-461d-4b51-9438-6d8434a6f467', // String
InvolvedEntityType: 'Vehicle', // String
InvolvedEntityIdentifier: 'AA 123 BB', // String (nullable)
ThresholdValue: '5', // String
Labels: '"{"en":"Type name",...}"', // String (nullable)
Assignee: 'Assigned Operator', // String
AssigneeGuid: 'c8485006-9ad9-458d-9542-1d7f3efe417b', // Guid
AcknowledgementDate: '2020-01-01 01:30:00', // Date
AcknowledgedBy: 'Operator name', // String
HandleDate: '2020-01-01 01:30:00', // Date (nullable)
HandledBy: 'Operator name', // String (nullable)
HistorycizationDate: '2020-01-01 01:30:00', // Date
Notes: 'Some notes on the alarm' // String (nullable)
}
The fields Type
and Priority
can be one of the AlarmTypes (Alarm) or AlarmPriority enumerations respectively.
The field Labels
contains the specific localization of the alarm type for the specific community, if any localization has been set.
Get historicized alarms
Gets the list of the historicized alarms (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/alarm-history/list
Gets the paged list of alarm history
- Query Parameters
alarmTypes (string) – A concatenated string for the list of alarm types
alarmPriority (integer) – A single selected alarm priority
createdFrom (string) – From… creation DateTime
createdTo (string) – To… creation DateTime
historicizedFrom (string) – From… historicization DateTime
historicizedTo (string) – To… historicization DateTime
- Status Codes
200 OK – Success
The API accepts the following filters in the query params: * alarmTypes (comma separated list of alarm types, as int value, to be extracted) * alarmPriority (single alarm priority, as int value, to be extracted) * cFrom, cTo (date filter for creation date) * hFrom, hTo (date filter for historicization date)
Returns a plain Json negative message if there was a problem retrieving the detail or a Json positive response with the requested details:
[
{
ID: 1234, // Int
Guid: '777ded6e-34f7-4af9-88de-bb3b1ae06878', // Guid
CreatedDate: '2020-01-01 01:30:00', // Date
LastUpdated: '2020-01-01 01:30:00', // Date
LastUpdatedBy: 'Operator name', // String (nullable)
CommunityGuid: '3f1e45f7-a43c-499e-add4-44b64b364ebf', // Guid
Community: 'Community name', // String
CommunityID: 567, // Int
Type: 0, // Int
Priority: 0, // Int
InvolvedEntityGuid: '64aa9b62-461d-4b51-9438-6d8434a6f467', // String
InvolvedEntityType: 'Vehicle', // String
InvolvedEntityIdentifier: 'AA 123 BB', // String (nullable)
ThresholdValue: '5', // String
Labels: '"{"en":"Type name",...}"', // String (nullable)
Assignee: 'Assigned Operator', // String
AssigneeGuid: 'c8485006-9ad9-458d-9542-1d7f3efe417b', // Guid
AcknowledgementDate: '2020-01-01 01:30:00', // Date
AcknowledgedBy: 'Operator name', // String
HandleDate: '2020-01-01 01:30:00', // Date (nullable)
HandledBy: 'Operator name', // String (nullable)
HistorycizationDate: '2020-01-01 01:30:00', // Date
Notes: 'Some notes on the alarm' // String (nullable)
},
{ ... }
]
The fields Type
and Priority
can be one of the AlarmTypes (Alarm) or AlarmPriority enumerations respectively.
The field Labels
contains the specific localization of the alarm type for the specific community, if any localization has been set.
Edit alarm notes
Persists edits about an historicized alarm:
With a request body like this
{
ID: 123, // Int (required)
Notes: "Some notes" // String
}
It will return a plain Json positive response if the record was successfully added or updated.
Some of the possible error messages are:
err_InvalidElement
No alarm to edit was found for the provided ID, or no ID was provided