Get /vehicles/{vehicleId}/drives

Returns a single Drive from a vehicle at a specified time.

Note:This endpoint returns only meta data for a drive. To return imagery, see Get /vehicles/{vehicleId}/streams.


Syntax

/vehicles/{vehicleId}/drives/{date}&password={string}

URL Parameters

Name Type Description
vehicleId string The unique identifier of a vehicle.
date date A historical time in UTC. To retrieve a stream successfully, time must match the time returned in GET /drives.

Query Parameters

Name Type Description
password string Unique password supplied to you previously.

Return Value

Type: GeoJSON FeatureCollection

The FeatureCollection contains a single feature representing the Drive, and contains a "geometry" and "properties" member.

The “geometry” member is a multipoint object containing two or more pairs of coordinates, which represent the start locations, intermediate locations (if available), and end locations of the Drive.

Note: Coordinate pairs are ordered with longitude first, followed by latitude, in accordance with the official GeoJSON specification.
Note: Intermediate locations will always be available after retrieving the drive stream.

The “properties” member of the returned GeoJSON will include:

Name Type Description
VehicleId integer Unique vehicle identifier.
Waypoints string, integer, integer The time, speed, and heading for intermediate locations. One waypoint is provided for each intermediate location.
Time string The time that the Drive was collected in UTC.

Note: Drives will be returned in date/time order, beginning with the first available Drive from the specified timespan.
Online boolean True if the vehicle was online within the last 5 minutes.

Note: Image streams can only be returned when the vehicle is online.
Seconds integer The duration of the Drive. Also, the maximum number of images available for the Drive.
Speed integer Speed of the vehicle at the start of the Drive, in kph
Heading integer Heading of the vehicle at the start of the Drive, in degrees. Heading is expressed as a value greater or equal than 0 and less than 360 measured clockwise from north. i.e., 0 is north, 90 is east, 180 is south, 270 is west.

Example

Request
https://www.vizzion.com/api/vehicles/1234567/drives/2022-01-26T14:51:18.000Z&password=<password>
Response
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "MultiPoint",
        "coordinates": [
          [
            -123.06955,
            49.27184
          ],
          [
            -123.06946,
            49.27304
          ]
        ]
      },
      "properties": {
        "VehicleId": 1234567,
        "Time": "2022-01-26T14:51:18.000Z",
        "Online": false,
        "Seconds": 15,
        "Speed": 41,
        "Heading": 1
      }
    }
  ]
}
                                        
Request
https://www.vizzion.com/api/drives?after=2022-01-26T00:00:00Z&before=2022-01-26T01:00:00Z&limit=2&offset=0&linestring=(23.3413,-124.56),(23.3675,-124.56)&password=<password>
Response
{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "geometry": {
        "type": "MultiPoint",
        "coordinates": [
          [
            -123.06805,
            49.27307
          ],
          [
            -123.06794,
            49.27377
          ],
          [
            -123.06783,
            49.27367
          ],
          [
            -123.06772,
            49.27357
          ],
          [
            -123.06761,
            49.27347
          ]
        ]
      },
      "properties": {
        "VehicleId": 1234567,
        "Time": "2022-01-26T16:26:45.000Z",
        "Online": false,
        "Seconds": 5,
        "Speed": 20,
        "Heading": 88,
        "Waypoints": [
          {
            "Time": "2022-01-26T16:26:46.000Z",
            "Speed": 21,
            "Heading": 89
          },
          {
            "Time": "2022-01-26T16:26:47.000Z",
            "Speed": 22,
            "Heading": 90
          },
          {
            "Time": "2022-01-26T16:26:48.000Z",
            "Speed": 23,
            "Heading": 91
          },
          {
            "Time": "2022-01-26T16:26:49.000Z",
            "Speed": 24,
            "Heading": 92
          }
        ]
      }
    }
  ]
}
                                        

Vizzion Confidential and Proprietary