---
title: "Health Check"
method: GET
path: "/api/health"
tags: ["Health"]
---

# Health Check

`GET /api/health`

## Request

- Base URL: `https://api.zerogex.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.zerogex.io/api/health`
- Auth: HTTP bearer

Check API and database health (DEEP — touches the DB).

Returns HTTP 200 only when the database is reachable. A degraded
backend (db_manager.check_health() returns False) surfaces as HTTP
503 with the same response body so uptime monitors, load balancers,
and Kubernetes probes can act on the status code — the previous
behavior returned 200 with ``status="degraded"`` and was treated as
healthy by every standard probe.

For a process-liveness signal that does NOT depend on the DB (e.g. the
systemd ExecStartPost gate), use ``/api/health/live`` instead.

## Response `200`

Successful Response

- HealthStatus
  - `status` string, required: healthy, degraded, or unhealthy
  - `database_connected` boolean, required
  - `last_data_update` string, date-time, nullable
  - `data_age_seconds` integer, nullable

---

[API](https://skmtc.dev/zerogex/apis/zerogex-api.md) · [All operations](https://skmtc.dev/zerogex/apis/zerogex-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zerogex/apis/zerogex-api/revisions/753b26bf0592?raw)
