Service version: 1
Last edit: 2023.04.13

Purpose

Use this endpoint to list all of your jobs, or just filter out a part of them.

Request data

HTTPS method: GET

Constants and parameters enclosed in curly brackets { } must be replaced with their values.

URL format

get
URL request format
https://{baseURL}/traffic/trafficstats/job/search/{versionNumber}?key={Your_API_Key}

Request parameters

The following table describes all of the parameters that can be used in a request. Required parameters must be used or the call will fail. Optional parameters may be used.

Required parameters

Description

baseURL
string

Base URL for calling the API.
Value: api.tomtom.com

versionNumber
string

Service version number.
Value: The current value is 1.

key
string

Authorization key for access to the API.
Value: Your valid API Key.

Optional parameters

Description

pageIndex
integer

Index of a page with jobs. Page counting starts from 0. When the number of jobs matching the specified search criteria is greater than perPage then only part of the jobs will be returned. To retrieve the remaining parts, it may be necessary to repeat the request with an incrementing value of this parameter.
Value: >=0

perPage
integer (positive)

Numer of jobs included in the page. The last page may have less jobs.
Value: The number of jobs in a page.

createdAfter
date

Earliest date of requesting jobs (inclusive).
Value: Date in the format: YYYY-MM-DD. Days change according to the UTC time zone.

createdBefore
date

Latest date of requesting jobs (inclusive).
Value: Date in the format: YYYY-MM-DD. Days change according to the UTC time zone.

completedAfter
date

Earliest date of completing jobs (inclusive).
Value: Date in the format: YYYY-MM-DD. Days change according to the UTC time zone.

completedBefore
date

Latest date of completing jobs (inclusive).
Value: Date in the format: YYYY-MM-DD. Days change according to the UTC time zone.

name
string

Name of job(s). By default exact match is done. % is a special character which allows for partial matching:


Value: Examples:

  • %London - search for jobs whose names end with London.

  • London% - search for jobs whose names start with London.

  • %London% - search for jobs whose name contains London.

id
integer

Id of a job.
Value: A job ID.

type
string

The type of jobs.
Values: Set of comma-separated values from:

  • routeanalysis

  • areaanalysis

  • trafficdensity

state
string

The current state of jobs.
Value: A set of comma-separated values from:

  • NEW

  • SCHEDULED

  • MAPMATCHING

  • MAPMATCHED

  • READING_GEOBASE

  • CALCULATIONS

  • NEED_CONFIRMATION

  • DONE

  • ERROR

  • REJECTED

  • CANCELLED

  • EXPIRED

Request URL example

get
URL request example
https://api.tomtom.com/traffic/trafficstats/job/search/1?key={Your_API_Key}&createdAfter=2018-01-01&createdBefore=2018-02-01&name=%London%&type=routeanalysis&state=DONE

Response data

Response example

Response body example - JSON
1{
2 "content": [
3 {
4 "id": 123,
5 "name": "London A501 weekdays",
6 "type": "Route Analysis",
7 "createdAt": "2018-01-02T10:22:33Z",
8 "completedAt": "2018-01-02T11:28:22Z",
9 "state": "DONE"
10 },
11 {
12 "id": 127,
13 "name": "London A501 weekends",
14 "type": "Route Analysis",
15 "createdAt": "2018-01-02T10:18:47Z",
16 "completedAt": "2018-01-02T11:24:07Z",
17 "state": "DONE"
18 },
19 {
20 "id": 365,
21 "name": "Waterloo Bridge in London City",
22 "type": "Route Analysis",
23 "createdAt": "2018-01-05T20:18:10Z",
24 "completedAt": "2018-01-05T21:24:08Z",
25 "state": "DONE"
26 }
27 ],
28 "pageable": {
29 "sort": {
30 "sorted": true,
31 "unsorted": false,
32 "empty": false
33 },
34 "pageSize": 20,
35 "pageNumber": 0,
36 "offset": 0,
37 "paged": true,
38 "unpaged": false
39 },
40 "totalElements": 3,
41 "last": false,
42 "totalPages": 1,
43 "first": true,
44 "sort": {
45 "sorted": true,
46 "unsorted": false,
47 "empty": false
48 },
49 "numberOfElements": 20,
50 "size": 20,
51 "number": 0,
52 "empty": false
53}

Response fields - JSON

Field

Description

id
long

The job ID.

name
string

Name of the job.

type
string

Type of the job.

  • Route Analysis

  • Area Analysis

  • Traffic Density

createdAt
datetime

Job creation time. Timestamp in the format: YYYY-MM-DDTHH:mm:ss.SSSZ

completedAt
datetime

Job completion time. Timestamp in the format: YYYY-MM-DDTHH:mm:ss.SSSZ

state
string

The job state:

  • NEW

  • SCHEDULED

  • MAPMATCHING

  • MAPMATCHED

  • READING_GEOBASE

  • CALCULATIONS

  • NEED_CONFIRMATION

  • DONE

  • ERROR

  • REJECTED

  • CANCELLED

  • EXPIRED