> ## Documentation Index
> Fetch the complete documentation index at: https://veryfront.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List environment variables

> List the variables of an environment, with masked values.

`environmentVariables(input: EnvironmentVariablesInput!): EnvironmentVariablePage!`

Requires project.read.

## Arguments

| Argument | Type | Required |
| - | - | - |
| `input` | [`EnvironmentVariablesInput!`](https://veryfront.com/docs/cloud/graphql/types/environmentvariablesinput) | Yes |

## Input fields

### input

[`EnvironmentVariablesInput`](https://veryfront.com/docs/cloud/graphql/types/environmentvariablesinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `environmentId` | [`ID!`](https://veryfront.com/docs/cloud/graphql/types/id) | Yes | Environment UUID. |
| `keys` | [`[String!]`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Only these keys, at most 100 of at most 255 characters each. The filter applies before pagination; a key that does not exist is not in data. |
| `limit` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No | Variables per page, 1 to 100 (default 20). |
| `cursor` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | pageInfo.endCursor of the previous page; send it with the same sort. |
| `sortBy` | [`EnvironmentVariableSortBy`](https://veryfront.com/docs/cloud/graphql/types/environmentvariablesortby) | No | Sort field: key (default) or updated\_at. The variable ID breaks ties. |
| `sortOrder` | [`EnvironmentVariableSortOrder`](https://veryfront.com/docs/cloud/graphql/types/environmentvariablesortorder) | No | Sort direction: asc (default) or desc. |

## Response

Returns [`EnvironmentVariablePage!`](https://veryfront.com/docs/cloud/graphql/types/environmentvariablepage). Open the type for its fields and nested types.

| Field | Type | Description |
| - | - | - |
| `data` | [`[EnvironmentVariable!]!`](https://veryfront.com/docs/cloud/graphql/types/environmentvariable) | Variables of this page. |
| `pageInfo` | [`PageInfo!`](https://veryfront.com/docs/cloud/graphql/types/pageinfo) | Continue from endCursor while hasNextPage is true. |

Types marked with `!` cannot be null. Lists use `[Type]` notation. The [type index](https://veryfront.com/docs/cloud/graphql/schema.md) lists all published input and response types.

## Example

```graphql title="query.graphql" theme={null}
query EnvironmentVariables($input: EnvironmentVariablesInput!) {
  environmentVariables(input: $input) {
    data {
      id
      hasValue
      key
      value
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "environmentId": "00000000-0000-4000-8000-000000000001"
  }
}
```

<details>
  <summary>Try this query</summary>

  Calls use `https://api.veryfront.com/graphql`. Replace sample values with resources you can access. See [Authentication](https://veryfront.com/docs/cloud/authentication.md) for credentials and permissions.

  Bearer token or API key

  Stored in this tab's session. Clear credential

  Query

  Variables (JSON)
</details>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.