Alarm - Logs
Module dedicated to the retrieval of the action logs on alarms. 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
.
Get alarm action logs
Gets the list of the logged activities for end users and operators (it”s a Paged List APIs, as explained in the introduction):
- GET /v1/alarms/logs
Returns all alarm Logs or related to specific alarm Guid, based on search parameter.
- Query Parameters
performingUser (string) – The user that performed the action
performedAction (string) – A concatenated string for the list of actions
involvedEntity (string) – A concatenated string for the list of entities to search for
from (string) – From… creation DateTime
to (string) – To… creation DateTime
- Status Codes
200 OK – Success
The following filter can be specified in the query params:
performingUser: a string with the name, or part of it, of the user who performed the action
performedAction: the list of action codes divided by comma
from: a date representing the lower bound for the date in which the action was performed
to: a date representing the upper bound for the date in which the action was performed
the response will be a list of the action logs filtered according to the provided filters (if no filter is set, the API will return the full list):
[
{
Id: "0a5342ee-70b4-4f44-98e2-011cd2330d55", // Guid
ActionType: 1, // LogActionType enum
PerformingUser: "Administrator", // String
PerformingGuid: "df14c292-b7c2-464d-af2a-e69291cbbc13", // Performing user Guid
CreatedDate: "1970-01-01T00:00:00Z", // Date
IpAddress: "127.0.0.1", // String
EntityType: 201, // LogEntityType enum, only Alarm value
EntityName: null, // String, null
EntityGuid: "df14c292-b7c2-464d-af2a-e69291cbbc13", // String, Guid the involved entity
Data: [
{
{ Key = "Type", Value = "500" },
{ Key = "InvolvedEntityGuid", Value = "8feb520a-4271-45c3-8667-e2be34a46cd6" },
{ Key = "InvolvedEntityIdentifier", Value = "123456789" },
{ Key = "InvolvedEntityType", Value = "Vehicle" },
{ Key = "Priority", Value = "0" },
{ Key = "TresholdValue", Value = "15" }
},
...
]
},
...
]
The information inside the Data
array are all strings.
The InvolvedEntity
data are related to the entity for which the alarm was triggered (i.e. the vehicle with low fuel), and represents
its type, its guid and an identifier depending on the entity type.
The Type
, Priority
and TresholdValue
data are related to the Alarm data. Type
and Priority
maps to the AlarmTypes (Alarm)
or AlarmPriority enumerations respectively.
or one of the following errors:
err_InvalidDate
The value specified for
from
date,to
date or both is not a valid date format