Maps

Import Map Style Endpoint

Import a MapLibre style JSON document into a new GeoLens map.

The request body is a typed Pydantic model rather than a bare dict. MapStyleImportRequest mirrors the MapLibre style spec top-level keys with extra="allow", so existing payloads keep working byte-identically while the OpenAPI schema gains a named class and the auto-generated SDKs stop emitting an opaque Mapping[str, Any] request type.

post/maps/import

Request

  • The document declares no server URL.
  • Auth: one of:
    • OAuth 2 (password, token URL /api/auth/login)
    • API key in header X-Api-Key
    • API key in query parameter api_key

Request body

versioninteger nullable

MapLibre style version (always 8 in current spec)

namestring nullable

Display name for the imported map

metadataobject nullable

Free-form metadata bag (used by GeoLens for center/zoom/basemap hints)

centernumber[] nullable

[longitude, latitude] map center

zoomnumber nullable
bearingnumber nullable
pitchnumber nullable
sourcesobject nullable

MapLibre sources object keyed by source id

glyphsstring nullable
terrainobject nullable

MapLibre terrain config (source + exaggeration)

layersobject[] nullable

MapLibre layer specifications

Response

Successful Response

Changes

No recorded changes to this operation across all 50 revisions of this API.