---
title: "listRepoBranchCIRuns"
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# listRepoBranchCIRuns

Path: Forge API › ciRuns

`GET /repos/{repo_id}/branches/{branch}/ci-runs`

List the CI runs and their findings on the branch's head commit.

## Path parameters

- `repo_id` (`listRepoBranchCIRuns.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `branch` (`listRepoBranchCIRuns.path.branch`; string, required)
  - minLength: `1`

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/ci-runs'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/ci-runs';
const options = {method: 'GET'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/branches/<branch>/ci-runs"

response = requests.get(url)

print(response.text)
```

## Responses

### 200

CommitCIRuns

#### Example

```json
{
  "pending": true,
  "runs": [
    {
      "id": "string",
      "ci_check_record_id": "string",
      "commit_id": "string",
      "status": "passed",
      "error_message": "string",
      "forge_version": "string",
      "started_at": "string",
      "finished_at": "string",
      "findings": [
        {
          "id": "string",
          "key": "string",
          "message": "string",
          "target_record_id": "string",
          "target_field_key": "string"
        }
      ]
    }
  ]
}
```

- `pending` (`listRepoBranchCIRuns.response.200.pending`; boolean, required)
- `runs` (`listRepoBranchCIRuns.response.200.runs`; array of object, required)
  - `id` (`listRepoBranchCIRuns.response.200.runs.id`; string, required)
    - pattern: `^ci_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `ci_check_record_id` (`listRepoBranchCIRuns.response.200.runs.ci_check_record_id`; string, required)
    - pattern: `^ci_check_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `commit_id` (`listRepoBranchCIRuns.response.200.runs.commit_id`; string, required)
    - pattern: `^commit_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `status` (`listRepoBranchCIRuns.response.200.runs.status`; string, required)
    - one of `"passed"`, `"failed"`, `"errored"`
  - `error_message` (`listRepoBranchCIRuns.response.200.runs.error_message`; any of, required)
    - any of the following: `string`, `null`
  - `forge_version` (`listRepoBranchCIRuns.response.200.runs.forge_version`; string, required)
    - minLength: `1`
  - `started_at` (`listRepoBranchCIRuns.response.200.runs.started_at`; string, required)
  - `finished_at` (`listRepoBranchCIRuns.response.200.runs.finished_at`; string, required)
  - `findings` (`listRepoBranchCIRuns.response.200.runs.findings`; array of object, required)
    - `id` (`listRepoBranchCIRuns.response.200.runs.findings.id`; string, required)
      - pattern: `^ci_finding_[0-7][0-9a-hjkmnp-tv-z]{25}$`
    - `key` (`listRepoBranchCIRuns.response.200.runs.findings.key`; string, required)
      - minLength: `1`
    - `message` (`listRepoBranchCIRuns.response.200.runs.findings.message`; string, required)
      - minLength: `1`
    - `target_record_id` (`listRepoBranchCIRuns.response.200.runs.findings.target_record_id`; any of, required)
      - any of the following: `TypeId`, `null`
    - `target_field_key` (`listRepoBranchCIRuns.response.200.runs.findings.target_field_key`; any of, required)
      - any of the following: `string`, `null`

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`listRepoBranchCIRuns.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`listRepoBranchCIRuns.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`listRepoBranchCIRuns.response.400.issues`; array of object, required)
  - `path` (`listRepoBranchCIRuns.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`listRepoBranchCIRuns.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`listRepoBranchCIRuns.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

BranchNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "BranchNotFound",
  "branch": "string"
}
```

Any of the following:

- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`listRepoBranchCIRuns.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`listRepoBranchCIRuns.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`listRepoBranchCIRuns.response.500.reason`; string, required)

### 503

SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "SessionUnavailable"
}
```

Any of the following:

- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/list-repo-branch-ci-runs/index.md
