Analysis Preview
Purpose
Perform a GET request to return an analysis preview.
Request data
Format
https://api.tomtom.com/origindestination/1/analysis/selected-link/{id}?key={Your_API_Key}Example
https://api.tomtom.com/origindestination/1/analysis/selected-link/512?key={Your_API_Key}Parameters
Required parameters | Description |
|---|---|
| Analysis number id. Value: The analysis number id. |
| 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 |
|---|---|
| Information about the analysis. |
| Analysis number id, returned as a string. |
| Job name, given for the user’s convenience. |
| The type of the created analysis. For the Selected Link Analysis the
value is equal to |
| 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 |
| Job status. One of the following values:
|
| Current value of the job progress (0-100). |
| Job creation time in |
| Date and time start of the analysis in the format:
|
| Date and time end of the analysis in the format:
|
| Time definition of the analysis. |
| Time zone as a
TZ database name. For example |
| Days of the week the analysis covers. |
| List of date ranges of the analysis. |
| List of time ranges of the analysis. |
| Data sources the analysis runs on. |
| Enhanced metrics the analysis was created with. Not returned when the analysis was created without them. See Enhanced metrics. |
| The analyzed geometry, as a GeoJSON LineString or Polygon. For a LineString this is the geometry after map-matching, not the geometry you sent. |
| Identifiers of the map segments the link was matched to, returned as strings. Empty for a Polygon link. |
| Radius of the analyzed area, in meters. |
| Functional road classes used to define entrance and exit roads of the region. Omitted when not applicable. |
| The map used for map-matching, with |
| Result URLs, one entry per combination of a date range and a time range. Omitted until the
analysis is |
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 |
|---|---|
| URLs for the incoming part of trips connected with the selected link. |
| URLs for the outgoing part of trips connected with the selected link. |
| 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. |
| Date range of the result. |
| Time range of the result. |
Date range and time range format
Field | Description |
|---|---|
| Start date of the date range in |
| End date of the date range in |
| Dates excluded from the range, in |
| Days of the week of this date range. Only present when the date range declared its own list. |
| Date range name, returned only when it was given at creation time. |
| Start time of the time range in |
| End time of the time range in |
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 |
|---|---|
| OK |
| Bad Request |
| Unauthorized |
| Forbidden |
| Not Found |