Skip to content
getgeolens.com

Get Shared Map Endpoint

GET
/maps/shared/{token}
curl --request GET \
--url https://example.com/maps/shared/example

Get a shared map by token. Optionally authenticated for non-public layers.

SEC-S08 (Phase 1062-05): emits Content-Security-Policy: frame-ancestors 'self' [<allowed_origins>...] on the response, derived from the active EmbedToken for this map. When no EmbedToken exists or allowed_origins is empty, defaults to frame-ancestors 'self'. The SecurityHeadersMiddleware respects this route-level CSP and skips emitting X-Frame-Options: DENY.

fix(#394) SH-01/B-023: accepts X-Embed-Token so embed viewers get the layers the token’s scope authorizes (SEC-022 capability posture).

token
required
Token
string
X-Embed-Token
Any of:
string

Optional embed token — includes its scoped dataset layers when valid for this map.

Successful Response

Media type application/json
SharedMapResponse
object
name
required
Name
string
description
required
Any of:
string
center_lng
required
Center Lng
number
center_lat
required
Center Lat
number
zoom
required
Zoom
number
bearing
required
Bearing
number
pitch
required
Pitch
number
basemap_style
required
Basemap Style
string
show_basemap_labels
Show Basemap Labels
boolean
default: true
basemap_config
Any of:
BasemapConfig
object
label_mode
BasemapLabelMode

Basemap label prominence.

string
default: full
Allowed values: full subtle hidden
road_visibility
BasemapSublayerVisibility

Road and transit sublayer visibility where supported.

string
default: full
Allowed values: full subtle hidden
boundary_visibility
BasemapSublayerVisibility

Administrative boundary sublayer visibility where supported.

string
default: full
Allowed values: full subtle hidden
building_visibility
Building Visibility

Whether supported building/3D building basemap layers are shown.

boolean
default: true
land_water_tone
BasemapLandWaterTone

Land and water color treatment where supported.

string
default: default
Allowed values: default muted contrast monochrome
relief_contrast
Any of:
BasemapReliefContrast
string
Allowed values: soft standard strong
opacity
Opacity

Master basemap opacity 0.0-1.0

number
default: 1 <= 1
background_color
Any of:
string
sublayer_overrides
Any of:
object
key
additional properties
SublayerOverride

Per-sublayer style override for a single basemap sublayer.

All fields are nullable — a None value means “use the basemap default”. Only #RRGGBB hex strings are accepted for color fields; None means the basemap default color is preserved. Numeric ranges are clamped at validation time (Pydantic ge/le constraints).

The key set of BasemapConfig.sublayer_overrides is treated as opaque (forward-compatible with future sublayer IDs) — see CONTEXT.md D-01.

Security: extra=“forbid” locks the D-14 scope guardrail: unknown style axes such as dash patterns, line caps, halo blur, and text-font are rejected at validation time (T-1059A-03).

object
stroke_color
Any of:
string
stroke_width
Any of:
number
<= 20
casing_color
Any of:
string
casing_width
Any of:
number
<= 20
min_zoom
Any of:
number
<= 24
max_zoom
Any of:
number
<= 24
opacity
Any of:
number
<= 1
basemap_position
Any of:
BasemapPosition

Whether the basemap renders below (‘bottom’, default) or above (‘top’) data layers.

string
Allowed values: bottom top
projection
Any of:
BasemapProjection

Map projection. ‘mercator’ (default) or experimental ‘globe’.

string
Allowed values: mercator globe
terrain_config
Any of:
TerrainConfig
object
enabled
Enabled
boolean
source_dataset_id
Any of:
string format: uuid
exaggeration
Exaggeration
number
default: 1 <= 3
has_non_public_layers
Has Non Public Layers
boolean
legend_title
Any of:
string
layers
required
Layers
Array<object>
SharedLayerResponse
object
id
required
Id
string
dataset_id
required
Dataset Id
string
dataset_name
required
Dataset Name
string
display_name
Any of:
string
table_name
required
Table Name
string
geometry_type
required
Any of:
string
column_info
Any of:
Array<object>
object
key
additional properties
any
sort_order
required
Sort Order
integer
visible
required
Visible
boolean
opacity
required
Opacity
number
paint
required
Paint
object
key
additional properties
any
layout
required
Layout
object
key
additional properties
any
layer_type
Layer Type
string
default: vector_geolens
dataset_record_type
Any of:
string
filter
Any of:
Array
label_config
Any of:
object
key
additional properties
any
popup_config
Any of:
PopupConfig

Per-layer popup configuration: enable/disable + custom title template

  • ordered visible-fields allowlist. Persisted as JSONB on map_layers.
object
enabled
required
Enabled
boolean
expression
Any of:
string
<= 500 characters
visible_fields
Any of:
Array<string>
<= 100 items
style_config
Any of:
object
key
additional properties
any
show_in_legend
Show In Legend
boolean
default: true
tile_url
required
Tile Url
string
is_dem
Any of:
boolean
dem_vertical_units
Any of:
string
is_3d
Any of:
boolean
feature_count
Any of:
integer
tile_version
Any of:
integer
dataset_attribution
Any of:
string
Example
{
"show_basemap_labels": true,
"basemap_config": {
"label_mode": "full",
"road_visibility": "full",
"boundary_visibility": "full",
"building_visibility": true,
"land_water_tone": "default",
"relief_contrast": "soft",
"opacity": 1,
"basemap_position": "bottom",
"projection": "mercator"
},
"terrain_config": {
"enabled": false,
"exaggeration": 1
},
"has_non_public_layers": false,
"layers": [
{
"layer_type": "vector_geolens",
"show_in_legend": true
}
]
}

Bad request — invalid payload

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Unauthorized — missing or invalid credentials

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Forbidden — caller lacks access to this resource

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Not found

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Conflict — resource state prevents the operation

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Gone — the resource existed but is no longer available

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Validation error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Too many requests — retry after the advertised interval

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}
Retry-After
integer

Seconds until the request may be retried

Internal server error

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}

Service unavailable — the database could not serve the request

Media type application/problem+json
ProblemDetail
object
type
Type
string
default: about:blank
title
required
Title
string
status
required
Status
integer
detail
required
Any of:
string
Example
{
"detail": "Dataset not found",
"status": 404,
"title": "Not Found",
"type": "about:blank"
}