Generated from code
HTTP: endpoints, auth parameters and headers
The endpoints of the server, and the request parameters and headers outside the map description: authentication, URL signatures, caching and limits. Entries marked keys apply only when the server runs with API keys (WHEREBOX_AUTH=keys, the hosted service).
Endpoints#
Every GET endpoint also answers HEAD. Parameters and responses of the map and lookup endpoints are in openapi.json. The hosted service also serves the account console (sign-in, API keys, usage), which is a website, not an API.
| Endpoint | What it does | SDK method (TypeScript / Python) |
|---|---|---|
GET /v1/map |
Render a map from query parameters | Same as /v1/map.{ext}; the SDKs' url always writes the format as the extension. |
GET /v1/map.{ext} |
Render a map; the extension picks the format | url / url (builds the URL) |
POST /v1/map |
Render a map from a JSON MapSpec | render / renderrenderJson / render_json (response=json) |
GET /v1/images/{key} |
Fetch a cached image by content hash | The url that renderJson returns: a public, immutable link for <img> or any HTTP client. |
GET /v1/areas/search |
Search areas by name (with hierarchy context for disambiguation) | searchAreas / search_areas |
GET /v1/areas/{id} |
Get one area | getArea / get_area |
GET /v1/places/search |
Search named places (cities, peaks, mountain ranges…) | searchPlaces / search_places |
GET, POST, DELETE /mcp |
MCP server (Streamable HTTP) for AI agents: render maps, search areas and places | Spoken by MCP clients (Claude, @wherebox/mcp), not by the REST SDKs. |
GET /openapi.json |
OpenAPI 3.1 document of this API | For tools and code generators. |
GET /playground |
Interactive playground (a redirect to the website's playground when a site URL is configured) | Browser page. |
GET / |
Redirects to /playground |
Browser entry point. |
GET /healthz |
Liveness check | For load balancers and orchestrators. |
GET /readyz |
Readiness: database reachable, data and render versions, render queue | For load balancers and orchestrators. |
GET /metrics |
Prometheus metrics (disabled unless a metrics token is configured) | For the operator's monitoring. |
GET /.well-known/oauth-authorization-server |
OAuth authorization server metadata (RFC 8414) | For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
GET /.well-known/oauth-protected-resource/mcp |
Protected resource metadata of /mcp (RFC 9728) |
For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
GET /.well-known/oauth-protected-resource/v1 |
Protected resource metadata of /v1 (RFC 9728) |
For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
POST, OPTIONS /oauth/register |
Dynamic client registration (RFC 7591) | For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
GET, POST /oauth/authorize |
Consent page; the POST records the user's decision | For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
POST, OPTIONS /oauth/token |
Token endpoint (authorization code with PKCE, refresh token) | For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
POST, OPTIONS /oauth/revoke |
Token revocation (RFC 7009) | For OAuth clients (connected apps, MCP); the SDKs authenticate with keys. |
Query parameters#
Accepted on every /v1/map request in addition to the map parameters.