# List branch files

```http
GET /projects/{project_reference}/branches/{branchName}/files
```

List branch files. Requires project.read.

## Parameters

| Name                       | In    | Required | Description                                                                                         |
| -------------------------- | ----- | -------- | --------------------------------------------------------------------------------------------------- |
| `project_reference`        | path  | Yes      | Project slug, UUID, or domain that identifies the project.                                          |
| `branchName`               | path  | Yes      |                                                                                                     |
| `pattern`                  | query |          |                                                                                                     |
| `cursor`                   | query |          | Opaque cursor pointing at the next page. Omit it to read the first page.                            |
| `limit`                    | query |          |                                                                                                     |
| `sort_by`                  | query |          | Sort by path or last update time (default path).                                                    |
| `sort_order`               | query |          |                                                                                                     |
| `include_server_functions` | query |          |                                                                                                     |
| `fields`                   | query |          | Response projection, for example (id,path,size). Omit to return all file fields, including content. |

## Responses

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| 200    | Files from the branch with selectable response fields.   |
| 400    | Invalid file filter, fields, sort, cursor, or page size. |
| 401    | Unauthorized                                             |
| 403    | Forbidden - insufficient project permissions             |
| 404    | Not found                                                |
| 500    | Server error                                             |
