# List fleet

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

> Returns the platform's own service tier, and where it has drifted.

`GET /v1/platform/fleet`

> [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/fleet` |
| **Method**    | `GET`                                    |
| **Operation** | `get_platform_fleet`                     |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`   |

Returns the platform's own service tier, and where it has drifted.

It returns the board for the services the PLATFORM itself runs — iam, kms,
gateway and the rest — as `{apps, summary}`: per service its environment, health,
phase, the image tag its CR DECLARES, the tag actually running, and the drift
between them, plus a summary counting the board green, yellow and red.

This is not a customer surface. `/v1/platform/projects/:project/apps` is a
tenant's apps; this is the tier those tenants run ON, which is why the two are
named differently rather than sharing a prefix.

Admission is scoped at the SCAN, before any CR is read: a platform SuperAdmin
observes the whole fleet, an org admin observes only their own org's namespaces,
and an org that owns none gets an empty board — a non-super caller never even
lists another org's services. Narrow further with `env`, `health`, `org`, or
`drift=1` for only what has drifted.

It degrades honestly rather than failing whole: a namespace that does not exist
is skipped, and a running-state read the caller cannot make leaves the running
tag empty — an unknown, never a guess — while the declared, health and phase
columns still render.

## Request

4 fields.

| Field    | In    | Type   | Required | Description                                                          |
| -------- | ----- | ------ | -------- | -------------------------------------------------------------------- |
| `env`    | query | string | —        | Env narrows to one lifecycle env: main, test or dev.                 |
| `health` | query | string | —        | Health narrows to one health colour: green, yellow or red.           |
| `org`    | query | string | —        | Org narrows to one image namespace.                                  |
| `drift`  | query | string | —        | Drift is `1` or `true` to show only rows that have actually drifted. |

## Response

| Status    | Body                | Meaning |
| --------- | ------------------- | ------- |
| `200`     | platform.driftBoard | ok      |
| `default` | problem-details     | refused |

`200` body — 28 fields.

| Field                           | In   | Type                  | Always | Description                                                                                                                                            |
| ------------------------------- | ---- | --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `apps`                          | body | platform.AppView\[]   | —      | Apps are the service rows, ordered by org, then app, then env.                                                                                         |
| `apps[].app`                    | body | string                | —      | service / CR name, e.g. iam                                                                                                                            |
| `apps[].cluster`                | body | string                | —      | always "hanzo-k8s"; cross-cluster federation is a follow-up phase                                                                                      |
| `apps[].declaredTag`            | body | string                | —      | spec.image.tag — the tag the CR SAYS to run; anything but vX.Y.Z is red drift                                                                          |
| `apps[].drift`                  | body | platform.Verdict      | —      |                                                                                                                                                        |
| `apps[].drift.flags`            | body | platform.DriftFlag\[] | —      | Flags are the findings behind the severity, in detection order: floating-declared, floating-running, stale, un-rolled, then the release-artifact ones. |
| `apps[].drift.flags[].kind`     | body | string                | —      | Kind is which finding this is, one of stale, un-rolled, floating-declared, floating-running, no-release or zero-assets.                                |
| `apps[].drift.flags[].message`  | body | string                | —      | Message is the finding in words, naming the tags that produced it ("running v1.2.3 has not rolled to declared v1.2.4").                                |
| `apps[].drift.flags[].severity` | body | string                | —      | Severity is this ONE finding's weight — yellow for stale and un-rolled, red for the other four.                                                        |
| `apps[].drift.severity`         | body | string                | —      | Severity is the roll-up over Flags — red if any flag is red, else yellow if any is yellow, else ok.                                                    |
| `apps[].endpoints`              | body | string\[]             | —      | status.endpoints the operator published for this service; empty until it reconciles                                                                    |
| `apps[].env`                    | body | string                | —      | main\|test\|dev                                                                                                                                        |
| `apps[].health`                 | body | string                | —      | green\|yellow\|red\|"" (unknown)                                                                                                                       |
| `apps[].id`                     | body | string                | —      | \<org>/\<app>/\<env>, e.g. hanzoai/iam/main                                                                                                            |
| `apps[].latestTag`              | body | string                | —      | newest released tag; "" until the GH release reader lands, so "stale" cannot fire yet                                                                  |
| `apps[].namespace`              | body | string                | —      | namespace the row was scanned from: a platform one (hanzo, hanzo-testnet, …) or a tenant-\<org>                                                        |
| `apps[].org`                    | body | string                | —      | image namespace, e.g. hanzoai                                                                                                                          |
| `apps[].phase`                  | body | string                | —      | operator status.phase (Running/…)                                                                                                                      |
| `apps[].registry`               | body | string                | —      | spec.image.repository verbatim (ghcr.io/hanzoai/iam); Org and Repo are read off it                                                                     |
| `apps[].repo`                   | body | string                | —      | owner/repo, e.g. hanzoai/iam                                                                                                                           |
| `apps[].role`                   | body | string                | —      | operator spec.role (sql\|kv\|generic\|ingress\|…) or "" — the one declared class field                                                                 |
| `apps[].runningTag`             | body | string                | —      | the tag the live Deployment actually runs; "" when unreadable — unknown, not a guess                                                                   |
| `summary`                       | body | platform.fleetSummary | —      |                                                                                                                                                        |
| `summary.byDrift`               | body | platform.driftTally   | —      |                                                                                                                                                        |
| `summary.byDrift.ok`            | body | integer (int64)       | —      | OK is how many rows run what they declare.                                                                                                             |
| `summary.byDrift.red`           | body | integer (int64)       | —      | Red is how many have drifted badly.                                                                                                                    |
| `summary.byDrift.yellow`        | body | integer (int64)       | —      | Yellow is how many have drifted within tolerance.                                                                                                      |
| `summary.total`                 | body | integer (int64)       | —      | Total is how many rows the board returned, after filtering.                                                                                            |

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

## Examples

**CLI**

```bash
hanzo platform fleet list
```

**SDK**

**.ts**

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

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

**.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_fleet()
```

**.go**

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

resp, _, err := client.PlatformAPI.GetPlatformFleet(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_fleet(&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).getPlatformFleet();
```

**HTTP**

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

**MCP**

Tool `platform`, op `get_platform_fleet` — 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_fleet",
           "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)
