API Reference

Health check

GET /api/health returns the running status of the service and its components, for monitoring and liveness probing.

GET /api/health

Returns the service's running status, for monitoring and liveness probing. The endpoint is public, takes no parameters, and always responds with cache-control: no-store.

Returns 200 when all components are healthy; returns 503 when any component is failing, with the specific degraded components marked in components.

curl https://citeark.com/api/health

Response

{
  "status": "ok",
  "service": "citeark-web",
  "revision": "citeark-00042-abc",
  "components": {
    "database": { "status": "ok", "latencyMs": 12 },
    "objectStorage": { "status": "ok", "latencyMs": 30 },
    "authentication": { "status": "ok" },
    "configuration": { "status": "ok" },
    "signing": { "status": "ok" }
  },
  "checkedAt": "2026-01-01T00:00:00.000Z"
}
FieldDescription
statusOverall status: ok or degraded (corresponding to HTTP 200 / 503)
serviceAlways citeark-web
revisionCurrently deployed revision
componentsHealth of each component; see the table below
checkedAtISO time of this check

components contains five components, each with a status (ok or failed):

ComponentDescription
databasePostgreSQL connectivity and database migration version check, with latencyMs; includes detail on failure
objectStorageR2 object storage connectivity check, with latencyMs; includes detail on failure
authenticationWhether authentication-related environment variables (sign-in, email, etc.) are all present
configurationWhether the production configuration is complete
signingWhether the artifact signing key (KMS or private key) is configured

Notes

This endpoint only checks dependency connectivity and configuration; it does not mean all business functionality is available. A 503 response is also a valid health-check signal — monitors should alert on both the status code and the status field.