---
title: "Reveal an environment variable"
method: GET
path: "/api/v1/pipelines/{pipelineId}/env/{key}"
tags: ["Pipelines"]
---

# Reveal an environment variable

`GET /api/v1/pipelines/{pipelineId}/env/{key}`

## Request

- Base URL: `https://app.khotan.com`
- URL: `https://app.khotan.com/api/v1/pipelines/{pipelineId}/env/{key}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`

Returns the decrypted value of one environment variable for a single environment (defaults to production; pass ?target=preview|development). Treat the value as a secret. Every reveal is audit-logged with the key name and caller; the value itself is never logged.

## Path parameters

- `pipelineId` string, required
- `key` string, required

## Query parameters

- `target` 'production' | 'preview' | 'development'

## Response `200`

The decrypted value.

- object
  - `key` string, required
  - `value` string, required

## Other responses

- `401`: Authentication is missing or invalid.
- `404`: The resource was not found.
- `409`: Response.
- `429`: Too many requests; retry after the indicated delay.
- `502`: Response.

---

[API](https://skmtc.dev/khotan/apis/khotan-api.md) - [All operations](https://skmtc.dev/khotan/apis/khotan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/khotan/apis/khotan-api/revisions/90b512a53e42?raw)
