# List fleet

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

> Compares what was written with what is running, one row per service along a single causal line: head, the commit on the branch; built, the image that commit produced; declared, the tag pinned in the universe repository; running, what the cluster serves.

`GET /v1/ci/fleet`

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

|               |                                        |
| ------------- | -------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/ci/fleet`     |
| **Method**    | `GET`                                  |
| **Operation** | `get_ci_fleet`                         |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY` |

Compares what was written with what is running, one row per service
along a single causal line: head, the commit on the branch; built, the image
that commit produced; declared, the tag pinned in the universe repository;
running, what the cluster serves. A service whose four values disagree names
the step that broke.

## Request

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

## Response

| Status    | Body            | Meaning |
| --------- | --------------- | ------- |
| `200`     | ci.Pipelines    | ok      |
| `default` | problem-details | refused |

`200` body — 37 fields.

| Field                           | In   | Type               | Always | Description                                                                                                                                                      |
| ------------------------------- | ---- | ------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `fetchedAt`                     | body | string (date-time) | —      |                                                                                                                                                                  |
| `orgs`                          | body | string\[]          | —      |                                                                                                                                                                  |
| `services`                      | body | ci.Pipeline\[]     | —      |                                                                                                                                                                  |
| `services[].behind`             | body | integer (int64)    | —      | Behind counts commits after the one that last produced an image whose own build has FINISHED without producing one, and Since is when the oldest of them landed. |
| `services[].built`              | body | ci.Artifact        | —      |                                                                                                                                                                  |
| `services[].built.digest`       | body | string             | —      |                                                                                                                                                                  |
| `services[].built.tag`          | body | string             | —      |                                                                                                                                                                  |
| `services[].declared`           | body | ci.Artifact        | —      |                                                                                                                                                                  |
| `services[].declared.digest`    | body | string             | —      |                                                                                                                                                                  |
| `services[].declared.tag`       | body | string             | —      |                                                                                                                                                                  |
| `services[].drift`              | body | string\[]          | —      |                                                                                                                                                                  |
| `services[].head`               | body | ci.Tip             | —      |                                                                                                                                                                  |
| `services[].head.at`            | body | string (date-time) | —      |                                                                                                                                                                  |
| `services[].head.build`         | body | ci.Check           | —      |                                                                                                                                                                  |
| `services[].head.build.at`      | body | string (date-time) | —      |                                                                                                                                                                  |
| `services[].head.build.job`     | body | string             | —      | Job is the job that decided State.                                                                                                                               |
| `services[].head.build.number`  | body | integer (int64)    | —      |                                                                                                                                                                  |
| `services[].head.build.state`   | body | string             | —      | State is success \| failure \| running \| absent.                                                                                                                |
| `services[].head.build.tested`  | body | boolean            | —      | Tested reports that the run's tests executed; Verdict reports that the run said anything about tests at all.                                                     |
| `services[].head.build.url`     | body | string             | —      |                                                                                                                                                                  |
| `services[].head.build.verdict` | body | boolean            | —      |                                                                                                                                                                  |
| `services[].head.sha`           | body | string             | —      |                                                                                                                                                                  |
| `services[].head.title`         | body | string             | —      |                                                                                                                                                                  |
| `services[].image`              | body | string             | —      | ghcr.io/hanzoai/cloud                                                                                                                                            |
| `services[].name`               | body | string             | —      | cloud                                                                                                                                                            |
| `services[].namespace`          | body | string             | —      | hanzo                                                                                                                                                            |
| `services[].org`                | body | string             | —      | Hanzo Git owner; empty when the repo is unresolved                                                                                                               |
| `services[].pinnedAt`           | body | string (date-time) | —      |                                                                                                                                                                  |
| `services[].ready`              | body | integer (int64)    | —      |                                                                                                                                                                  |
| `services[].repo`               | body | string             | —      | hanzo-inc/cloud                                                                                                                                                  |
| `services[].running`            | body | ci.Artifact        | —      |                                                                                                                                                                  |
| `services[].running.digest`     | body | string             | —      |                                                                                                                                                                  |
| `services[].running.tag`        | body | string             | —      |                                                                                                                                                                  |
| `services[].since`              | body | string (date-time) | —      |                                                                                                                                                                  |
| `services[].want`               | body | integer (int64)    | —      |                                                                                                                                                                  |
| `sourceErr`                     | body | string             | —      |                                                                                                                                                                  |
| `stale`                         | body | boolean            | —      |                                                                                                                                                                  |

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

## Examples

**CLI**

```bash
hanzo ci fleet
```

**SDK**

**.ts**

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

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

**.py**

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

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

**.go**

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

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

**.rs**

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

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

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

**.java**

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

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

var result = new CiApi(client).getCiFleet();
```

**HTTP**

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

**MCP**

Tool `ci`, op `get_ci_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": "ci",
         "arguments": {
           "op": "get_ci_fleet",
           "input": {}
         }
       }
     }'
```

---

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