Analysis List

Service version: 1
Last edit: 2022.07.25

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

ParameterDescription
apiKeyAuthorization 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

FieldDescription
analysisInfosList of analysis descriptions.
numberOfAllAnalysesNumber of all analyses in the response.
numberOfPagesNumber of pages for the provided parameters.

AnalysisInfo structure

FieldDescription
idAnalysis number id.
nameJob name, given for the user’s convenience.
ownerEmail of the analysis' owner.
statusJob status. One of the following values:
  • WAITING
  • RUNNING
  • ENDED
  • FAILED
  • CANCELLED
  • ACCEPTED
  • REJECTED
currentProgressCurrent value of the job progress (0-100).
creationTimeJob creation time in YYYY-MM-DDTHH:mm:ss.SSSZ format.
timeDefinitionTime definition of the analysis.
timeDefinition.zoneIdTime zone as a TZ database name. For example "Europe/Amsterdam" or "UTC"
timeDefinition.daysOfWeekDays of the week of the analysis. Allowed values:
  • MONDAY
  • TUESDAY
  • WEDNESDAY
  • THURSDAY
  • FRIDAY
  • SATURDAY
  • SUNDAY
timeDefinition.dateRangesList of date ranges of the analysis.
timeDefinition.timeRangesList of time ranges of the analysis.
tripsCountedHow many trips were counted. Updates when the analysis is in progress.
startAnalysisTimeDate and time start of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ.
endAnalysisTimeDate and time end of the analysis in the format: YYYY-MM-DDTHH:mm:ss.SSSZ.

Date range format

FieldDescription
startDateStart date of the date range in YYYY-MM-DD format.
endDateEnd date of the date range in YYYY-MM-DD format.
exclusionsList of dates to exclude from a given range in YYYY-MM-DD format.

Time range format

FieldDescription
startTimeStart time of the time range in HH:mm format.
endTimeEnd 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": 1
40}

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