List sprites

Service version: 1
Last edit: 2024.05.29
TomTom Orbis Maps

Important notes:

  • Orbis Maps Assets API is currently in public preview.
  • This API is powered by the TomTom Orbis Maps.
  • See the TomTom Orbis Maps documentation for more information on Orbis Maps.
  • See the Orbis Maps Assets API Migration page page for information on how to migrate and use the new Orbis Maps Assets API.
  • Use of the Orbis Maps Assets API requires an API Key with access rights to Assets API and, depending on the requested assets, Map Display API and/or Traffic API.

Purpose

The list sprites endpoint functionality displays the available sprites for users, enabling them to select the required one.

  • The service presents an array of sprites accompanied by URLs to services that facilitate fetching them.
  • Subsequently, users can proceed to fetch sprite.

Request data

HTTPS method: GET

  • 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 parameters tables for their values. The generic request format is as follows.
get
Generic URL request format
https://{baseURL}/maps/orbis/assets/sprites/{assetVersion}?key={Your_API_Key}&apiVersion={API_Version}&assetCategories[]={asset_category}
get
URL request example
https://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0?key={Your_API_Key}&apiVersion=1&assetCategories[]={asset_category}
get
URL request example - asset version with wildcards
https://api.tomtom.com/maps/orbis/assets/sprites/0.*?key={Your_API_Key}&apiVersion=1&assetCategories[]={asset_category}
get
curl command request example
curl 'https://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0?key={Your_API_Key}&apiVersion=1&assetCategories[]={asset_category}'
get
curl command request example - asset version with wildcards
curl 'https://api.tomtom.com/maps/orbis/assets/sprites/0.*?key={Your_API_Key}&apiVersion=1&assetCategories[]={asset_category}'

Request parameters

The following table describes the parameters that can be used in a request.

  • Required parameters must be used or the call will fail.
  • Parameters and values are case-sensitive.
  • Optional parameters may be used.

Required parameters

Description

baseURL
string

The base URL for calling TomTom services.
Value: api.tomtom.com: The default global API endpoint.

assetVersion
string

The chosen version of the asset.
Versions with wildcards can be used; more information is available at Assets versioning.
Value: string

apiVersion
string

The API version of the service to call.
This can be omitted if the version is already provided as a request header for the particular service, see HTTP request headers.
If the version is given both as a query parameter and as a header value, the one from the query parameter takes precedence.
Value: The current value is 1.

key
string

An API Key valid for the requested service.
Value: Your valid API Key.

Optional parameters

Description

assetCategories[]
array

  • A filter for categories of particular asset types to be returned in the result.
  • The parameter can be provided multiple times, in which case multiple categories are listed.
  • If this parameter is not provided, all of the categories are returned.
  • The URLs returned in a response lead only to a simple sprite. If a user wants to have a sprite that is a combination of multiple available categories, the fetch query should be modified to allow sprite merging. See more information at Fetch sprite.

Values:

  • map
  • trafficFlow
  • trafficIncidents

Request headers

HTTP request headers are common in the Assets API service. For details, see HTTP request headers.

Response data

Successful response

For a single request, the service returns its response body in JSON format.

Response schema

Response body schema
1{
2 "assets": [
3 {
4 "asset_category": "string",
5 "name": "string",
6 "resolutions": [
7 {
8 "json": {
9 "url": "string"
10 },
11 "png": {
12 "url": "string"
13 },
14 "resolution": "string"
15 }
16 ]
17 }
18 ]
19}

Response field structure

The following table describes JSON element fields that can appear in a response.

Field

Description

asset_category
string

The asset category. It can be one of the following predefined values:

  • map
  • trafficFlow
  • trafficIncidents

name
string

The name of the sprite.

url
string

The URL that can be used to fetch the asset.

Example

Response example
1{
2 "assets": [
3 {
4 "asset_category": "map",
5 "name": "basic_street-light",
6 "resolutions": [
7 {
8 "json": {
9 "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite.json?apiVersion=1&map=basic_street-light&key={api_key}"
10 },
11 "png": {
12 "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite.png?apiVersion=1&map=basic_street-light&key={api_key}"
13 },
14 "resolution": "@1x"
15 },
16 {
17 "json": {
18 "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite@2x.json?key={api_key}&apiVersion=1&map=basic_street-light&key={api_key}"
19 },
20 "png": {
21 "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite@2x.png?key={api_key}&apiVersion=1&map=basic_street-light&key={api_key}"
22 },
23 "resolution": "@2x"
24 }
25 ]
26 }
27 ]
28}

Response codes

HTTP response codes are common in the Assets API service. For details, see HTTP response codes.

Response headers

HTTP response headers are common in the Assets API service. For details, see HTTP response headers.