Check API health
const url = 'http://localhost:8080/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:8080/healthzLiveness and dependency readiness. Never returns application/problem+json: a degraded process answers 503 with the same HealthResponse body so a probe can always read which dependency is down.
Responses
Abschnitt betitelt „Responses“Process and required dependencies are healthy.
object
ok when every required dependency answered, degraded when at least one did not. The process is alive in both cases.
One entry per checked dependency, keyed by its name.
object
Example
{ "status": "ok", "service": "antares-api", "dependencies": { "additionalProperty": "ok" }}contract_validation_failed — the OpenAPI request validator rejected the request before the handler ran — or invalid_request when the body is unreadable or is not valid JSON for the declared operation.
RFC 9457 problem details. type is always https://api.antares.commergy.de/problems/{code} and is built in exactly one place. type, code and title are stable and never localised; only detail is localised, and only where the registry marks the audience as merchant.
object
Absolute problem type URI. Stable identifier, never localised.
Stable English summary of the problem type.
The HTTP status code, repeated in the body.
Human-readable explanation of this occurrence. The only localised field; may be German or English depending on Accept-Language.
The request path this occurrence relates to.
The registry code, for example price_context_token_expired. This is what a client branches on; never branch on title or detail.
Present only for per-item validation failures, above all ingest batches.
object
Dotted path of the offending field inside the request body, for example prices.CHF.gross.
What is wrong with it, in English.
0-based index into the request’s products array. Present only for ingest batches, and the only way to map an error back to a product without echoing it.
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example", "errors": [ { "field": "example", "message": "example", "productIndex": 1 } ]}Process is running but at least one required dependency is degraded.
object
ok when every required dependency answered, degraded when at least one did not. The process is alive in both cases.
One entry per checked dependency, keyed by its name.
object
Example
{ "status": "ok", "service": "antares-api", "dependencies": { "additionalProperty": "ok" }}