Junction archive availability
Purpose
Junction archive availability is a REST API endpoint to query the availability period of an archive for a specified junction.
Request data
You can obtain Junction archive availability by sending a GET request, as shown in the following example.
- 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 parameter tables for their values. The generic request format is as follows.
HTTPS method: GET
https://api.tomtom.com/junction-analytics/junctions/1/archive/{junctionId}/availability/flat/daily??key={Your_API_Key}
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 |
---|---|
| The unique junction id that must be used in the request path. |
| An API Key valid for the requested service. |
Request headers
Header | Value |
---|---|
Content-Type | application/json |
Example request
The following is an example curl request:
$ curl 'https://api.tomtom.com/junction-analytics/junctions/1/archive/{junctionId}/availability/flat/daily?key={Your_API_Key}' -i -X GET \-H 'Content-Type: application/json' \
Response data
This response returns Junction archive availability.
Example response
The following JSON code block is an example response:
1{2 "from": "2021-10-12",3 "to": "2022-02-08"4}
Response fields
The following section describes all of the fields that can appear in a response.
from
(date) Date in the format of 'yyyy-MM-dd'. The first day of the archive availability period.
to
(date) Date in the format of 'yyyy-MM-dd'. The last day of the archive availability period.
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 |
404 | Not Found Example message: Junction of id 5fd8da2b84510126b9d18b0d not found. |
Error response field
Field | Description |
---|---|
| The problem description. |
Example error response
The following is an example error response:
1{2 "message": "Junction of id 5fd8da2b84510126b9d18b0d not found."3}