MapQuest Observer

Trace History APIs

GET
Range

Resource URL

https://www.mapquestapi.com/daas/v1/trace/range/

Resource Information

Response Formats GEOJSON, JSON, CSV
Authentication Yes (Requires Key)
Rate Limited Yes

Overview

This endpoint returns of of the traces recorded for this device in the time range specified.

Request Parameters

Request Parameter Description Required?
key
String
The API Key, which is needed to make requests to MapQuest services. Yes
deviceid
UUID
The advertising identifier associated with the device. Depending on the platform, this value can be the Apple IDFA identifier or the Google Play identifier. Note: Please see example request to see how this request is structured. Yes
fromtime
long
Long value used to indicate the start of the time period of interest, specified as epoch offset seconds. Yes
totime
long
Long value used to indicate the end of the time period of interest, specified as epoch offset seconds. Yes
limit
Integer
Optional limit on the number of traces returned. Defaults to unlimited. No
format
String

Optional format of the returned data. Defaults to geojson.

  • geojson
  • json
  • csv
No

Formats

The GeoJSON specification is described here: http://geojson.org/geojson-spec.html

Response

Response Field Description
id
UUID
The advertising identifier associated with the device. Depending on the platform, this value can be the Apple IDFA identifier or the Google Play identifier.
time
Long
The UNIX epoch time stamp detailing when the observation was made of the device.
longitude
Decimal
The x-coordinate expressed in decimal degrees.

Constraint:

Values between -180 and 180.
latitude
Decimal
The y-coordinate expressed in decimal degrees.

Constraint:

Values between -90 and 90.
Additional properties can be in the response depending on the device and operating system.

Example Request

Retrieve all traces for device 'AAAAAA-F26E-4F85-9598-AB9218D8B344' in the time range Mon, 25 Jan 2016 23:59:29 GMT - Tue, 26 Jan 2016 08:59:01 GMT in short json format.

GET

https://www.mapquestapi.com/daas/v1/trace/range/AAAAAA-F26E-4F85-9598-AB9218D8B344/1453766369000/1453798741000?format=json&key=KEY

Example Response

[
  {
    "type": "FeatureCollection",
    "features": [
      {
        "id": "AAAAAA-F26E-4F85-9598-AB9218D8B344",
        "type": "Feature",
        "properties": {
          "latitude": "34.073992",
          "longitude": "-117.753811",
          "time": "1453766369000"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            -117.753811,
            34.073992
          ]
        }
      },
      {
        "id": "AAAAAA-F26E-4F85-9598-AB9218D8B344",
        "type": "Feature",
        "properties": {
          "latitude": "34.073992",
          "longitude": "-117.753811",
          "time": "1453849148000"
        },
        "geometry": {
          "type": "Point",
          "coordinates": [
            -117.753811,
            34.073992
          ]
        }
      }
    ]
  }
]
[
  {
    "id": "AAAAAA-F26E-4F85-9598-AB9218D8B344",
    "time": 1453766369000,
    "properties": {
      "latitude": "34.073992",
      "longitude": "-117.753799"
    }
  },
  {
    "id": "AAAAAA-F26E-4F85-9598-AB9218D8B344",
    "time": 1453798741000,
    "properties": {
      "latitude": "34.073992",
      "longitude": "-117.753799"
    }
  }, ...
]
id,time,latitude,longitude
AAAAAA-F26E-4F85-9598-AB9218D8B344,1453766369000,34.073992,-117.753799
AAAAAA-F26E-4F85-9598-AB9218D8B344,1453798741000,34.073992,-117.753799