Analysis List
Purpose
Send a GET request to return an analysis list.
Request data
Format
GET
URL request example
https://api.tomtom.com/origindestination/1/analysis?key={apiKey}[&page={page}][&limit={limit}][&name={name}]
Example
GET
URL request example
https://api.tomtom.com/origindestination/1/analysis?page=1&limit=15&key={apiKey}
Parameters
Parameter | Description |
---|---|
apiKey | Authorization key for access to the API. |
page(optional) | Number of page returned in the response. |
limit(optional) | Number of analyses per page. |
name(optional) | Filter analyses by name containing given value. |
Response data
Response structure
Field | Description |
---|---|
analysisInfos | List of analysis descriptions. |
numberOfAllAnalyses | Number of all analyses in the response. |
numberOfPages | Number of pages for the provided parameters. |
AnalysisInfo structure
Field | Description |
---|---|
id | Analysis number id. |
name | Job name, given for the user’s convenience. |
owner | Email of the analysis' owner. |
status | Job status. One of the following values:
|
currentProgress | Current value of the job progress (0-100). |
creationTime | Job creation time in YYYY-MM-DDTHH:mm:ss.SSSZ format. |
timeDefinition | Time definition of the analysis. |
timeDefinition.zoneId | Time zone as a TZ database name. For example "Europe/Amsterdam" or "UTC" |
timeDefinition.daysOfWeek | Days of the week of the analysis. Allowed values:
|
timeDefinition.dateRanges | List of date ranges of the analysis. |
timeDefinition.timeRanges | List of time ranges of the analysis. |
tripsCounted | How many trips were counted. Updates when the analysis is in progress. |
startAnalysisTime | Date and time start of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ . |
endAnalysisTime | Date and time end of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ . |
Date range format
Field | Description |
---|---|
startDate | Start date of the date range in YYYY-MM-DD format. |
endDate | End date of the date range in YYYY-MM-DD format. |
exclusions | List of dates to exclude from a given range in YYYY-MM-DD format. |
Time range format
Field | Description |
---|---|
startTime | Start time of the time range in HH:mm format. |
endTime | End time of the time range in HH:mm format. |
Response Example
Here is an example showing the correct response.
GET
Response body - JSON
1{2 "analysisInfos": [3 {4 "id": "1337",5 "name": "Example analysis",6 "owner": "user@example.com",7 "status": "ENDED",8 "currentProgress": 100,9 "creationTime": "2019-07-18T07:39Z",10 "startAnalysisTime": "2019-07-18T07:52Z",11 "startAnalysisTime": "2019-07-18T08:12Z",12 "tripsCounted": 12345,13 "timeDefinition": {14 "dateRanges": [15 {16 "startDate": "2018-12-01",17 "endDate": "2018-12-31",18 "exclusions": ["2018-12-02"]19 }20 ],21 "timeRanges": [22 {23 "startTime": "00:00",24 "endTime": "00:00"25 }26 ],27 "zoneId": "Europe/Warsaw",28 "daysOfWeek": [29 "WEDNESDAY",30 "FRIDAY",31 "MONDAY",32 "TUESDAY",33 "THURSDAY"34 ]35 },36 }37 ],38 "numberOfAllAnalyses": 1,39 "numberOfPages": 140}
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
Code | Reason |
---|---|
200 | OK |
400 | Bad Request |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |