# environmentVariable

```graphql
query EnvironmentVariable($input: GetEnvironmentVariableInput!) {
  environmentVariable(input: $input) {
    id
    key
    value
    hasValue
  }
}
```

Get the masked metadata of one environment variable. Requires project.read.

## Arguments

| Name                  | Type                         | Required | Description       |
| --------------------- | ---------------------------- | -------- | ----------------- |
| `input`               | GetEnvironmentVariableInput! | Yes      |                   |
| `input.environmentId` | ID!                          | Yes      | Environment UUID. |
| `input.key`           | String!                      | Yes      | Variable key.     |

## Variables

```json
{
  "input": {
    "environmentId": "string",
    "key": "string"
  }
}
```

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The EnvironmentVariable! in data.environmentVariable. |

## 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 EnvironmentVariable($input: GetEnvironmentVariableInput!) {\n  environmentVariable(input: $input) {\n    id\n    key\n    value\n    hasValue\n  }\n}",
  "variables": {
    "input": {
      "environmentId": "string",
      "key": "string"
    }
  }
}'
```

## Example response

```json
{
  "data": {
    "environmentVariable": {
      "id": "string",
      "key": "string",
      "value": "string",
      "hasValue": false
    }
  }
}
```
