seahaven-ap/packages/api/openapi/paths/health.yaml

34 lines
898 B
YAML
Raw Normal View History

get:
tags:
- Health
summary: Check API and database liveness
description: Returns ok when the process can ping the configured database.
operationId: get-health
security: []
responses:
"200":
description: API process is healthy and the database answered.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/HealthResponse
example:
status: ok
database: up
"400":
description: Bad request.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error: Bad request.
"503":
description: Database ping failed.
content:
application/json:
schema:
$ref: ../components/schemas.yaml#/Error
example:
error: Database is unavailable.