---
title: "\"Needs you\": open branches that are ready, conflicting or failing, and issues assigned to the person, across their monorepos"
description: "`issues`: per monorepo, the open issues assigned to the person, read\nfrom each monorepo's summary line (up to 10 s behind; the person's\nsocket's `summary` frame moves it, its `assigned`; a large monorepo's\nis read from it, current), most recently updated first, with the\nnewest one.\n\nBranches: from stored branch facts and statuses (no Artifacts call), asked only\nof the monorepos whose counts in their summary line are not zero (up\nto 10 s behind), most recently active first, at most 50 monorepos (the\nrest in `skipped`). One state per branch, in this order:\n- `conflicts`: the stored dry run for the branch's current head\n  conflicts with main;\n- `failing`: a check on the head failed or errored;\n- `ready`: facts for the current main and head say clean, and the\n  merge gate's checks pass.\nFacts are computed for branches pushed in the last 7 days; an older\nbranch that is not re-pushed drops out of `ready` when main moves.\nRows are newest push first.\n"
---

> 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 › branches

`GET /v1/branches`

`issues`: per monorepo, the open issues assigned to the person, read
from each monorepo's summary line (up to 10 s behind; the person's
socket's `summary` frame moves it, its `assigned`; a large monorepo's
is read from it, current), most recently updated first, with the
newest one.

Branches: from stored branch facts and statuses (no Artifacts call), asked only
of the monorepos whose counts in their summary line are not zero (up
to 10 s behind), most recently active first, at most 50 monorepos (the
rest in `skipped`). One state per branch, in this order:
- `conflicts`: the stored dry run for the branch's current head
  conflicts with main;
- `failing`: a check on the head failed or errored;
- `ready`: facts for the current main and head say clean, and the
  merge gate's checks pass.
Facts are computed for branches pushed in the last 7 days; an older
branch that is not re-pushed drops out of `ready` when main moves.
Rows are newest push first.

## Authentication

Requires one of the following:

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

## Query parameters

- `listNeeds.query.state` (string, optional)
  - one of `"open"`; default `"open"`
- `listNeeds.query.needs` (string, optional) — Comma-separated, some of ready, conflicts, failing (default all three).
  - default `"ready,conflicts,failing"`
- `listNeeds.query.in` (string, optional) — One monorepo's `owner/name`.
- `listNeeds.query.limit` (integer, optional)
  - min 1; max 500; default `100`

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://app.gitpando.com/v1/branches';
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/branches"

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "branches": [
    {
      "monorepo": "string",
      "monorepo_id": "string",
      "repo": "string",
      "repo_path": "string",
      "branch": "string",
      "title": "string",
      "head": "string",
      "author": "string",
      "pushed_machine": "string",
      "state": "ready",
      "checks": {
        "state": "string",
        "failing": [
          "string"
        ],
        "failing_apps": {
          "property1": "string",
          "property2": "string"
        }
      },
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ],
  "issues": [
    {
      "monorepo": "string",
      "monorepo_id": "string",
      "count": 0,
      "newest": {
        "number": 0,
        "title": "string",
        "updated_at": "2019-08-24T14:15:22Z"
      }
    }
  ],
  "truncated": true,
  "skipped": [
    "string"
  ]
}
```

- `listNeeds.response.200.branches` (array<object>, required)
  - `listNeeds.response.200.branches.monorepo` (string, required) — `owner/name`.
  - `listNeeds.response.200.branches.monorepo_id` (string, required)
  - `listNeeds.response.200.branches.repo` (string, required)
  - `listNeeds.response.200.branches.repo_path` (string, required)
  - `listNeeds.response.200.branches.branch` (string, required)
  - `listNeeds.response.200.branches.head` (string, required)
  - `listNeeds.response.200.branches.author` (string | null, required) — The user whose first push made the branch.
  - `listNeeds.response.200.branches.pushed_machine` (string | null, required) — The credential that last pushed it.
  - `listNeeds.response.200.branches.state` (string, required)
    - one of `"ready"`, `"conflicts"`, `"failing"`
  - `listNeeds.response.200.branches.checks` (object, required)
    - `listNeeds.response.200.branches.checks.state` (string, optional)
    - `listNeeds.response.200.branches.checks.failing` (array<string>, optional) — Contexts that failed or errored.
    - `listNeeds.response.200.branches.checks.failing_apps` (map<string | null>, optional) — For each failing context, the CI service that reported it (`app`, for its mark), or null when a member posted it.
  - `listNeeds.response.200.branches.updated_at` (string | null, required) — The last push.
    - format `date-time`
  - `listNeeds.response.200.branches.title` (string | null, optional)
- `listNeeds.response.200.issues` (array<unknown>, required)
  - `listNeeds.response.200.issues.monorepo` (string, required) — `owner/name`.
  - `listNeeds.response.200.issues.monorepo_id` (string, required)
  - `listNeeds.response.200.issues.count` (integer, required)
  - `listNeeds.response.200.issues.newest` (object, required)
    - `listNeeds.response.200.issues.newest.number` (integer, required)
    - `listNeeds.response.200.issues.newest.title` (string, required)
    - `listNeeds.response.200.issues.newest.updated_at` (string, required)
      - format `date-time`
- `listNeeds.response.200.truncated` (boolean, required)
- `listNeeds.response.200.skipped` (array<string>, required) — Monorepos (`owner/name`) not asked (over 50).

### 400

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"
        }
      ]
    }
  }
}
```

