---
title: "Get Environment Variables"
method: GET
path: "/v0/sites/{site_id}/environments/{env_id}/variables"
tags: ["sites"]
---

# Get Environment Variables

`GET /v0/sites/{site_id}/environments/{env_id}/variables`

Retrieves environment variables for an environment.

## Path parameters

- `site_id` string, required
- `env_id` string, required

## Response `200`

- EnvironmentVariables — Only exposes fields that are actually used by Terminus commands.
  - `CACHE_BINDING_ID` string — Cache binding ID
  - `CACHE_HOST` string — Cache host
  - `CACHE_PASSWORD` string — Cache (Redis) password
  - `CACHE_PORT` string — Cache (Redis) port
  - `DB_NAME` string — Database name
  - `DB_PASSWORD` string — Database password
  - `DB_PORT` string — Database port
  - `DB_USER` string — Database username

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.net/pantheon/apis/pantheon-public-api-service.md) · [All operations](https://skmtc.net/pantheon/apis/pantheon-public-api-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pantheon/pantheon-public-api-service/revisions/94758829689e/schema)
