Get alarm occurrences
Description
Returns the list of alarm occurrences for the given period.
This endpoint limits the number of returned records to 2000.
If you expect more than 2000 records in the result,
please use the alternative endpoint Get alarm occurrences with increased limit
which extends this limit to 15000 records.
Parameter
The parameter is a JSON structure, provided as payload of the request, that specifies the fields used for filtering the records.
All fields (from, to, onlyUnprocessed, vehicles, drivers, alarms and severityLevels) are optional.
If the parameters 'from' and 'to' are not specified, then they will assume the last 24 hours as a default.
{
"from": "2023-08-23T14:36:13.008Z",
"to": "2023-08-23T14:36:13.008Z",
"onlyUnprocessed": true,
"vehicles": [ 0 ],
"drivers": [ 0 ],
"alarms": [ 0 ],
"severityLevels": [ 0 ]
}
Field | Description |
from |
The begining of the period in witch to search for alarm occurrences. If this field is not specified, then it is assumed that it's value is 24 hours before the value of field to
to |
to |
The ending of the period in witch to search for alarm occurrences. If this field is not specified, then it is assumed that it's value is the current UTC date/time. |
onlyUnprocessed |
Specifies if only the unprocessed occurrences should be searched.
|
vehicles |
Specifies the IDs of the vehicles for witch to seach alarms occurrences
|
drivers |
Specifies the IDs of the drivers for witch to seach alarms occurrences
|
alarms |
Specifies the IDs of the alarms types to search for. Check the Alarms Types and their IDs. |
Response
The response consists is an array - occurrences
- of records representing the alarms occurrences
and a field hasMoreResults
that informs if there are more occurrences beyond those returned.
{
"hasMoreResults": true,
"occurrences": [
{
"severityLevel": 0,
"startLatitude": 0.0,
"startLongitude": 0.0,
"id": 0,
"typeId": 0,
"tagName": "string",
"definitionId": 0,
"definitionName": "string",
"vehicleId": 0,
"licensePlate": "string",
"driverId": 0,
"driverName": "string",
"startLocationId": 0,
"started": "2023-08-23T14:36:13.182Z",
"ended": "2023-08-23T14:36:13.182Z",
"placeNameStart": "string",
"placeNameEnd": "string",
"organizationRestrictions": "string",
"rawData": "string",
"severityLevelId": 0,
"placeId": 0,
"placeType": "string",
"placeDepartment": "string",
"placeSegment": "string",
"vehicleId": 0,
"vehicleType": "string",
"vehicleDepartment": "string",
"vehicleSegment": "string",
"vehicleFreeField1": "string",
"vehicleFreeField2": "string",
"vehicleFreeField3": "string",
"vehicleFreeField4": "string",
"vehicleFreeField5": "string"
}
]
}
Field | Description |
id |
The identifier of the alarm occurrence
|
typeId |
The identifier of the type of the alarm. Check the Alarms Types and their IDs.
|
definitionId |
The identifier of the definition of the alarm.
|
definitionName |
The name of the definition of the alarm.
|
severityLevel |
The identifier of the severity level of the occurrence.
|
startLatitude |
The latitude where the alarm occurrence started.
|
endLatitude |
The latitude where the alarm occurrence started.
|
tagName |
The tag associated with the alarm.
|
vehicleId |
The identifier of the vehicle associated with the alarm.
|
licensePlace |
The license plate of the vehicle associated with the alarm.
|
started |
The timestamp when the occurrence started.
|
ended |
The timestamp when the occurrence ended.
|
placeNameStart |
The name of the place where the occurrence started.
|
placeNameEnd |
The name of the place where the occurrence ended.
|
organizationRestrictions |
|
rawData |
|
severityLevelId |
The identifier of the severity level of the alarm.
|
placeId |
The identifier of the place where the alarm occurrence started
|
placeType |
The type of place
|
placeType |
The type of place
|
placeDepartment |
Place's department
|
vehicleSegment |
Place's segment
|
vehicleFreeField1 |
Vehicle's free field 1
|
vehicleFreeField2 |
Vehicle's free field 2
|
vehicleFreeField3 |
Vehicle's free field 3
|
vehicleFreeField4 |
Vehicle's free field 4
|
vehicleFreeField5 |
Vehicle's free field 5
|
Response HTTP Codes
200 - OK
- OK
204 - NoContent
- There are no occurrences for the filter received in the input
400 - BadRequest
- The request parameter is not specified. The request must have at least the brackets ()
401 - Unauthorized
- The token is invalid
403 - Forbidden
- User does not have permission to view alarm occurrences