Health API
Base path: /api/health
System health check endpoint for monitoring, load balancers, and orchestrators.
GET /api/health
Run health checks against all backend dependencies (PostgreSQL and Redis) and return an aggregate status.
Auth: None (public) Feature gate: None
Response (all healthy):
HTTP status: 200
{
"status": "ok",
"timestamp": "2026-03-25T12:00:00.000Z",
"checks": {
"database": {
"status": "ok",
"latencyMs": 3
},
"redis": {
"status": "ok",
"latencyMs": 1
}
}
}
Response (partial failure):
HTTP status: 503
{
"status": "degraded",
"timestamp": "2026-03-25T12:00:00.000Z",
"checks": {
"database": {
"status": "ok",
"latencyMs": 5
},
"redis": {
"status": "error",
"error": "Redis unavailable"
}
}
}
Response (total failure):
HTTP status: 503
{
"status": "error",
"timestamp": "2026-03-25T12:00:00.000Z",
"checks": {
"database": {
"status": "error",
"error": "Database unavailable"
},
"redis": {
"status": "error",
"error": "Redis unavailable"
}
}
}
Status logic
| Overall status | Condition |
|---|---|
ok | All checks pass |
degraded | At least one check passes and at least one fails |
error | All checks fail |
Check object
| Field | Type | Description |
|---|---|---|
status | "ok" | "error" | Individual check result |
latencyMs | number | Round-trip time in milliseconds (present only when status is ok) |
error | string | Error description (present only when status is error) |
HTTP status codes
| Code | Condition |
|---|---|
| 200 | Overall status is ok |
| 503 | Overall status is degraded or error |