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:

FieldTypeRequired stateDescription
status"ok"Required on a successful responseIndicates that the API process is up and the database is reachable.
uptimenumberRequired on a successful responseProcess uptime reported by the API.
status"degraded"Required when the service check failsIndicates that the database connectivity check did not succeed.
errorstringRequired when the service check failsError message describing the failed health check.

Endpoints

MethodPathDescription
GET/healthChecks 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.