---
title: "A build and its jobs"
---

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

Path: Pando API › ci

`GET /v1/monorepos/{owner}/{monorepo}/ci/builds/{build}`

## Authentication

Requires one of the following:

- `credential`, http, header `Authorization`
- `session`, apiKey, in cookie

## Path parameters

- `getCiBuild.path.owner` (string, required) — The monorepo's owner, a namespace (a person's login or an organization). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9]|-(?=[a-z0-9])){0,38}$`
- `getCiBuild.path.monorepo` (string, required) — The monorepo's name within its owner (or an old name). Matched without case.
  - pattern `^[a-z0-9](?:[a-z0-9._]|-(?!-)){0,38}$`
- `getCiBuild.path.build` (string, required) — Pando's build id (`cib_<16 hex>`).

## Code samples

### cURL

```curl
curl --request GET \
  --url https://app.gitpando.com/v1/monorepos/string/string/ci/builds/string \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/monorepos/string/string/ci/builds/string';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

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

### Python

```python
import requests

url = "https://app.gitpando.com/v1/monorepos/string/string/ci/builds/string"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "id": "string",
  "service": "string",
  "connection": "string",
  "pipeline": "string",
  "number": 0,
  "repo": "string",
  "repo_path": "string",
  "sha": "string",
  "branch": "string",
  "message": "string",
  "state": "queued",
  "service_state": "string",
  "web_url": "string",
  "pushed_by": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "started_at": "2019-08-24T14:15:22Z",
  "finished_at": "2019-08-24T14:15:22Z",
  "duration_s": 0,
  "rebuilt_from": "string",
  "jobs": [
    {
      "id": "string",
      "build": "string",
      "name": "string",
      "step_key": "string",
      "type": "string",
      "state": "queued",
      "service_state": "string",
      "exit_status": 0,
      "soft_failed": true,
      "retried": true,
      "web_url": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "started_at": "2019-08-24T14:15:22Z",
      "finished_at": "2019-08-24T14:15:22Z",
      "duration_s": 0,
      "check": "string"
    }
  ]
}
```

- `getCiBuild.response.200.id` (string, required) — Pando's id (`cib_...`).
- `getCiBuild.response.200.service` (string, required)
- `getCiBuild.response.200.connection` (string, required)
- `getCiBuild.response.200.pipeline` (string, required)
- `getCiBuild.response.200.number` (integer, required)
- `getCiBuild.response.200.repo` (string, required)
- `getCiBuild.response.200.sha` (string | null, required) — Null when the service built no fixed commit.
- `getCiBuild.response.200.state` (string, required) — One vocabulary for every service. Buildkite's scheduled and waiting are queued, failing and canceling are running, not_run and broken are skipped; `service_state` keeps the service's own word.
  - one of `"queued"`, `"running"`, `"blocked"`, `"passed"`, `"failed"`, `"canceled"`, `"skipped"`
- `getCiBuild.response.200.service_state` (string, required)
- `getCiBuild.response.200.created_at` (string | null, required)
  - format `date-time`
- `getCiBuild.response.200.jobs` (array<object>, required) — First scheduled first. Wait steps are left out.
  - `getCiBuild.response.200.jobs.id` (string, required) — The service's job id.
  - `getCiBuild.response.200.jobs.build` (string, required)
  - `getCiBuild.response.200.jobs.type` (string, required) — `script`, `trigger` or `manual`.
  - `getCiBuild.response.200.jobs.state` (string, required) — One vocabulary for every service. Buildkite's scheduled and waiting are queued, failing and canceling are running, not_run and broken are skipped; `service_state` keeps the service's own word.
    - one of `"queued"`, `"running"`, `"blocked"`, `"passed"`, `"failed"`, `"canceled"`, `"skipped"`
  - `getCiBuild.response.200.jobs.service_state` (string, required)
  - `getCiBuild.response.200.jobs.check` (string | null, required) — The check (status context) it reports, its step key; null for jobs that report none.
  - `getCiBuild.response.200.jobs.name` (string | null, optional)
  - `getCiBuild.response.200.jobs.step_key` (string | null, optional)
  - `getCiBuild.response.200.jobs.exit_status` (integer | null, optional)
  - `getCiBuild.response.200.jobs.soft_failed` (boolean, optional)
  - `getCiBuild.response.200.jobs.retried` (boolean, optional) — A newer job replaced it (Retry).
  - `getCiBuild.response.200.jobs.web_url` (string | null, optional)
  - `getCiBuild.response.200.jobs.created_at` (string | null, optional)
    - format `date-time`
  - `getCiBuild.response.200.jobs.started_at` (string | null, optional)
    - format `date-time`
  - `getCiBuild.response.200.jobs.finished_at` (string | null, optional)
    - format `date-time`
  - `getCiBuild.response.200.jobs.duration_s` (integer | null, optional)
