API-Referenz

Health

Liveness and readiness probes.

GET
/v1/health/liveness

Answers { "status": "ok" } while the process is up, without checking any dependency, the database included. Public: no API key, for the orchestrator to probe directly.

The process is up. It says nothing about the database.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/health/liveness'
Example Response
{  "status": "ok"}
GET
/v1/health/readiness

Pings Postgres: 200 with the indicator report when it answers, 503 provider_unavailable when it does not, with a body that names no host or cause (those are only logged). Public: no API key, for the orchestrator to probe directly.

Every indicator is up; the service can take traffic.

Unexpected server error. The detail is logged server-side and never returned: there is nothing in the body to branch on beyond the code.

An indicator is down: today that means Postgres did not answer the ping. Which one, and why, is logged; the body says only that the service is not ready, because this route is served without credentials and the indicator report names internal hosts.

Example Request
curl -X GET 'https://api.cosmospay.lat/cosmos-api/v1/health/readiness'
Example Response
{  "status": "ok",  "info": {    "database": {      "status": "up"    }  },  "error": {},  "details": {    "database": {      "status": "up"    }  }}