Analysis Preview

Service version: 1
Last edit: 2022.07.25

Purpose

Get a preview of the analysis by sending a GET request.

Request data

Format

GET
URL request example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/{id}?key={apiKey}

Example

GET
URL request example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/512?key=test-api-key

Parameters

ParameterDescription
idAnalysis number id.
apiKeyAuthorization key for access to the API.

Response data

Response structure

FieldDescription
analysisInfoInformation about the analysis.
analysisInfo.idAnalysis number id.
analysisInfo.nameJob name, given for the user’s convenience.
analysisInfo.ownerEmail of the analysis' owner.
analysisInfo.statusJob status. One of the following values:
  • WAITING
  • RUNNING
  • ENDED
  • FAILED
  • CANCELLED
  • ACCEPTED
  • REJECTED
analysisInfo.currentProgressCurrent value of the job progress (0-100).
analysisInfo.creationTimeJob creation time in YYYY-MM-DDTHH:mm:ss.SSSZ format.
analysisInfo.timeDefinitionTime definition of the analysis.
analysisInfo.tripsCountedHow many trips were counted. Updates when the analysis is in progress.
analysisInfo.startAnalysisTimeDate and time start of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ.
analysisInfo.endAnalysisTimeDate and time end of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ.
analysisInfo.estimatedDurationEstimated time in seconds to change the analysis status from RUNNING to ENDED.
analysisInfo.typeType of the created analysis.
regionsLinkURL to the regions defined in the analysis. Your API Key needs to be added to the URL.
resultsList of the results available only when the analysis has a status of ACCEPTED.
FieldDescription
tripsWholeResultLinkURL to the whole analysis trips result.
tripsPartialResultLinkURL to the partial analysis trips result. Your API Key needs to be added to the URL.
durationsHistogramPartialResultLinkURL to the partial analysis trips duration histogram result. Your API Key needs to be added to the URL.
lengthsHistogramPartialResultLinkURL to the partial analysis trips lengths histogram result. Your API Key needs to be added to the URL.
hoursOfDayHistogramPartialResultLinkURL to the partial analysis trips start hour of day histogram result. Your API Key needs to be added to the URL.
tripsResultFileSizeTrips result file size in megabytes. It will help you decide if you want to download the whole or a partial result.
dateRangeDate range of the result.
dateRange.startDateStart date of the date range in YYYY-MM-DD format.
dateRange.endDateEnd date of the date range in YYYY-MM-DD format.
dateRange.exclusionsList of dates to exclude from the given range in YYYY-MM-DD format.
dateRangeTime range of the result.
timeRange.startTimeStart time of the time range in HH:mm format.
timeRange.endTimeEnd time of the time range in HH:mm format.

Trips result structure

FieldDescription
linksArray of links between regions.

Result interpretation example

GET
Response body - JSON
1{
2 "links": [[0,0,0,100], [0,1,1,200], ...]
3}

The result contains a list of 'links'. Each link contains information about trips between regions and looks like this: [Origin region index (number), Destination region index (number), Via region index (number), Amount of trips (number)]

Errors

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

HTTP Response Codes

CodeReason
200OK
400Bad Request
401Unauthorized
403Forbidden
404Not Found