- `getCiBuild.response.200.repo_path` (string | null, optional)
- `getCiBuild.response.200.branch` (string | null, optional)
- `getCiBuild.response.200.message` (string | null, optional)
- `getCiBuild.response.200.web_url` (string | null, optional)
- `getCiBuild.response.200.pushed_by` (string | null, optional) — Who pushed the commit (a login), from Pando's own records; never the service's creator.
- `getCiBuild.response.200.started_at` (string | null, optional)
  - format `date-time`
- `getCiBuild.response.200.finished_at` (string | null, optional)
  - format `date-time`
- `getCiBuild.response.200.duration_s` (integer | null, optional)
- `getCiBuild.response.200.rebuilt_from` (string | null, optional) — The service's id of the build this one rebuilt.

### 404

An error

#### Example

```json
{
  "error": {
    "code": "string",
    "message": "string",
    "paths": [
      "string"
    ],
    "checks": {
      "sha": "string",
      "state": "success",
      "required": [
        "string"
      ],
      "checks_unknown": "string",
      "missing": [
        "string"
      ],
      "statuses": [
        {
          "sha": "string",
          "context": "string",
          "state": "pending",
          "target_url": "string",
          "description": "string",
          "creator": "string",
          "app": "string",
          "created_at": "2019-08-24T14:15:22Z"
        }
      ]
    }
  }
}
```

- `getCiBuild.response.404.error` (object, required)
  - `getCiBuild.response.404.error.code` (string, required)
  - `getCiBuild.response.404.error.message` (string, required)
  - `getCiBuild.response.404.error.paths` (array<string>, optional)
  - `getCiBuild.response.404.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `getCiBuild.response.404.error.checks.sha` (string | null, required)
    - `getCiBuild.response.404.error.checks.state` (string, required) — `success` when the merge gate passes; `missing` when a required context has not reported; `unknown` while the required checks are (an unforced merge is refused).
      - one of `"success"`, `"pending"`, `"failure"`, `"error"`, `"missing"`, `"unknown"`
    - `getCiBuild.response.404.error.checks.required` (array | null, required) — Null while unknown.
    - `getCiBuild.response.404.error.checks.checks_unknown` (string | null, required) — Why the required checks are unknown, in plain words: "Pando couldn't read this monorepo's required checks; try again", or "pando.toml line 3: expected comma or end of structure; fix it on main, or merge with force". Null otherwise.
    - `getCiBuild.response.404.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `getCiBuild.response.404.error.checks.statuses.sha` (string, required)
      - `getCiBuild.response.404.error.checks.statuses.context` (string, required)
      - `getCiBuild.response.404.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `getCiBuild.response.404.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `getCiBuild.response.404.error.checks.statuses.target_url` (string | null, optional)
      - `getCiBuild.response.404.error.checks.statuses.description` (string | null, optional)
      - `getCiBuild.response.404.error.checks.statuses.creator` (string, optional) — The member who posted it (a login); `app:<slug>` for a status posted with a status token or by a CI integration; `hook:<hook id>` for a status token from a web hook with no app.
      - `getCiBuild.response.404.error.checks.statuses.app` (string | null, optional) — The CI service that reported it (`buildkite`, `github-actions`, ...), stamped by Pando from a status token or a CI integration, never from the body or `target_url`. Null when a member posted it with their own credential. The web shows the service's mark for a slug it knows.
    - `getCiBuild.response.404.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/ci/getCiBuild/index.md
