HTTP request headers
Important notes:
- This TomTom Orbis API is in public preview.
- This API is powered by the TomTom Orbis Maps.
- See the TomTom Orbis Maps documentation for more information.
Purpose
The following table describes HTTP request headers.
These headers allow fine tuning of the service behavior to the customer needs.
HTTP request headers
Required headers
| Required headers | Description |
|---|---|
| TomTom-Api-Version | The API version of the service to call. |
| TomTom-Api-Key | An API Key valid for the requested service.
This can be omitted if the key is already provided as a query parameter for the particular service.
If the key is given both as a query parameter and as a header value, the one from the header parameter takes precedence. Using the header over the query parameter is the recommended approach, as it avoids exposing the key in URLs and is generally more secure.
Value: Your valid |
Using API Key as a header in MapLibre
- Constants and parameters enclosed in curly brackets
{}must be replaced with their values. - For the style URL please see the following Request parameters section with the required and optional parameters tables for their values.
1const map = new maplibregl.Map({2 container: 'map',3 style: "https://{baseURL}/maps/orbis/assets/styles/{assetVersion}/style.json?&apiVersion={API_Version}&map={Map}&hillshade={Hillshade}&trafficFlow={Traffic_Flow}&trafficIncidents={Traffic_Incidents}",4 transformRequest: (url, resourceType) => {5 return {6 url: url,7 headers: { 'TomTom-Api-Key': '{API_Key}'},8 }9 }10});
Optional Headers
| Optional headers | Description |
|---|---|
| Accept-Encoding | Contains the content encoding (usually a compression algorithm), that
the client is able to understand. |
| If-None-Match | It is used to specify conditions for a resource to be fetched,
allowing the server to skip sending the resource if the client already has an up-to-date version, and
identified by values provided in the Etag header. |
| Tracking-ID | Specifies an identifier for the request.
Value: |