# environment

```graphql
query Environment($input: GetEnvironmentInput!) {
  environment(input: $input) {
    id
    name
    projectId
    protected
    domains
    environmentVariables {
      id
      key
      value
      hasValue
    }
    createdAt
    updatedAt
    deployment {
      id
      releaseId
      environmentId
      userId
      createdAt
      updatedAt
    }
  }
}
```

Get an environment. Requires project.read.

## Arguments

| Name       | Type                 | Required | Description |
| ---------- | -------------------- | -------- | ----------- |
| `input`    | GetEnvironmentInput! | Yes      |             |
| `input.id` | ID!                  | Yes      |             |

## Variables

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

## Responses

| Status | Description                          |
| ------ | ------------------------------------ |
| 200    | The Environment in data.environment. |

## 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 Environment($input: GetEnvironmentInput!) {\n  environment(input: $input) {\n    id\n    name\n    projectId\n    protected\n    domains\n    environmentVariables {\n      id\n      key\n      value\n      hasValue\n    }\n    createdAt\n    updatedAt\n    deployment {\n      id\n      releaseId\n      environmentId\n      userId\n      createdAt\n      updatedAt\n    }\n  }\n}",
  "variables": {
    "input": {
      "id": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "environment": {
      "id": "string",
      "name": "string",
      "projectId": "string",
      "protected": false,
      "domains": [
        "string"
      ],
      "environmentVariables": [
        {
          "id": "string",
          "key": "string",
          "value": "string",
          "hasValue": false
        }
      ],
      "createdAt": "2026-01-01T00:00:00Z",
      "updatedAt": "2026-01-01T00:00:00Z",
      "deployment": {
        "id": "string",
        "releaseId": "string",
        "environmentId": "string",
        "userId": "string",
        "createdAt": "2026-01-01T00:00:00Z",
        "updatedAt": "2026-01-01T00:00:00Z"
      }
    }
  }
}
```
