Driver activity report

This API retrieves information about driver activities for vehicles over a selected period. The response includes different work modes (e.g., driving, working, resting).

How to get data

Method

GET

Request address

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

Request parameters

  • cmd=gettachodata — command to retrieve tachograph data
  • agent_id — vehicle ID (or multiple IDs, separated by commas)
  • imei — device ID (alternative to agent_id)
  • ts — start time (Unix timestamp)
  • te — end time (Unix timestamp)
  • node — node number where the command should be executed
 

Example request

https://<server_address>/api/api.php?cmd=gettachodata&ts=1624568400&te=1624586400&agent_id=120407,120646&node=1
Response
{
  "С 220 СК 750": {
    "First driver": {
      "Work": 4997,
      "Drive": 248,
      "Rest": 9117
    },
    "Second driver": {
      "Driver available": 1722,
      "Rest": 9117
    }
  },
  "А 152 АК 790": {
    "First driver": {
      "Drive": 5436,
      "Work": 1706,
      "Rest": 9084
    },
    "Second driver": {
      "Driver available": 4995,
      "Rest": 9084
    }
  }
}
In response to the API request, the following is returned:
  • vehicle number — license plate of the vehicle
  • First driver / Second driver — data for each driver
  • Drive — driving time (in seconds)
  • Work — working time (in seconds)
  • Rest — resting time (in seconds)
  • Driver available — time when the driver was available for work (in seconds)