Reports whether this broker can actually serve secrets.
Reports whether this broker can actually serve secrets.
GET /v1/kms/health
| 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 | kmsHealth | ok |
503 | kmsHealth | service unavailable |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
error | body | string | — | Error is the honest reason readiness is false: no in-process KMS client, or no master key. |
ready | body | boolean | — | Ready is whether a secret operation would actually succeed right now. |
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.
Examples
hanzo kms healthimport { Configuration, KmsApi } from 'hanzoai';
const api = new KmsApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getKmsHealth();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()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.KmsAPI.GetKmsHealth(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.KmsApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new KmsApi(client).getKmsHealth();curl https://api.hanzo.ai/v1/kms/health \
-H "Authorization: Bearer $HANZO_API_KEY"Tool kms, op get_kms_health — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.
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": {}
}
}
}'How is this guide?