---
title: "Health check endpoint for the ClickHouse analytics backend."
method: GET
path: "/api/health/clickhouse/"
tags: ["api"]
---

# Health check endpoint for the ClickHouse analytics backend.

`GET /api/health/clickhouse/`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/api/health/clickhouse/`
- Auth: one of:
  - API key in header `X-Api-Key`
  - API key in header `X-Secret-Key`

Returns JSON with:
- status: healthy | degraded | unhealthy | disabled
- clickhouse_connected: bool
- cdc_lag: per-table replication lag in seconds
- routing: per-query-type routing configuration

No authentication required (intended for infrastructure monitoring).

## Response `200`

OK

- ClickHouseHealthResponse
  - `status` 'healthy' | 'degraded' | 'unhealthy' | 'disabled', required
  - `clickhouse_connected` boolean, required
  - `cdc_lag` object, required
  - `routing` object, required
  - `error` string

## Other responses

- `503`: Service Unavailable
- `default`: Default error response

---

[API](https://skmtc.dev/futureagi/apis/future-agi-management-api.md) · [All operations](https://skmtc.dev/futureagi/apis/future-agi-management-api/llms.txt) · [OpenAPI document](https://skmtc.dev/futureagi/apis/future-agi-management-api/revisions/c8684118e142?raw)
