# List health

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

> Reports whether this control plane can actually deploy anything.

`GET /v1/platform/health`

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

|               |                                           |
| ------------- | ----------------------------------------- |
| **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`     | platform.readiness | ok                  |
| `503`     | platform.readiness | service unavailable |
| `default` | problem-details    | refused             |

`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](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo platform health
```

**SDK**

**.ts**

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

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

**.py**

```python
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()
```

**.go**

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

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

**.rs**

```rust
use hanzo_client::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?;
```

**.java**

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

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

var result = new PlatformApi(client).getPlatformHealth();
```

**HTTP**

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

**MCP**

Tool `platform`, op `get_platform_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": "platform",
         "arguments": {
           "op": "get_platform_health",
           "input": {}
         }
       }
     }'
```

---

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