Skip to content

GET /api/health

Returns the health status of the API and its database connection. Does not require authentication.

GET /api/health

No parameters required.

HTTP 200

{
"status": "ok",
"db": "ok",
"latency_ms": 4,
"ts": "2025-03-15T07:30:00.123Z"
}
FieldTypeDescription
statusstring"ok"
dbstring"ok"
latency_msintegerDatabase round-trip latency in milliseconds
tsstringServer time at response

HTTP 503

{
"status": "degraded",
"db": "error"
}

A 503 response means the database is unreachable. The API is online but cannot serve data requests.

Use this endpoint to:

  • Check uptime from an external monitor
  • Validate that your self-hosted instance is correctly configured
  • Verify connectivity before running a backfill
Terminal window
curl https://mydatafor.life/api/health