List sprites
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.
https://{baseURL}/maps/orbis/assets/sprites/{assetVersion}?key={Your_API_Key}&apiVersion={API_Version}&assetCategories={category},{category}https://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0?key={Your_API_Key}&apiVersion=1&assetCategories={category},{category}https://api.tomtom.com/maps/orbis/assets/sprites/0.*?key={Your_API_Key}&apiVersion=1&assetCategories={category},{category}curl 'https://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0?key={Your_API_Key}&apiVersion=1&assetCategories={category},{category}'curl 'https://api.tomtom.com/maps/orbis/assets/sprites/0.*?key={Your_API_Key}&apiVersion=1&assetCategories={category},{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 |
|---|---|
| The base URL for calling TomTom services. |
| The chosen version of the asset. |
| The API version of the service to call. |
| An API Key valid for the requested service. |
| Optional parameters | Description |
|---|---|
|
Values:
|
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
{ "assets": [ { "category": "string", "name": "string", "resolutions": [ { "json": { "url": "string" }, "png": { "url": "string" }, "resolution": "string" } ] } ]}Response field structure
The following table describes JSON element fields that can appear in a response.
| Field | Description |
|---|---|
| The asset category. It can be one of the following predefined values:
|
| The name of the sprite. |
| The URL that can be used to fetch the asset. |
Example
{ "assets": [ { "category": "map", "name": "basic_street-light", "resolutions": [ { "json": { "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite.json?apiVersion=1&map=basic_street-light&key={api_key}" }, "png": { "url": "http://api.tomtom.com/maps/orbis/assets/sprites/0.0.0-0/sprite.png?apiVersion=1&map=basic_street-light&key={api_key}" }, "resolution": "@1x" }, { "json": { "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}" }, "png": { "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}" }, "resolution": "@2x" } ] } ]}Error response
Error response field structure
The following table describes JSON element fields that can appear in an error response.
| Field | Description |
|---|---|
| Main object of the error response. |
| One of a server-defined set of error codes. |
| A human-readable description of the error code. |
Example
{ "detailedError" : { "code" : "BAD_REQUEST", "message" : "Invalid format of the api version." }}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 .