Health
Health
Explore service liveness and database connectivity checks
Overview
The Health resource exposes the public service health check for a self-hosted FlagForge API. It reports whether the API process is running and whether the configured database is reachable.
The endpoint is unauthenticated, so it can be used by an external monitor or an orchestrator without an API key. A successful check returns an ok status and the process uptime. If the database check fails, the endpoint returns a degraded status with HTTP 503 Service Unavailable.
Note:
Use GET /health as the liveness and readiness signal for the API. The check executes a database connectivity query before reporting success.
Schema
The response has one of two shapes:
| Field | Type | Required state | Description |
|---|---|---|---|
status | "ok" | Required on a successful response | Indicates that the API process is up and the database is reachable. |
uptime | number | Required on a successful response | Process uptime reported by the API. |
status | "degraded" | Required when the service check fails | Indicates that the database connectivity check did not succeed. |
error | string | Required when the service check fails | Error message describing the failed health check. |
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /health | Checks API liveness and verifies database connectivity. Returns HTTP 200 with status: "ok" and uptime when healthy, or HTTP 503 with status: "degraded" and an error message when the database is unreachable. |