# Health endpoints

Every path starts at your [API URL](https://docs.qualithm.com/api.md#find-your-api-url). Every response is JSON, and an error has the [error body](https://docs.qualithm.com/api.md#errors).

## Check that the platform can serve

`GET /healthz`

Probes the datastore, the readings store and the event bus. Requests share one probe pass, and its verdict answers for 3 seconds, so a change can take that long to show. Answers with a bare `HealthStatus`, not the envelope: 200 with `status: ok`, or 503 with `status: down` and the first failing `subsystem`.

Needs no credential.

**Response:** `200` with [HealthStatus](#healthstatus) in `data`.

**[Errors](https://docs.qualithm.com/api.md#errors):** `429`, `500`, `503`

```bash
curl "<your-api-url>/healthz"
```

## Types

### HealthStatus

The composite health verdict. Sent with 200 when `ok` and 503 when `down`.

| Field | Type | Required | Description |
| ----- | ---- | -------- | ----------- |
| `status` | one of `"ok"`, `"down"` | Yes |  |
| `subsystem` | [HealthSubsystem](#healthsubsystem) | No | The first subsystem that failed its probe; set only when `down` |

### HealthSubsystem

A backend the platform needs to serve.

one of `"datastore"`, `"telemetry-store"`, `"event-bus"`.
