{"openapi": "3.1.0", "info": {"title": "Mundi.ai Developer API", "summary": "Mundi.ai has a developer API for creating, editing, and sharing maps and map data.", "description": "\nThese are the automatically generated API docs for Mundi's developer API. Mundi is a customizable,\nopen source web GIS and can be operated via API just like it can be used as a web app. You can programatically\ncreate maps, upload geospatial data (vectors, raster, point clouds), and share map links or embed maps\nin other web applications.\n\nMundi's API is both available as a [hosted cloud service](https://mundi.ai) or\n[a self-hosted set of Docker images](https://github.com/buntinglabs/mundi.ai), open source under the AGPLv3 license.\n\nMundi.ai is below the v1.0.0 release. Backwards compatibility should be achieved by pinning Mundi to a specific\ncommit when self-hosting. In the near future, versioned API routes will guarantee backwards compatibility with\nsemver.\n", "termsOfService": "https://buntinglabs.com/legal/terms", "contact": {"name": "Bunting Labs", "url": "https://buntinglabs.com/"}, "version": "0.0.1"}, "paths": {"/api/maps/create": {"post": {"tags": ["Maps"], "summary": "Create a map project", "description": "Creates a new map project.\n\nThis endpoint returns both a map id `id` and project id `project_id`. Projects\ncan contain multiple map versions (\"maps\"), unattached layer data, and details\na history of changes to the project. Each edit will create a new map version.\n\nAccepts both `title` and `description` in the request body.", "operationId": "create_map", "parameters": [{"name": "request", "in": "query", "required": false, "schema": {"title": "Request"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MapCreateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MapResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/maps/{original_map_id}/layers": {"post": {"tags": ["Maps"], "summary": "Upload file as layer", "description": "Uploads spatial data, processes it, and adds it as a layer to the specified map.\n\nSupported formats:\n- Vector: Shapefile (as .zip), GeoJSON, GeoPackage, FlatGeobuf\n- Raster: GeoTIFF, DEM\n- [Point cloud](/guides/visualizing-point-clouds-las-laz/): LAZ, LAS\n\nOnce uploaded, Mundi transforms, reprojects, styles, and creates optimized formats for display in the browser.\nVector data is converted to [PMTiles](https://docs.protomaps.com/pmtiles/) while raster data is converted to\n[cloud-optimized GeoTIFFs](https://cogeo.org/). Point cloud data is compressed to LAZ 1.3.\n\nReturns the new layer details including its unique layer ID. The layer can optionally not be added to the map,\nbut will be faster to add to an existing map later.", "operationId": "upload_layer_to_map", "parameters": [{"name": "original_map_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Original Map Id"}}, {"name": "request", "in": "query", "required": false, "schema": {"title": "Request"}}], "requestBody": {"required": true, "content": {"multipart/form-data": {"schema": {"$ref": "#/components/schemas/Body_upload_layer_to_map"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LayerUploadResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}}, "components": {"schemas": {"Body_upload_layer_to_map": {"properties": {"file": {"type": "string", "format": "binary", "title": "File"}, "layer_name": {"type": "string", "title": "Layer Name"}, "add_layer_to_map": {"type": "boolean", "title": "Add Layer To Map", "default": true}}, "type": "object", "required": ["file"], "title": "Body_upload_layer_to_map"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "LayerUploadResponse": {"properties": {"dag_child_map_id": {"type": "string", "title": "Dag Child Map Id", "description": "The ID of the new map created that contains the changes. Use this ID for further operations on the modified map."}, "dag_parent_map_id": {"type": "string", "title": "Dag Parent Map Id", "description": "The ID of the original map which was copied to create the new map."}, "id": {"type": "string", "title": "Id", "description": "Unique identifier for the newly uploaded layer"}, "name": {"type": "string", "title": "Name", "description": "Display name of the layer as it appears in the map"}, "type": {"type": "string", "title": "Type", "description": "Layer type (vector, raster, or point_cloud)"}, "url": {"type": "string", "title": "Url", "description": "Direct URL to access the layer data (PMTiles for vector, COG for raster)"}, "message": {"type": "string", "title": "Message", "description": "Status message confirming successful upload", "default": "Layer added successfully"}}, "type": "object", "required": ["dag_child_map_id", "dag_parent_map_id", "id", "name", "type", "url"], "title": "LayerUploadResponse"}, "MapCreateRequest": {"properties": {"title": {"type": "string", "title": "Title", "description": "Display name for the new map", "default": "Untitled Map"}, "description": {"type": "string", "title": "Description", "description": "Optional description of the map's purpose or contents", "default": ""}}, "type": "object", "title": "MapCreateRequest"}, "MapResponse": {"properties": {"id": {"type": "string", "title": "Id", "description": "Unique identifier for the map"}, "project_id": {"type": "string", "title": "Project Id", "description": "ID of the project containing this map. Projects can contain multiple related maps."}, "title": {"type": "string", "title": "Title", "description": "Display name of the map"}, "description": {"type": "string", "title": "Description", "description": "Optional description of the map's purpose or contents"}, "created_on": {"type": "string", "title": "Created On", "description": "ISO timestamp when the map was created"}, "last_edited": {"type": "string", "title": "Last Edited", "description": "ISO timestamp when the map was last modified"}}, "type": "object", "required": ["id", "project_id", "title", "description", "created_on", "last_edited"], "title": "MapResponse"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}}}}