# List environment variables

```http
GET /projects/{project_reference}/environments/{environment_id}/variables
```

List the variables of an environment, with masked values. Requires project.read.

## Parameters

| Name                | In    | Required | Description                                                                             |
| ------------------- | ----- | -------- | --------------------------------------------------------------------------------------- |
| `project_reference` | path  | Yes      |                                                                                         |
| `environment_id`    | path  | Yes      | Environment ID containing the variable.                                                 |
| `cursor`            | query |          | Cursor for pagination (environment variable ID).                                        |
| `limit`             | query |          | Maximum number of environment variables to return. Defaults to 20 and is capped at 100. |
| `sort_by`           | query |          | Sort field. Defaults to "key".                                                          |
| `sort_order`        | query |          | Sort order. Defaults to "asc".                                                          |
| `keys`              | query |          |                                                                                         |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | One page of the environment variables, values masked                                                        |
| 400    | Bad request                                                                                                 |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden                                                                                                   |
| 404    | Not found                                                                                                   |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
