app.routers.health¶
Health-check route used by deployment and container probes.
GET /healthz reports whether the application can reach its
database (status / database; HTTP 503 when unreachable) plus the
configuration state loaded at startup: config (file ok,
missing or invalid), policy (configured, missing or
invalid) and registrations (startup sync synced, skipped
or failed). auth reports the configured token validators
(oidc, dev, oidc+dev or unconfigured; with
unconfigured every protected route answers 503) and rbac
whether any role grants a permission (configured or empty).
version is the running application version (ADRIANO_VERSION).
Configuration problems never make the probe fail: restarting the
container would not fix them. The route is public and reports no
secrets and no record data.
- app.routers.health.healthz(response, db=Depends(dependency=<function get_db>, use_cache=True, scope=None), runtime=Depends(dependency=<function get_catalog_runtime>, use_cache=True, scope=None), settings=Depends(dependency=<functools._lru_cache_wrapper object>, use_cache=True, scope=None))¶
Report application, database and configuration health.
Returns HTTP 200 with
status: okwhen the database is reachable, or HTTP 503 withstatus: degradedotherwise. Theconfig,policyandregistrationskeys report the configuration loaded at startup.- Parameters:
response (
Response) – Outgoing response, used to set the status code.db (
Session) – Request-scoped database session.runtime (
CatalogRuntime|None) – Startup state of the catalog.settings (
Settings) – Application settings (auth status).
- Return type:
- Returns:
A mapping with
status,database,config,policy,registrations,rbac,authandversionkeys.