Check health
const url = 'http://127.0.0.1:9090/api/health';const options = { method: 'GET', headers: {'X-Request-Id': '4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'}};
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://127.0.0.1:9090/api/health \ --header 'X-Request-Id: 4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7f'Whether the instance and its database work: ok when it takes work (ready) and its session to the database is up, and nothing else: not its name, version or environment, which GET /api/instance tells behind the
login. It answers 200 whenever it answers at all, while the instance starts too (starting), so read the body:
for a load balancer use GET /api/ready, for a liveness probe GET /livez. It needs no login. The session is
the database’s answer: the call asks nothing of the database, and updates the houradvantage_database_up metric.
Authorizations
Section titled “Authorizations”- None
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”An id to follow the request by: answered back in X-Request-Id, and in the log, the audit trail and the events the request causes. 1 to 128 letters, digits, -, _, . or :; anything else is replaced by a new id.
Example
4f1c2b0e-8a7d-4c51-9e2f-3a6b8d0c1e7fResponses
Section titled “Responses”Whether the instance works.
Whether an instance works, as anyone may ask (GET /api/health, with no
login): nothing of which instance, version or environment it is.
object
It takes work (ready) and its database answers.
It takes work: what GET /api/ready answers 200 for.
True while the instance starts (reaches its database, migrates it, loads its devices); absent once it has started.
Example
{ "ok": true, "ready": true}