Generate Raw Archive
Important Note Explore ready-to-use traffic reports and data visualizations immediately by signing up for a 30-day free trial on the MOVE Portal. Once registered, you'll receive an API key to start using the Traffic Analytics APIs right away. Alternatively, you may contact our Sales team for a tailored solution.
Purpose
The Generate Raw Archive endpoint allows you to create a raw archive generation task for selected junctions within a specified date range.
Request data
You can generate a raw archive by sending a POST
request.
HTTPS method: POST
https://api.tomtom.com/junction-analytics/v1/archive/raw-data/tasks/generate?key={Your_API_Key}
POST request body example
1{2 "junctionIds": ["65268ff77cd5d952a185b9b5", "65268ff77cd5d952a185b9b6"],3 "startDay": "2024-08-01",4 "endDay": "2025-08-01"5}
Request parameters
The following table shows the query parameters:
- Required parameters must be used or the call will fail.
- Optional parameters may be used.
Required parameters | Description |
---|---|
| An API Key valid for the requested service. Value: Your valid API Key. |
Post request body fields
Field | Type | Description |
---|---|---|
junctionIds | array | List of junction IDs for which the raw archive generation task is created. |
startDay | date | Start date of the archive generation task in the format YYYY-MM-DD . This is the first day for which the raw archive will be generated. |
endDay | date | End date of the archive generation task in the format YYYY-MM-DD . This is the last day for which the raw archive will be generated. |
Request headers
Header | Value |
---|---|
Content-Type | application/json |
Example request
The following is an example curl request to generate a raw archive for specific junction IDs and date range:
1$ curl 'https://api.tomtom.com/junction-analytics/v1/archive/raw-data/tasks/generate?key={Your_API_Key}' -i -H 'Content-Type: application/json' -X POST -d '2{3 "junctionIds": ["65268ff77cd5d952a185b9b5", "65268ff77cd5d952a185b9b6"],4 "startDay": "2024-08-01",5 "endDay": "2025-08-01"6}'
Response data
This response returns the ID of the raw archive generation task.
Response body example
1{2 "id": "65268ff77cd5d952a185b9b7",3 "isSuccess": true,4 "triggeredJunctions": ["65268ff77cd5d952a185b9b5"],5 "notTriggeredJunctions": {6 "FAILED_REASON_1": ["65268ff77cd5d952a185b9b6"]7 }8}
Response fields
The following section describes all of the fields that can appear in a response.
id
(string) - Unique identifier for the raw archive generation task. This ID can be used to check the status of the task later.
isSuccess
(boolean) - Indicates whether the request was successful.
triggeredJunctions
(array) - List of junction IDs for which the raw archive generation task was successfully triggered.
notTriggeredJunctions
(object) - Contains junction IDs that were not triggered, along with the reason for failure. The keys represent the failure reasons, and the values are arrays of junction IDs.
Errors
The system generates an error response if there is an error in the supplied parameters or any other internal problem. This response is generated in the requested format.
Error response codes
The following table shows the HTTP error response codes.
Code | Description |
---|---|
401 | Unauthorized |
403 | Forbidden |
422 | Unprocessable Entity |
Error response field
Field | Description |
---|---|
| The problem description. |
Example error response
The following is an example error response for Unprocessable Entity:
1{2 "id": "65268ff77cd5d952a185b9b7",3 "isSuccess": false,4 "triggeredJunctions": ["65268ff77cd5d952a185b9b5"],5 "notTriggeredJunctions": {6 "FAILED_REASON_1": ["65268ff77cd5d952a185b9b6"]7 }8}