Skip to content

Readiness probe

GET
/health/ready
curl --request GET \
--url https://api.emite.cr/health/ready

Public endpoint. Confirms the process can actually SERVE: it runs a bounded SELECT 1 against Postgres, because every authenticated request resolves tenant membership from the database and an instance that cannot reach it has nothing useful to answer. Returns 200 when the query succeeds, 503 when it fails or exceeds 2000ms. Third parties (ATV, Onvo, R2, BCCR) are deliberately NOT checked — their outages must not pull our instances out of rotation, and they already report to Sentry grouped per provider. Excluded from the global v1 prefix.

Ready: checks.database.status is ok.

Media typeapplication/json
object
status
required

ok when the probe passed; error only from /health/ready, with a 503.

string
Allowed values: ok error
uptime
required

Seconds the process has been running.

number
timestamp
required

When the probe answered.

string format: date-time
checks
required

The result of each check.

object
database
required

The Postgres check.

object
status
required

Whether a SELECT 1 against Postgres succeeded within the time limit.

string
Allowed values: ok error
latencyMs
required

How long the check took, in milliseconds.

number
error

Why the check failed, only with error: timeout when the query did not answer in time (typically an exhausted connection pool), unavailable when the database refused or failed it. The database error itself is only logged: this route is public.

string
Allowed values: timeout unavailable
Example
{
"status": "ok",
"uptime": 3600.25,
"checks": {
"database": {
"status": "ok",
"error": "timeout"
}
}
}

Not ready — the database check failed or timed out (status: error).

Media typeapplication/json
object
status
required

ok when the probe passed; error only from /health/ready, with a 503.

string
Allowed values: ok error
uptime
required

Seconds the process has been running.

number
timestamp
required

When the probe answered.

string format: date-time
checks
required

The result of each check.

object
database
required

The Postgres check.

object
status
required

Whether a SELECT 1 against Postgres succeeded within the time limit.

string
Allowed values: ok error
latencyMs
required

How long the check took, in milliseconds.

number
error

Why the check failed, only with error: timeout when the query did not answer in time (typically an exhausted connection pool), unavailable when the database refused or failed it. The database error itself is only logged: this route is public.

string
Allowed values: timeout unavailable
Example
{
"status": "ok",
"uptime": 3600.25,
"checks": {
"database": {
"status": "ok",
"error": "timeout"
}
}
}