GET /api/health
Returns the health status of the API and its database connection. Does not require authentication.
Request
Section titled “Request”GET /api/healthNo parameters required.
Response — healthy
Section titled “Response — healthy”HTTP 200
{ "status": "ok", "db": "ok", "latency_ms": 4, "ts": "2025-03-15T07:30:00.123Z"}| Field | Type | Description |
|---|---|---|
status | string | "ok" |
db | string | "ok" |
latency_ms | integer | Database round-trip latency in milliseconds |
ts | string | Server time at response |
Response — degraded
Section titled “Response — degraded”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
curl https://mydatafor.life/api/health