# environmentsPage

```graphql
query EnvironmentsPage($input: EnvironmentsPageInput!) {
  environmentsPage(input: $input) {
    data {
      id
      name
      projectId
      protected
      domains
      createdAt
      updatedAt
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
  }
}
```

List environments. Requires project.read.

## Arguments

| Name                     | Type                   | Required | Description                                                                                |
| ------------------------ | ---------------------- | -------- | ------------------------------------------------------------------------------------------ |
| `input`                  | EnvironmentsPageInput! | Yes      |                                                                                            |
| `input.projectReference` | String!                | Yes      | Project ID or slug.                                                                        |
| `input.cursor`           | String                 |          | Cursor for pagination: an environment ID from this project. An unknown cursor is rejected. |
| `input.limit`            | Int                    |          | Page size, 1 to 100. Defaults to 20.                                                       |
| `input.sortBy`           | EnvironmentSortBy      |          | Sort field. Defaults to name. One of `name`, `updated_at`.                                 |
| `input.sortOrder`        | EnvironmentSortOrder   |          | Sort order. Defaults to asc. One of `asc`, `desc`.                                         |

## Variables

```json
{
  "input": {
    "projectReference": "string"
  }
}
```

## Responses

| Status | Description                                    |
| ------ | ---------------------------------------------- |
| 200    | The EnvironmentList! in data.environmentsPage. |

## Call it

```bash
curl -X POST "https://api.veryfront.com/graphql" \
  -H "Authorization: Bearer $VERYFRONT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "query": "query EnvironmentsPage($input: EnvironmentsPageInput!) {\n  environmentsPage(input: $input) {\n    data {\n      id\n      name\n      projectId\n      protected\n      domains\n      createdAt\n      updatedAt\n    }\n    pageInfo {\n      hasNextPage\n      hasPreviousPage\n      startCursor\n      endCursor\n    }\n  }\n}",
  "variables": {
    "input": {
      "projectReference": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "environmentsPage": {
      "data": [
        {
          "id": "string",
          "name": "string",
          "projectId": "string",
          "protected": false,
          "domains": [
            "string"
          ],
          "createdAt": "2026-01-01T00:00:00Z",
          "updatedAt": "2026-01-01T00:00:00Z"
        }
      ],
      "pageInfo": {
        "hasNextPage": false,
        "hasPreviousPage": false,
        "startCursor": "string",
        "endCursor": "string"
      }
    }
  }
}
```
