Skip to content
getgeolens.com

Get Tile Tokens Batch

POST
/tiles/tokens/
curl --request POST \
--url https://example.com/api/tiles/tokens/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "dataset_ids": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Batch-generate tile tokens for up to 50 datasets in one request.

Optimization for multi-layer maps: a 20-layer builder map previously fired 20 parallel GET /token/{id}/ requests (20 HTTP + 20 RBAC + 20 HMAC signatures). This endpoint does the same work in a single round trip with one DB query for dataset metadata (PERF-N5).

Per-dataset errors (404, 403) do not fail the batch — instead the response maps the offending dataset_id to {"error": "..."}. Clients should check each entry for the error key.

Media type application/json
TileTokenBatchRequest

Batch request for tile tokens — accepts up to 50 dataset IDs.

object
dataset_ids
required
Dataset Ids

Dataset IDs to generate tokens for. Must be unique; duplicates deduplicated server-side.

Array<string>
>= 1 items <= 50 items
Example generated
{
"dataset_ids": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

Successful Response

Media type application/json
TileTokenBatchResponse

Batch response mapping dataset_id (string) to token or error.

Each entry is either a VectorTileToken, a RasterTileToken, or a {"error": "..."} object describing why the token could not be generated (404 dataset, 403 forbidden, etc.). The batch call itself succeeds even if individual datasets fail — clients should check each entry for the error key.

object
tokens
required
Tokens
object
key
additional properties
Any of:
VectorTileToken
object
kind
required
Kind
string
Allowed value: vector
sig
required
Sig
string
exp
required
Exp
integer
scope
required
Scope
string
expires_in
required
Expires In
integer
Example
{
"tokens": {
"additionalProperty": {
"kind": "vector"
}
}
}

Validation Error

Media type application/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Example generated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example",
"input": "example",
"ctx": {}
}
]
}