Upload Thumbnail
const url = 'https://example.com/api/maps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/thumbnail/';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"data_uri":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://example.com/api/maps/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/thumbnail/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "data_uri": "example" }'Upload a base64 thumbnail for a map.
Accepts a data:image/ URI, decodes the base64 payload, writes the image bytes to the configured storage provider, and stores the storage key.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Request Body required
Section titled “Request Body required ”JSON body for PUT /maps/{map_id}/thumbnail/.
Replaces a previous text/plain body shape that openapi-python-client could not parse (would silently skip endpoint). See Phase 254 / SDK-01.
Phase 254 IN-02: data_uri carries explicit length bounds so
Pydantic surfaces a 422 with field-level detail (better SDK-consumer
UX than a generic 400) and the OpenAPI schema documents the limit.
The router still validates the data:image/ prefix and base64
encoding; those are content-shape checks Pydantic length cannot
cover.
min_length=22: a minimal valid prefix isdata:image/x;base64,(20 chars) plus at least one payload byte (e.g.,data:image/x;base64,XX). Use 22 as a pragmatic floor that rejects empty / clearly-malformed values without false-positives on the smallest legitimate payloads.max_length=100_000: matches the previous router-side 100KB cap.
object
Example generated
{ "data_uri": "example"}Responses
Section titled “ Responses ”Successful Response
Bad request — invalid payload
object
Example
{ "type": "about:blank"}Unauthorized — missing or invalid credentials
object
Example
{ "type": "about:blank"}Forbidden — caller lacks write access
object
Example
{ "type": "about:blank"}Not found
object
Example
{ "type": "about:blank"}Conflict — resource state prevents the operation
object
Example
{ "type": "about:blank"}Validation error
object
Example
{ "type": "about:blank"}Internal server error
object
Example
{ "type": "about:blank"}