# List health

URL: https://docs.hanzo.ai/docs/openapi/kms/get-kms-health

> Reports whether this broker can actually serve secrets.

`GET /v1/kms/health`

> [KMS →](https://docs.hanzo.ai/docs/openapi/kms) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/kms/health`   |
| **Method**    | `GET`                                  |
| **Operation** | `get_kms_health`                       |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Reports whether this broker can actually serve secrets.

A real readiness probe, not a liveness stub: 200 only when the store is open
AND a master key is configured, with `signing` reporting whether signing keys
are set up too. Anything less answers 503 with `ready:false` and the reason —
no in-process store, or no master key — which are exactly the two states in
which the secret operations refuse.

Not token-gated, because the platform must be able to probe it without a
credential. It reports the broker's configuration state only; no secret, no
key material and no tenant name appears in it.

## Request

`GET /v1/kms/health` takes no parameters and no body — the credential is the whole request.

## Response

| Status    | Body            | Meaning             |
| --------- | --------------- | ------------------- |
| `200`     | kms.kmsHealth   | ok                  |
| `503`     | kms.kmsHealth   | service unavailable |
| `default` | problem-details | refused             |

`200` body — 8 fields.

| Field       | In   | Type    | Always | Description                                                                                                                                                                                 |
| ----------- | ---- | ------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `enforcing` | body | boolean | —      | Enforcing is whether a secret value the declaration in force does not grant is refused.                                                                                                     |
| `error`     | body | string  | —      | Error is the honest reason readiness is false: no in-process KMS client, or no master key.                                                                                                  |
| `policy`    | body | string  | —      | Policy is the sha256 of the grant declaration in force, so a probe can prove which one is live.                                                                                             |
| `ready`     | body | boolean | —      | Ready is whether a secret operation would actually succeed right now.                                                                                                                       |
| `refused`   | body | string  | —      | Refused is what the MOUNTED declaration reads as — its sha256, or "absent" or "unreadable" — when it is not the one in force: a document cloud refused to parse, or a mount that went away. |
| `service`   | body | string  | —      | Service names the subsystem answering, `kms`.                                                                                                                                               |
| `signing`   | body | boolean | —      | Signing reports whether signing keys are configured.                                                                                                                                        |
| `status`    | body | string  | —      | Status is `ok` or `degraded`, the one-word form of Ready.                                                                                                                                   |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo kms health
```

**SDK**

**.ts**

```ts
import { Configuration, KmsApi } from 'hanzoai';

const api = new KmsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getKmsHealth();
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import KmsApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = KmsApi(client).get_kms_health()
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.KmsAPI.GetKmsHealth(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, kms_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = kms_api::get_kms_health(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.KmsApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new KmsApi(client).getKmsHealth();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/kms/health \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

Tool `kms`, op `get_kms_health` — POST the JSON-RPC envelope to `https://api.hanzo.ai/v1/mcp`.

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "kms",
         "arguments": {
           "op": "get_kms_health",
           "input": {}
         }
       }
     }'
```

---

[KMS API](https://docs.hanzo.ai/docs/openapi/kms) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
