Health
Check whether the API and its storage bindings are reachable.
GET /health
A liveness/readiness check for the worker and its three storage bindings — D1, KV, and R2. Useful for uptime monitors and status pages; not project-scoped.
Auth: none
Response 200 — all bindings reachable
{ "status": "ok", "bindings": { "db": true, "kv": true, "r2": true } }
Response 503 — at least one binding failed
{ "status": "error", "bindings": { "db": true, "kv": false, "r2": true } }
Each binding is checked independently and in parallel, with failures caught rather than thrown:
| binding | check |
|---|---|
| db | SELECT 1 against D1 |
| kv | KV.get('__health__') (a read of a key that doesn’t need to exist — a miss still counts as reachable, only a thrown error counts as false) |
| r2 | LOGS_ARCHIVE.head('__health__') |
status is "ok" only when all three are true; otherwise the endpoint returns 503 with status: "error". There are no error responses beyond this — the check itself cannot fail in a way that produces a different shape.