Reports whether this control plane can actually deploy anything.
Reports whether this control plane can actually deploy anything. A real probe, not a status page.
GET /v1/platform/health
| Address | https://api.hanzo.ai/v1/platform/health |
| Method | GET |
| Operation | get_platform_health |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reports whether this control plane can actually deploy anything.
A real probe, not a status page. It answers 200 only when the metadata store is open AND the cluster is genuinely reachable — proved by LISTING the operator App CRD, which settles reachability and CRD presence in one bounded call, and which is the exact question every deploy depends on. Anything else is 503 carrying the real reason and whether the CRD was found.
A constructed cluster client proves nothing — it is built from a kubeconfig, not
from a reachable apiserver — so this deliberately spends a round trip rather than
reporting ok while every deploy fails. Not admin-gated: liveness has to be
probe-able without a credential.
Request
GET /v1/platform/health takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | readiness | ok |
503 | readiness | service unavailable |
200 body — 5 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
crd | body | boolean | — | CRD is whether the operator App CRD was found, and is absent when no cluster client resolved and the question could not be asked. |
error | body | string | — | Error is the real reason the plane is degraded; absent when it is not. |
k8s | body | boolean | — | K8s is whether a cluster client resolved at all. |
service | body | string | — | Service is always "platform" — which control plane answered. |
status | body | string | — | Status is "ok" when this plane can deploy, "degraded" when it cannot. |
Failure carries the platform error shape — see Errors.
Examples
hanzo platform healthimport { Configuration, PlatformApi } from 'hanzoai';
const api = new PlatformApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getPlatformHealth();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import PlatformApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = PlatformApi(client).get_platform_health()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.PlatformAPI.GetPlatformHealth(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, platform_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = platform_api::get_platform_health(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.PlatformApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new PlatformApi(client).getPlatformHealth();curl https://api.hanzo.ai/v1/platform/health \
-H "Authorization: Bearer $HANZO_API_KEY"Tool platform, op get_platform_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": "platform",
"arguments": {
"op": "get_platform_health",
"input": {}
}
}
}'How is this guide?