Junction archive availability

Service version: v1
Last edit: 2024.01.24

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

post
URL request example
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

junctionId


string

The unique junction id that must be used in the request path.

key


string

An API Key valid for the requested service.


Value: Your valid API Key.

Request headers

Header

Value

Content-Type

application/json

Example request

The following is an example curl request:

get
curl command request example
$ 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. The following table describes all of the fields that can appear in a response.

Example response

The following JSON code block is an example response:

Response body - JSON
1{
2 "from": "2021-10-12",
3 "to": "2022-02-08"
4}

Response fields

The following table describes all of the fields that can appear in a response.

Field

Description

from


date

Date in format 'yyyy-MM-dd'. The first day of the archive availability period.

to


date

Date in format '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 messages:

  • Junction of id 5fd8da2b84510126b9d18b0d not found.

Error response field

Field

Description

message


string

The problem description.

Example error response

The following is an example error response:

Response error message - JSON
1{
2 "message": "Junction of id 5fd8da2b84510126b9d18b0d not found."
3}