×

Mileage for selected period

This API returns the mileage and engine hours of a vehicle within the selected time range.

How to get data

Request address

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

Request method

GET

Request parameters

  • cmd=istatus — command to get mileage
  • imei — object identifier in the system
  • start — start of the interval (Unix timestamp)
  • stop — end of the interval (Unix timestamp)
  • node — node number where the command should be executed
     

Example request

https://<server_address>/api/api.php?cmd=istatus&imei=6794i&start=1664917200&stop=1665003600&node=1
Response
{
  "code": 0,
  "msg": "OK",
  "run": 126.79500000000007,
  "run_by_can": 0,
  "motorhours": 9897,
  "unixtimestamp_start": 1664917200,
  "unixtimestamp_stop": 1665003600
}
In response to the API request, the following is returned:
  • run — mileage over the period, km
  • run_by_can — mileage from CAN data, km
  • motorhours — engine hours over the period, seconds
  • unixtimestamp_start — start of the interval (Unix timestamp)
  • unixtimestamp_stop — end of the interval (Unix timestamp)