> ## 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 environments

> List environments.

`environmentsPage(input: EnvironmentsPageInput!): EnvironmentList!`

Requires project.read.

## Arguments

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

## Input fields

### input

[`EnvironmentsPageInput`](https://veryfront.com/docs/cloud/graphql/types/environmentspageinput)

| Field | Type | Required | Description |
| - | - | - | - |
| `projectReference` | [`String!`](https://veryfront.com/docs/cloud/graphql/types/string) | Yes | Project ID or slug. |
| `cursor` | [`String`](https://veryfront.com/docs/cloud/graphql/types/string) | No | Cursor for pagination: an environment ID from this project. An unknown cursor is rejected. |
| `limit` | [`Int`](https://veryfront.com/docs/cloud/graphql/types/int) | No | Page size, 1 to 100. Defaults to 20. |
| `sortBy` | [`EnvironmentSortBy`](https://veryfront.com/docs/cloud/graphql/types/environmentsortby) | No | Sort field. Defaults to name. |
| `sortOrder` | [`EnvironmentSortOrder`](https://veryfront.com/docs/cloud/graphql/types/environmentsortorder) | No | Sort order. Defaults to asc. |

## Response

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

| Field | Type |
| - | - |
| `data` | [`[Environment!]!`](https://veryfront.com/docs/cloud/graphql/types/environment) |
| `pageInfo` | [`PageInfo!`](https://veryfront.com/docs/cloud/graphql/types/pageinfo) |

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 EnvironmentsPage($input: EnvironmentsPageInput!) {
  environmentsPage(input: $input) {
    data {
      id
      projectId
      name
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      endCursor
      hasPreviousPage
      startCursor
    }
  }
}
```

```json title="variables.json" theme={null}
{
  "input": {
    "projectReference": "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.