---
title: "Get Environment Variable"
method: GET
path: "/environment/{workspace}/{variable_name}"
---

# Get Environment Variable

`GET /environment/{workspace}/{variable_name}`

## Request

- Base URL: `https://client.apimetrics.io/api/2`
- URL: `https://client.apimetrics.io/api/2/environment/{workspace}/{variable_name}`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/apicontext/apis/api-settings/docs/environment/:workspace/:variable_name/get.ts> (a function with typed inputs; its response is checked against the schema)

Use this API to get the value of an Environment Variable.

## Path parameters

- `workspace` string, required
- `variable_name` string, required

## Response `200`

200

- object
  - `meta` object
    - `updated` string
    - `workspace` string
    - `created` string
  - `workspace_variable` object
    - `name` string
    - `value` string
  - `id` string

## Other responses

- `400`: 400

---

[API](https://skmtc.dev/apicontext/apis/api-settings.md) - [All operations](https://skmtc.dev/apicontext/apis/api-settings/llms.txt) - [OpenAPI document](https://skmtc.dev/apicontext/apis/api-settings/revisions/2e9a62324e82?raw)
