×

Notification events

This API retrieves notification events for a selected period, such as speeding, leaving a geofence, or other pre-configured alerts.

How to get data

Method

 GET

Request address

To get the data, use the address: https://<server_address>/api/api.php?

Request parameters

  • cmd=notifications — command to get notification events
  • ts — start time of the period (Unix timestamp)
  • te — end time of the period (Unix timestamp)
  • notification — name of the notification to retrieve events for
  • node— node number where the command should be executed
 

Example request

https://<server_address>/api/api.php?cmd=notifications&ts=1606942800&te=1607115600&notification=test&node=1
Response
{
  "code": 0,
  "msg": "OK",
  "data": [
    {
      "vehiclenumber": "PS2",
      "agentid": 109792,
      "message": "Speed > 10 km/h longer than 10 sec max speed=52km/h Duration: 42 sec",
      "ts": 1606988609
    },
    {
      "vehiclenumber": "PS2",
      "agentid": 109792,
      "message": "Speed > 10 km/h longer than 10 sec max speed=29km/h Duration: 12 sec",
      "ts": 1606988438
    },
    {
      "vehiclenumber": "PS2",
      "agentid": 109792,
      "message": "Speed > 10 km/h longer than 10 sec max speed=17km/h Duration: 13 sec",
      "ts": 1606988106
    }
  ],
  "id": 3701
}
In response to the API request, the following is returned:
  • vehiclenumber — vehicle registration number or internal number
  • agentid — object ID in the system
  • message — notification message text
  • ts — event time (Unix timestamp)
  • id— request/session identifier