Health Check APIs
Verify liveness and readiness of the backend and its dependencies (Hasura, Keycloak, Postgres). Used for load balancer and Kubernetes probes. No authentication required.
GET
Health check endpoints for monitoring and orchestrator probes.
GET /health/live confirms the process is running. GET /health/ready verifies dependencies (Hasura, Keycloak, Postgres) are reachable. Both work for self-hosted and cloud deployments.
Base URL: Health is mounted at
/health. If your deployment uses a path prefix (e.g. /api), use /api/health/live and /api/health/ready. For self-hosted, replace the host with your instance URL.Endpoint (Cloud)
Self-hosted Databrain Endpoint
Guide: How to check health
- Liveness — Call
GET /health/live. Expect200and{"status":"live"}. Use for liveness probes. - Readiness — Call
GET /health/ready. Expect200and{"status":"ready","checks":{...}}when all dependencies are up. Inspectchecksfor per-service status. - If any check is
DOWNorUNKNOWN, the response is503andstatusisnot_ready.
Authentication
None. Health endpoints do not require authentication.Headers
None required.Query Parameters
None.Response
GET /health/live (200 OK)
Always
"live" when the server responds. Indicates the process is running.GET /health/ready – Success (200 OK)
"ready" when all configured dependency checks pass.Map of service names to their health result. Keys present depend on configuration.
Always present. Hasura GraphQL engine health. Uses
{HASURA_ENDPOINT}/healthz. No change required on Hasura; backend uses the existing endpoint."UP" when Hasura is reachable, "DOWN" when unreachable, "UNKNOWN" when HASURA_ENDPOINT is not configured.HTTP status from
{HASURA_ENDPOINT}/healthz. Present when a response was received. Absent on network/fetch errors.Present when
status is "DOWN" or "UNKNOWN". Error message or configuration hint (e.g. "HASURA_ENDPOINT not configured").Present only when
KEYCLOAK_SERVER_URL is set. Keycloak health via {KEYCLOAK_SERVER_URL}/health/live."UP" or "DOWN".HTTP status from Keycloak. Present when a response was received.
Present when
status is "DOWN". Error message.Present only when
HASURA_ENDPOINT is set. Postgres reachability via Hasura strict health ({HASURA_ENDPOINT}/healthz?strict=true)."UP" or "DOWN".HTTP status from Hasura strict health. Present when a response was received.
Present when
status is "DOWN". Error message.GET /health/ready – Failure (503 Service Unavailable)
"not_ready" when one or more checks failed.Same structure as success. At least one entry has
status: "DOWN" or "UNKNOWN".Services summary
| Service | Config | Check URL | In checks when |
|---|---|---|---|
| Hasura | HASURA_ENDPOINT | {endpoint}/healthz | Always |
| Keycloak | KEYCLOAK_SERVER_URL | {url}/health/live | When config is set |
| Postgres | (via HASURA_ENDPOINT) | {HASURA_ENDPOINT}/healthz?strict=true | When Hasura config is set |
Examples
HTTP Status Code Summary
| Status Code | Endpoint | Description |
|---|---|---|
200 | GET /health/live | OK – Process is running; {"status":"live"} |
200 | GET /health/ready | OK – All configured checks pass; {"status":"ready","checks":{...}} |
503 | GET /health/ready | Service Unavailable – One or more checks failed; {"status":"not_ready","checks":{...}} |
Notes
- Each dependency check uses a 3 second timeout.
statusCodeis omitted when the check fails due to network/connection errors (e.g.ECONNREFUSED).- For Kubernetes: use
GET /health/livefor liveness andGET /health/readyfor readiness. - Graceful shutdown: On
SIGTERMorSIGINT, the server stops accepting new connections and waits for in-flight requests to complete. If shutdown is not complete within 30 seconds, the process exits forcefully. SetterminationGracePeriodSecondsto at least 35 when using Kubernetes.

