Skip to content
getgeolens.com

Upload Thumbnail

PUT
/maps/{map_id}/thumbnail/
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.

map_id
required
Map Id
string format: uuid
Media type application/json
ThumbnailUploadRequest

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 is data: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
data_uri
required
Data Uri
string
>= 22 characters <= 100000 characters
Example generated
{
"data_uri": "example"
}

Successful Response

Bad request — invalid payload

Unauthorized — missing or invalid credentials

Forbidden — caller lacks write access

Not found

Conflict — resource state prevents the operation

Validation error

Internal server error