Events history API

Events history API is dedicated to output object’s events history for a requested period.

Request structure:

GET /detected-events?object_id=<...>&from_datetime=<...>&to_datetime=<...>&continuation_token=<..>&limit=<..>&version=1&api_key=<..> HTTP/1.1
Host: api.fm-track.com
Content-Type: application/json;charset=UTF-8

Request parameters:

ParameterTypeDescriptionRequired
object_idStringExternal object IDYes
from_datetimeDate timeFind events starting from specified dateYes
to_datetimeDate timeFind events ending to specified dateYes
continuation_tokenInteger Displays from what date and time the data is shown if the record limit was reachedNo
limitIntegerLimits events count in responseNo
versionStringAPI versionYes
api_keyStringUser identification keyYes

Response example:

{
  "continuation_token": 1,
  "events": [
    {
      "name": "ToyotaIgnition",
      "description": "TestIgnition",
      "driver_id": null,
      "trip_type": "NONE",
      "duration": 31,
      "start": {
        "datetime": "2020-02-10T09:13:23.000Z",
        "location": {
          "latitude": 54.924457,
          "longitude": 23.872841
        },
        "mileage": 6000.0,
        "speed": 40
      },
      "end": {
        "datetime": "2020-02-10T09:13:54.000Z",
        "location": {
          "latitude": 54.924457,
          "longitude": 23.872841
        },
        "mileage": 6000.0
      }
    },
    ...
  ]
}

If a parameter was entered incorrectly, the system will respond with an error code. All error codes are described in the APIs section. Parameters for which no data is provided are not included in the response. A full list of response parameters is available at the end of this section.

Response parameters:

ParameterTypeDescription
continuation_tokenIntegerContinuation token is sent when number of events in response exceed limit
eventsArrayContainer for all object events for selected period
nameStringEvent name
descriptionStringEvent description
driver_idStringExternal driver ID
trip_typeEnumTrip type
durationLongEvent duration in seconds
startArrayContainer for event start information
endArrayContainer for event end information
datetimeDatetimeDate and time
locationArrayContainer for coordinates
latitudeDoubleLatitude
longitudeDoubleLongitude
mileageDoubleMileage in kilometres
speedIntegerSpeed in km/h