# Map details

This API endpoint retrieves comprehensive details of a VPS map by providing its unique map code in the URL path along with a bearer token for authentication, returning complete information including the map's status, geographic location, spatial metrics (floor areas, elevations, capture points), storage usage, etc.

## Get a VPS map by code

> Retrieves detailed information about a specific VPS map using its unique map code.\
> Returns comprehensive map data including status, coordinates, spatial metrics, and offline bundle information.<br>

```json
{"openapi":"3.0.0","info":{"title":"Get VPS Map API","version":"2.0.0"},"servers":[{"url":"https://api.multiset.ai/v1","description":"Production server"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Standard Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\""}},"schemas":{"VPSMapResponse":{"type":"object","properties":{"_id":{"type":"string","description":"Unique MongoDB ObjectId for the VPS map"},"accountId":{"type":"string","description":"Account ID that owns this VPS map"},"mapName":{"type":"string","description":"Human-readable name of the VPS map"},"mapCode":{"type":"string","description":"Unique code identifier for the VPS map"},"status":{"type":"string","enum":["uploading","pending","active","failed"],"description":"Current processing status of the map:\n- uploading: File upload in progress\n- pending: Processing queued or in progress\n- active: Map is ready for use\n- failed: Processing failed\n"},"location":{"type":"object","description":"GeoJSON Point object representing the map's geographic location","properties":{"type":{"type":"string","enum":["Point"],"description":"GeoJSON geometry type"},"coordinates":{"type":"array","description":"GeoJSON coordinates array [longitude, latitude, altitude]","items":{"type":"number"},"minItems":3,"maxItems":3}},"required":["type","coordinates"]},"heading":{"type":"number","minimum":0,"maximum":360,"description":"Map heading/orientation in degrees (0-360)","nullable":true},"storage":{"type":"number","description":"Storage size used by the map in bytes"},"thumbnail":{"type":"string","format":"uri","description":"URL to the map thumbnail image","nullable":true},"offlineBundleStatus":{"type":"string","enum":["processing","failed","active"],"description":"Status of the offline bundle generation:\n- processing: Bundle creation in progress\n- failed: Bundle creation failed\n- active: Bundle is ready for download\n","nullable":true},"offlineBundle":{"type":"string","format":"uri","description":"URL to download the offline bundle for this map","nullable":true},"spatialMetrics":{"type":"object","description":"Detailed spatial analysis metrics for the map","nullable":true,"properties":{"total_area_sqm":{"type":"number","description":"Total covered area in square meters across all floors"},"num_floors":{"type":"integer","description":"Number of floors detected in the map","minimum":0},"floors":{"type":"array","description":"Detailed metrics for each floor","items":{"type":"object","properties":{"floor_id":{"type":"integer","description":"Floor identifier (0-based index)"},"elevation":{"type":"number","description":"Floor elevation in meters relative to ground level"},"area_sqm":{"type":"number","description":"Floor area in square meters"},"num_captures":{"type":"integer","description":"Number of capture points on this floor","minimum":0},"bounds":{"type":"object","description":"2D bounding box for the floor in map coordinates","properties":{"min":{"type":"array","description":"Minimum X and Y coordinates [x_min, y_min]","items":{"type":"number"},"minItems":2,"maxItems":2},"max":{"type":"array","description":"Maximum X and Y coordinates [x_max, y_max]","items":{"type":"number"},"minItems":2,"maxItems":2}},"required":["min","max"]}},"required":["floor_id","elevation","area_sqm","num_captures","bounds"]}}},"required":["total_area_sqm","num_floors","floors"]},"createdAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the map was created"},"updatedAt":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when the map was last updated"}},"required":["_id","accountId","mapName","mapCode","status","location","storage","createdAt","updatedAt"]},"Error":{"type":"object","properties":{"message":{"type":"string","description":"Error message detailing what went wrong"}},"required":["message"]}}},"paths":{"/vps/map/{mapCode}":{"get":{"summary":"Get a VPS map by code","description":"Retrieves detailed information about a specific VPS map using its unique map code.\nReturns comprehensive map data including status, coordinates, spatial metrics, and offline bundle information.\n","tags":["VPS"],"parameters":[{"in":"path","name":"mapCode","required":true,"schema":{"type":"string","pattern":"^MAP_[A-Z0-9]+$"},"description":"Unique map code identifier for the VPS map"}],"responses":{"200":{"description":"VPS map retrieved successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VPSMapResponse"}}}},"400":{"description":"Bad request - Invalid map code format","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Unauthorized - Missing or invalid token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Map not found - The specified map code does not exist","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

### GET All VPS maps for an account&#x20;

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2FFUFrqIIPxttIupFL0zrW%2Fopenapi-maplist.yaml?alt=media&token=344d2755-ecd4-4f63-8b1f-44774238a4bc>" path="/vps/map" method="get" %}
[openapi-maplist.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2FFUFrqIIPxttIupFL0zrW%2Fopenapi-maplist.yaml?alt=media\&token=344d2755-ecd4-4f63-8b1f-44774238a4bc)
{% endopenapi %}

{% openapi src="<https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fh5JvlrsX78bpolBaI0ec%2Fmapset-api-openapi.yaml?alt=media&token=25af37b3-58e0-4ef8-b053-5d362183c412>" path="/vps/map-set" method="get" %}
[mapset-api-openapi.yaml](https://3163433004-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FokTDI7QVY04Zvb1pQ8Ry%2Fuploads%2Fh5JvlrsX78bpolBaI0ec%2Fmapset-api-openapi.yaml?alt=media\&token=25af37b3-58e0-4ef8-b053-5d362183c412)
{% endopenapi %}
