Import an ArcGIS web map
const url = 'https://example.com/api/maps/import/arcgis-webmap/';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"webmap":{},"name":"example","title":"example","visibility":"private","basemap_map":{"additionalProperty":"example"},"dataset_matches":{"additionalProperty":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"},"dry_run":false}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/maps/import/arcgis-webmap/ \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "webmap": {}, "name": "example", "title": "example", "visibility": "private", "basemap_map": { "additionalProperty": "example" }, "dataset_matches": { "additionalProperty": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }, "dry_run": false }'Import an ArcGIS web map as a new GeoLens map.
Translates the web map’s operational layers, renderers, labels, popups and
scale ranges, and reports everything it could not carry over in
loss_report. Only layers named in dataset_matches are imported, and
every matched dataset must be readable by the caller (404 otherwise). The
report is also written to the map’s private notes. With dry_run nothing
is created and map is null.
Authorizations
Section titled “ Authorizations ”Request Bodyrequired
Section titled “ Request Bodyrequired ”object
The web map item data JSON, at most 1 MB serialized.
object
Visibility of the new map: private, internal or public. A map becomes restricted by sharing it with groups afterwards.
Esri basemap URL or style URL (the first base map layer’s url or styleUrl) to a GeoLens basemap id. An unmapped basemap falls back to the first enabled basemap and is reported.
object
Operational layer id to GeoLens dataset id. Every dataset must be one the caller can read, or the request is refused with 404. A layer with no entry is not imported and is listed as unmatched.
object
Return the translation without creating a map.
Responses
Section titled “ Responses ”Successful Response
object
object
Whether viewers offer each layer’s attribute table. Embed tokens for the map may read a layer’s rows only while it is on; the columns they may read come from each dataset’s tile column allowlist.
object
Basemap label prominence.
Road and transit sublayer visibility where supported.
Administrative boundary sublayer visibility where supported.
Whether supported building/3D building basemap layers are shown.
Land and water color treatment where supported.
Master basemap opacity 0.0-1.0
object
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).
Security: extra=“forbid” locks the scope guardrail: unknown style axes such as dash patterns, line caps, halo blur, and text-font are rejected at validation time.
object
Whether the basemap renders below (‘bottom’, default) or above (‘top’) data layers.
Map projection. ‘mercator’ (default) or experimental ‘globe’.
object
Where the panel sits beside the map: right or bottom. On narrow screens it is always below the map.
Show the widgets across the full page and don’t mount the map. Widgets scoped to the map view fall back to the whole layer.
The page’s colours: light, dark, or follow the reader’s setting.
The widgets on layers this response shows, in panel order.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
2 when the config sets any reference option, else 1. A 1 that sets one is refused.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
category: one bar per value of column. by_feature: one bar per feature, labelled by label_column, sized by value_column. by_fields: one bar per name in fields, each showing stat of that field. date: column grouped by date_bucket.
by_feature: bar order by value.
by_fields: the numeric fields to chart, one bar each.
category: colour bars as the layer does when column is its style column.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
The column whose values become slices.
Slices beyond this many are merged into Other.
Colour slices as the layer does when column is its style column.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
object
Made by the client and stable across saves.
A layer of the host’s map.
Summarize the whole layer, or only what the map view shows.
object
Who may read a map. A response names restricted only to a client
that sends X-GeoLens-Map-Visibility: restricted; any other client
reads a restricted map as private.
object
object
object
object
Per-layer popup configuration: enable/disable + custom title template
- ordered visible-fields allowlist. Persisted as JSONB on map_layers.
object
object
Unique group identifier.
Group name.
An accent colour, a logo and a font family for reader-facing pages.
The frontend applies these as theme tokens only. A font is named, never fetched: the operator ships the font file, since the CSP allows no remote fonts.
The translated layers, in draw order.
object
Draw order (lower draws first)
Layer opacity 0.0-1.0
Per-layer popup configuration: enable/disable + custom title template
- ordered visible-fields allowlist. Persisted as JSONB on map_layers.
object
Whether to include in the map legend
Operational layer id to the id of the map layer created for it. Layers that were not imported are absent; see loss_report. Empty on a dry run.
object
object
object
JSON path of the web map part that was not carried over.
Stable code for the kind of loss.
Free text; not localized.
Item count per kind.
object
object
no_match or invalid.
The operational layer id each entry of layers was translated from, in the same order.
Example
{ "map": { "show_attribute_table": 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 }, "dashboard_config": { "panel": "right", "map_hidden": false, "theme": "follow", "widgets": [ { "type": "markdown", "v": 1 } ] }, "visibility": "private", "layers": [ { "layer_type": "vector_geolens", "show_in_legend": true } ] }, "layers": [ { "sort_order": 0, "visible": true, "opacity": 1, "show_in_legend": true } ], "loss_report": { "items": [ { "detail": "" } ] }}Bad request — invalid payload
Unauthorized — missing or invalid credentials
Forbidden — caller lacks write access
Not found
Conflict — resource state prevents the operation
Validation error
Too many requests — retry after the advertised interval
Headers
Section titled “ Headers ”Seconds until the request may be retried
Internal server error
Service unavailable — the database could not serve the request