Analysis Preview
Purpose
Get a preview of the analysis by sending a GET request.
Request data
HTTPS Method: GET
For ease of viewing and identification:
- Constants and parameters enclosed in curly brackets { } must be replaced with their values.
- Please see the following Request parameters section with the required and optional parameters tables for their values. The generic request format is as follows.
Format
https://{baseURL}/origindestination/{versionNumber}/analysis/flowmatrix/{id}?key={Your_API_Key}
Example
https://api.tomtom.com/origindestination/1/analysis/flowmatrix/512?key={Your_API_Key}
Request parameters
Required parameters | Description |
---|---|
| The base URL for calling TomTom services. Value: |
| Version of the service to call. Value: The current value is |
| Analysis number id. Value: The analysis number id. |
| Authorization key for access to the API. Value: Your valid API Key. |
Response data
Response structure
Field | Description |
---|---|
| Information about the analysis. |
| Analysis number id. |
| Job name, given for the user's convenience. |
| Email of the analysis' owner. |
| Job status. One of the following values:
|
| Current value of the job progress (0-100). |
| Job creation time in |
| Time definition of the analysis. |
| How many trips were counted. Updates when the analysis is in progress. |
| Date and time start of the analysis in the format:
|
| Date and time end of the analysis in the format:
|
| Estimated time in seconds to change the analysis status from
|
| Type of the created analysis. |
| URL to the regions defined in the analysis. Your API Key needs to be added to the URL. |
| List of the results available only
when the analysis has a status of |
Response link structure
Field | Description |
---|---|
| URL to the whole analysis trips result. |
| URL to the partial analysis trips result. Your API Key needs to be added to the URL. |
| URL to the partial analysis trips duration histogram result. Your API Key needs to be added to the URL. |
| URL to the partial analysis trips lengths histogram result. Your API Key needs to be added to the URL. |
| URL to the partial analysis trips start hour of day histogram result. Your API Key needs to be added to the URL. |
| Trips result file size in megabytes. It will help you decide if you want to download the whole or a partial result. |
| Date range of the result. |
| Start date of the date range in |
| End date of the date range in |
| List of dates to exclude from the given range in |
| Time range of the result. |
| Start time of the time range in |
| End time of the time range in |
Trips response structure
Field | Description |
---|---|
| Array of links between regions. |
Response interpretation example
1{2 "links": [[0,0,0,100], [0,1,1,200], ...]3}
The response 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.
Response codes
Code | Meaning & possible causes |
---|---|
| OK |
| Bad Request |
| Unauthorized |
| Forbidden |
| Not Found |