# List branches

Source: https://docs.wabe.sh/api-reference/operations/listbranches/

`GET https://api.wabe.sh/v1/disks/{disk}/branches`

List the filesystem branches on a disk. Use a branch name in the branch query parameter to select it for file or execution requests.

## Authorization

Project API key from the Wabe Dashboard or actor runtime access token for the disk URL supplied by the broker.

## Parameters

- `disk` (path, string, required) — Project disk name, or the disk ID in the actor runtime disk URL.

## Responses

### 200

One JSON record per branch, separated by newlines.

`application/x-ndjson`

Example

```text
{"id":"8ec08f61-c6b4-4f3a-83e9-d46ae3e5bc30","name":"main","root_directory_id":"7c8fd44b-019f-4a0c-94bf-627a04d5d07f","revision":0,"base_commit":null,"head_commit":null}
```

Schema

```json
{
  "type": "string"
}
```

Stream record schema

```json
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "root_directory_id": {
      "type": "string",
      "format": "uuid"
    },
    "revision": {
      "type": "integer",
      "minimum": 0
    },
    "base_commit": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "head_commit": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    }
  },
  "required": [
    "id",
    "name",
    "root_directory_id",
    "revision",
    "base_commit",
    "head_commit"
  ],
  "additionalProperties": false
}
```

### 400

Invalid input.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 401

Missing, invalid or revoked project API key, or an invalid runtime access token.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 403

Actor runtime token does not authorize this disk or instance generation.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```

### 404

Object was not found.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 409

Conflict, nonempty destination or referenced object.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 500

Storage, I/O or corruption failure.

`text/plain`

Schema

```json
{
  "type": "string"
}
```

### 503

Disk unavailable.

`application/json`

Schema

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}
```