- `listNeeds.response.400.error` (object, required)
  - `listNeeds.response.400.error.code` (string, required)
  - `listNeeds.response.400.error.message` (string, required)
  - `listNeeds.response.400.error.paths` (array<string>, optional)
  - `listNeeds.response.400.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `listNeeds.response.400.error.checks.sha` (string | null, required)
    - `listNeeds.response.400.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"`
    - `listNeeds.response.400.error.checks.required` (array | null, required) — Null while unknown.
    - `listNeeds.response.400.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.
    - `listNeeds.response.400.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `listNeeds.response.400.error.checks.statuses.sha` (string, required)
      - `listNeeds.response.400.error.checks.statuses.context` (string, required)
      - `listNeeds.response.400.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `listNeeds.response.400.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `listNeeds.response.400.error.checks.statuses.target_url` (string | null, optional)
      - `listNeeds.response.400.error.checks.statuses.description` (string | null, optional)
      - `listNeeds.response.400.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.
      - `listNeeds.response.400.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.
    - `listNeeds.response.400.error.checks.missing` (array<string>, optional)

### 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"
        }
      ]
    }
  }
}
```

- `listNeeds.response.404.error` (object, required)
  - `listNeeds.response.404.error.code` (string, required)
  - `listNeeds.response.404.error.message` (string, required)
  - `listNeeds.response.404.error.paths` (array<string>, optional)
  - `listNeeds.response.404.error.checks` (object, optional) — GitHub's combined status, plus the required contexts and which are missing.
    - `listNeeds.response.404.error.checks.sha` (string | null, required)
    - `listNeeds.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"`
    - `listNeeds.response.404.error.checks.required` (array | null, required) — Null while unknown.
    - `listNeeds.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.
    - `listNeeds.response.404.error.checks.statuses` (array<object>, required) — The latest status per context.
      - `listNeeds.response.404.error.checks.statuses.sha` (string, required)
      - `listNeeds.response.404.error.checks.statuses.context` (string, required)
      - `listNeeds.response.404.error.checks.statuses.state` (string, required)
        - one of `"pending"`, `"success"`, `"failure"`, `"error"`
      - `listNeeds.response.404.error.checks.statuses.created_at` (string, required)
        - format `date-time`
      - `listNeeds.response.404.error.checks.statuses.target_url` (string | null, optional)
      - `listNeeds.response.404.error.checks.statuses.description` (string | null, optional)
      - `listNeeds.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.
      - `listNeeds.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.
    - `listNeeds.response.404.error.checks.missing` (array<string>, optional)


Source: https://docs.gitpando.com/api/branches/listNeeds/index.md
