---
title: "Every worktree in the monorepo, across machines"
---

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

`GET /v1/monorepos/{owner}/{monorepo}/worktrees`

## Authentication

Requires one of the following:

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

## Path parameters

- `listWorktrees.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}$`
- `listWorktrees.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}$`

## Query parameters

- `listWorktrees.query.machine` (string, optional)
- `listWorktrees.query.repo` (string, optional) — A repo path.

## Code samples

### cURL

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

### TypeScript

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

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

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "worktrees": [
    {
      "id": "string",
      "repo": "string",
      "branch": "string",
      "path": "string",
      "machine": "string",
      "agent": "string",
      "kind": "fuse",
      "reported_by": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "last_seen_at": "2019-08-24T14:15:22Z"
    }
  ]
}
```

- `listWorktrees.response.200.worktrees` (array<object>, required)
  - `listWorktrees.response.200.worktrees.id` (string, required)
  - `listWorktrees.response.200.worktrees.repo` (string, required)
  - `listWorktrees.response.200.worktrees.branch` (string, required)
  - `listWorktrees.response.200.worktrees.path` (string, required)
  - `listWorktrees.response.200.worktrees.machine` (string, required)
  - `listWorktrees.response.200.worktrees.kind` (string, required)
    - one of `"fuse"`, `"sparse"`, `"fskit"`
  - `listWorktrees.response.200.worktrees.reported_by` (string, required) — The user whose credential reported it.
  - `listWorktrees.response.200.worktrees.created_at` (string, required)
    - format `date-time`
  - `listWorktrees.response.200.worktrees.last_seen_at` (string, required)
    - format `date-time`
  - `listWorktrees.response.200.worktrees.agent` (string | null, optional)


Source: https://docs.gitpando.com/api/worktrees/listWorktrees/index.md
