# List runs

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

> Lists recent builds: the repo, the branch, the commit and how each run ended, newest first.

`GET /v1/ci/runs`

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

Lists recent builds: the repo, the branch, the commit and how each run
ended, newest first. A run names a repo, a branch and an actor, so the list is
never wider than the caller — a SuperAdmin sees the fleet, an org member sees
only its own org.

## Request

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

## Response

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

`200` body — 21 fields.

| Field               | In   | Type               | Always | Description                                                                                                             |
| ------------------- | ---- | ------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------- |
| `fetchedAt`         | body | string (date-time) | —      |                                                                                                                         |
| `orgs`              | body | string\[]          | —      |                                                                                                                         |
| `repos`             | body | integer (int64)    | —      |                                                                                                                         |
| `runs`              | body | ci.Execution\[]    | —      |                                                                                                                         |
| `runs[].actor`      | body | string             | —      |                                                                                                                         |
| `runs[].branch`     | body | string             | —      |                                                                                                                         |
| `runs[].conclusion` | body | string             | —      |                                                                                                                         |
| `runs[].endedAt`    | body | string (date-time) | —      |                                                                                                                         |
| `runs[].event`      | body | string             | —      |                                                                                                                         |
| `runs[].id`         | body | integer (int64)    | —      |                                                                                                                         |
| `runs[].number`     | body | integer (int64)    | —      |                                                                                                                         |
| `runs[].org`        | body | string             | —      |                                                                                                                         |
| `runs[].repo`       | body | string             | —      |                                                                                                                         |
| `runs[].sha`        | body | string             | —      |                                                                                                                         |
| `runs[].startedAt`  | body | string (date-time) | —      |                                                                                                                         |
| `runs[].status`     | body | string             | —      | Status and Conclusion are BOTH required to know how a run went, and reading only one is wrong in a way that looks fine. |
| `runs[].title`      | body | string             | —      |                                                                                                                         |
| `runs[].url`        | body | string             | —      |                                                                                                                         |
| `runs[].workflow`   | body | string             | —      |                                                                                                                         |
| `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 runs
```

**SDK**

**.ts**

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

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

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

**.go**

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

resp, _, err := client.CiAPI.GetCiRuns(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_runs(&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).getCiRuns();
```

**HTTP**

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

**MCP**

MCP reaches **ci** through the `ci` tool, which names its 2 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "get_ci_fleet"
         }
       }
     }'
```

---

[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)
