# See what your own box is serving, on one page

`GET /status` is a read-only view of a MapMap deployment: the build and commit it runs, which routing backend answers, how long it has been up, every territory it serves with the date of the OSM extract behind it, the elevation sources the operator declared, which optional features the environment switched on, how many API keys are live and how many metered units the box has recorded today. Ask for it from a browser and you get a self-contained page with no external assets and no JavaScript, so it renders on an air-gapped machine.

## Why does a self-hosted box need its own status page?

Because the question an operator asks is not "is it up". It is "which of my three boxes is serving the July extract". A health probe cannot answer that, and until this shipped the answer lived in whichever shell history had the last `docker compose` command in it.

The two surfaces are deliberately different. `/health` is the probe a monitor watches, and it answers `503` when the routing engine is unreachable. `/status` always answers `200`, even when the backend is degraded, because it is a page rather than a probe: a status page that disappears exactly when something is wrong is the wrong shape. The JSON carries `"status": "degraded"` in that case, and the page says so in words.

```sh
open http://localhost:8080/status        # xdg-open on Linux
```

```sh
curl -fsS http://localhost:8080/status \
  -H "Authorization: Bearer snk_your_operator_key" | jq
```

That is an operator key, one minted through `/admin/keys`. Any other key is answered too, with the key count and today's usage returned as `null`.

## What is actually on it?

```json
{
  "status": "ok",
  "backend": "valhalla",
  "version": "0.1.0",
  "build": "abc1234",
  "uptime_s": 3725,
  "territories": [
    {
      "id": "uk",
      "name": "United Kingdom",
      "version": "2.0.0",
      "data_updated": "2026-09-01",
      "bounds": [-8.65, 49.86, 1.77, 60.86],
      "package_bytes": 3221225472,
      "tiles": true
    }
  ],
  "terrain": {
    "elevation_enabled": true,
    "dataset": "mapzen-terrain-tiles",
    "resolution_m": 30
  },
  "features": { "elevation": true, "geocoding": true, "places": false },
  "keys": { "active": 7 },
  "usage_today": { "day": "2026-09-11", "units": 1234 }
}
```

`build` is the git commit the running image was built from, which is the field that settles an argument about whether a deployment actually took the last release. `backend` names the routing engine answering requests. `territories[]` lists what this box can route and tile over, with the package size on the wire.

## How do I know how old the map data is?

Read `data_updated`. It is the ISO-8601 date of the OSM extract behind a territory's latest published package, and it is now carried in three places that used to be silent about it: the `/status` report above, the TileJSON at `GET /tiles/{territory}/tiles.json`, and every entry in the signed territory index at `GET /territories`.

Freshness is the question every buyer of map data eventually asks, and "we update regularly" is not an answer. A date is. Putting it on the tile metadata means a web client can display it without a second call, and putting it on the territory channel means a device deciding whether to download an update can compare the date it holds against the date on offer.

**`null` means unknown, never zero and never current.** A territory with no `data_updated` is one whose extract date the channel does not record, typically because the package predates the field. Reading an absent date as "today" is exactly the failure mode the field exists to prevent, so it is worth writing that branch in your own client.

## What does it deliberately not show?

It is read-only, and it carries no key material, no per-key data and no personal data.

- The key count is a count. There is no list, no prefix and no owner.
- Today's meter is a total across every key on the box, not a per-key breakdown.
- Both of those totals are the operator's alone. An operator key, minted through `/admin/keys`, or any caller at all when `SN_STATUS_PUBLIC=true`, sees them; every other key reads them as `null`, because on a box that hands keys to the public, how many keys exist and how much they used today is not for just anyone to read.
- The optional-feature block is booleans only, so it tells you a geocoder is configured without telling you where it lives. Never a URL, never a path, never a credential.
- There are no admin actions on it. Everything that changes state lives behind the admin API and a separate token.

Anything a status page could leak is not on it, which is what makes it safe to leave open on an internal network.

## Who can read it?

A verified API key by default, exactly like every other surface on the gateway. An air-gapped or internal box often has no key to present, so `SN_STATUS_PUBLIC=true` serves it keyless. The default is `false`, and it should stay there on anything reachable from the internet: the report is not sensitive, but the uptime, build and territory list of a box are still more than a stranger needs.

## What it does not replace

**It is not monitoring.** One page, refreshed by a human, is not an alert. Point your monitoring at `/health`, which fails loudly, and use `/status` when something has already gone wrong and you need to know what this box thinks it is.

**It has no history.** Everything on it is the current state. `usage_today` resets daily and nothing is retained for comparison, so a box that was serving the wrong extract yesterday will not tell you that today.

**It is one box.** There is no fleet view, no aggregation across replicas and no cross-deployment comparison. If you run three, you read three pages.

**Territory entries reflect what is published, not what is installed on a device.** The package a phone actually holds is a separate question, answered by the [territory package channel](/docs/territories) and its signed manifest.

## Try it

If you already run the self-host distro, this is one new URL on the box you have. If you do not, the four-service Compose file and the first-boot walkthrough are in the [self-hosting guide](/docs/self-host), and the whole stack is designed to run air-gapped, which is why a status page that fetches nothing from the internet was the only acceptable shape for it. The field-by-field report is documented under [see what your box is serving](/docs/self-host), and the tile metadata that now carries the same date is in the [web maps guide](/docs/maps).
