Get alarm occurrences

/v2/alarms/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 ]
 }

FieldDescription
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 DateTime no 24 hours before 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. DateTime no UTC Now
onlyUnprocessed Specifies if only the unprocessed occurrences should be searched. DateTime no false
vehicles Specifies the IDs of the vehicles for witch to seach alarms occurrences int[] no
drivers Specifies the IDs of the drivers for witch to seach alarms occurrences int[] no
alarms Specifies the IDs of the alarms types to search for.
Check the Alarms Types and their IDs. int[] no

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"
    }
  ]
}

FieldDescription
id The identifier of the alarm occurrence int
typeId The identifier of the type of the alarm. Check the Alarms Types and their IDs. int
definitionId The identifier of the definition of the alarm. int
definitionName The name of the definition of the alarm. string
severityLevel The identifier of the severity level of the occurrence. int
startLatitude The latitude where the alarm occurrence started. double
endLatitude The latitude where the alarm occurrence started. double
tagName The tag associated with the alarm. string
vehicleId The identifier of the vehicle associated with the alarm. int
licensePlace The license plate of the vehicle associated with the alarm. string
started The timestamp when the occurrence started. DateTime
ended The timestamp when the occurrence ended. DateTime
placeNameStart The name of the place where the occurrence started. string
placeNameEnd The name of the place where the occurrence ended. string
organizationRestrictions string
rawData string
severityLevelId The identifier of the severity level of the alarm. int
placeId The identifier of the place where the alarm occurrence started int
placeType The type of place string
placeType The type of place string
placeDepartment Place's department string
vehicleSegment Place's segment string
vehicleFreeField1 Vehicle's free field 1 string
vehicleFreeField2 Vehicle's free field 2 string
vehicleFreeField3 Vehicle's free field 3 string
vehicleFreeField4 Vehicle's free field 4 string
vehicleFreeField5 Vehicle's free field 5 string

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