# List environment files

```http
GET /projects/{project_reference}/environments/{environment_name}/files
```

List environment files. Requires project.read.

## Parameters

| Name                       | In    | Required | Description                                                                                         |
| -------------------------- | ----- | -------- | --------------------------------------------------------------------------------------------------- |
| `project_reference`        | path  | Yes      | Project slug, UUID, or domain that identifies the project.                                          |
| `environment_name`         | 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 environment with selectable response fields.                                 |
| 400    | Invalid fields, filter, sort, cursor, or page size; limit must be an integer from 1 to 100. |
| 401    | Unauthorized                                                                                |
| 403    | Forbidden - insufficient project permissions                                                |
| 404    | Not found                                                                                   |
| 500    | Server error                                                                                |
