Liveness and readiness (database answers within 2 s)
GET
/healthz
const url = 'http://localhost:3000/healthz';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/healthzResponses
Section titled “Responses”Ready.
Media typeapplication/json
object
status
required
string
uptimeSeconds
required
integer
checks
required
object
database
required
string
Example
{ "status": "ok", "checks": { "database": "ok" }}Headers
Section titled “Headers”X-Request-Id
required
Id of the request (req_…), also the id of its request log row.
string
Id of the request (req_…), also the id of its request log row.
Error: internal_error
Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details
requestId
required
string
Example
{ "error": { "code": "unauthorized" }}Headers
Section titled “Headers”X-Request-Id
required
Id of the request (req_…), also the id of its request log row.
string
Id of the request (req_…), also the id of its request log row.
The database does not answer.
Media typeapplication/json
object
status
required
string
uptimeSeconds
required
integer
checks
required
object
database
required
string
Example
{ "status": "ok", "checks": { "database": "ok" }}Headers
Section titled “Headers”X-Request-Id
required
Id of the request (req_…), also the id of its request log row.
string
Id of the request (req_…), also the id of its request log row.