O/D Analysis

Analysis Preview

Important Note
Explore ready-to-use traffic reports and data visualizations immediately by signing up for a 30-day free trial on the MOVE Portal. Once registered, you’ll receive an API key to start using the Traffic Analytics APIs right away. Alternatively, you may contact our Sales team for a tailored solution.

Purpose

Perform a GET request to return an analysis preview.

This page describes an analysis created with "analysisVersion": 2. The 1 in the request URL is the version of the service and it does not change. The version of the analysis is chosen at creation time, see Analysis Creation.

Request data

Format

get
URL request format
https://api.tomtom.com/origindestination/1/analysis/selected-link/{id}?key={Your_API_Key}

Example

get
URL request example
https://api.tomtom.com/origindestination/1/analysis/selected-link/512?key={Your_API_Key}

Parameters

Required parameters

Description

id
integer

Analysis number id.


Value: The analysis number id.

key
string

Authorization key for access to the API.


Value: Your valid API Key.

Response data

The response contains the analysisInfo object and, once the results exist, the results array. Results are released when the analysis reaches the ACCEPTED status. For any other status the results array is omitted from the response, and a request for a result file answers with a 404 response.

Response structure

Field

Description

analysisInfo
object

Information about the analysis.

analysisInfo.id
string

Analysis number id, returned as a string.

analysisInfo.name
string

Job name, given for the user’s convenience.

analysisInfo.type
string

The type of the created analysis. For the Selected Link Analysis the value is equal to SELECTED_LINK.

analysisInfo.analysisVersion
integer

Version of the analysis. Use it to decide which version of this documentation applies to the results. Everything on this page applies to the value 2.

analysisInfo.status
string

Job status. One of the following values:

  • WAITING

  • RUNNING

  • ENDED

  • FAILED

  • CANCELLED

  • ACCEPTED

  • REJECTED

analysisInfo.currentProgress
integer

Current value of the job progress (0-100).

analysisInfo.creationTime
datetime

Job creation time in YYYY-MM-DDTHH:mmZ format.

analysisInfo.startAnalysisTime
datetime

Date and time start of the analysis in the format: YYYY-MM-DDTHH:mmZ.

analysisInfo.endAnalysisTime
datetime

Date and time end of the analysis in the format: YYYY-MM-DDTHH:mmZ.

analysisInfo.timeDefinition
object

Time definition of the analysis.

analysisInfo.timeDefinition.zoneId
string

Time zone as a TZ database name. For example Europe/Amsterdam or UTC.

analysisInfo.timeDefinition.daysOfWeek
array (of strings)

Days of the week the analysis covers.

analysisInfo.timeDefinition.dateRanges
array

List of date ranges of the analysis.

analysisInfo.timeDefinition.timeRanges
array

List of time ranges of the analysis.

analysisInfo.dataSources
string

Data sources the analysis runs on.

analysisInfo.enhancedMetrics
array (of strings)

Enhanced metrics the analysis was created with. Not returned when the analysis was created without them. See Enhanced metrics.

analysisInfo.link
object

The analyzed geometry, as a GeoJSON LineString or Polygon. For a LineString this is the geometry after map-matching, not the geometry you sent.

analysisInfo.edgeIds
array (of strings)

Identifiers of the map segments the link was matched to, returned as strings. Empty for a Polygon link.

analysisInfo.bufferRadiusInMeters
integer

Radius of the analyzed area, in meters.

analysisInfo.regionEntrancesFrcs
array (of integers)

Functional road classes used to define entrance and exit roads of the region. Omitted when not applicable.

analysisInfo.map
object

The map used for map-matching, with type and version.

results
array

Result URLs, one entry per combination of a date range and a time range. Omitted until the analysis is ACCEPTED. See Result URLs structure.

Result URLs structure

Each entry of the results array covers one date range and one time range of the analysis.

The keys of incomingResultUrl, outgoingResultUrl and insideResultUrl are JSON, PROTOBUF, CSV and SHAPEFILE. Your API Key needs to be added to each URL.

Field

Description

incomingResultUrl
object

URLs for the incoming part of trips connected with the selected link.

outgoingResultUrl
object

URLs for the outgoing part of trips connected with the selected link.

insideResultUrl
object

URLs for the part of trips inside the region, with the geometry of every node clipped to the region.


Note: inside results are produced only when the analyzed geometry is a Polygon. The section is currently returned for a LineString link as well, but the files behind those URLs do not exist.

dateRange
object

Date range of the result.

timeRange
object

Time range of the result.

Date range and time range format

Field

Description

startDate
string

Start date of the date range in YYYY-MM-DD format.

endDate
string

End date of the date range in YYYY-MM-DD format.

exclusions
array (of strings)

Dates excluded from the range, in YYYY-MM-DD format. An empty array when nothing was excluded.

daysOfWeek
array (of strings)

Days of the week of this date range. Only present when the date range declared its own list.

name
string

Date range name, returned only when it was given at creation time.

startTime
string

Start time of the time range in HH:mm format.

endTime
string

End time of the time range in HH:mm format.

Errors

If there is an error in the supplied parameters or any other internal problem, an error response is generated in the requested format.

Response codes

Code

Meaning & possible causes

200

OK

400

Bad Request

401

Unauthorized

403

Forbidden

404

Not Found