Skip to main content

Health

The health endpoint reports whether the application and its database answer. Use it for uptime monitors, status pages, and load-balancer probes. This is the only Gradient endpoint that needs no authentication. It contains no customer data.

Get Health

No authentication. No request parameters.
You can poll at any interval. The database result is cached for 10 seconds, so more frequent polls are permitted but do not give more recent data.
string
ok when all checks pass. degraded when one or more checks fail.
string
The time of the response, in ISO 8601 format.
string
The short commit SHA of the deployed build, or unknown.
string
ok when the database answered a read. error when the read failed or did not complete in 2.5 seconds.
integer
The time the database check took, in milliseconds.

Status Codes

Monitor the status code. Do not monitor only the body: a 503 is the signal that Gradient is unhealthy. The endpoint does not report the cause of a failure. To get the cause, contact hi@trygradient.ai.

Example