---
title: "List deployment variables by deployment"
method: GET
path: "/v1/workspaces/{workspaceId}/deployments/{deploymentId}/variables"
---

# List deployment variables by deployment

`GET /v1/workspaces/{workspaceId}/deployments/{deploymentId}/variables`

Returns a list of variables for a deployment, including their configured values.

## Path parameters

- `workspaceId` string, required
- `deploymentId` string, required

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

Paginated list of items

- object
  - `items` DeploymentVariableWithValues[], required
    - `values` DeploymentVariableValue[], required
      - `deploymentVariableId` string, required
      - `id` string, required
      - `priority` integer, required
      - `resourceSelector` string — A CEL expression to select which resources this value applies to
      - `value` union, required
        - union
          - boolean
          - number
          - integer
          - string
          - ObjectValue
            - `object` object, required
          - true
        - ReferenceValue
          - `path` string[], required
          - `reference` string, required
        - SensitiveValue
          - `valueHash` string, required
    - `variable` DeploymentVariable, required
      - `deploymentId` string, required
      - `description` string
      - `id` string, required
      - `key` string, required
  - `limit` integer, required — Maximum number of items returned
  - `offset` integer, required — Number of items skipped
  - `total` integer, required — Total number of items available

## Changes

- **2026-04-23** `4d1982997771` — 1 warning
  - removed the optional property `items/items/variable/defaultValue` from the response with the `200` status
- **2026-03-11** `71783130f04a` — 1 breaking, 1 info
  - the `items/items/values/items/resourceSelector` response's property type/format changed from ``/`` to `string`/`` for status `200`
  - removed `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` from the `items/items/values/items/resourceSelector` response property `oneOf` list for the response status `200`
- **2026-02-19** `4107c747f3f1` — 1 info
  - api operation id `listDeploymentVariables` removed and replaced with `listDeploymentVariablesByDeployment`
- **2026-02-19** `e61389fc98ac` — 2 breaking, 2 info
  - added `#/components/schemas/JsonSelector, #/components/schemas/CelSelector` to the `items/items/values/items/resourceSelector` response property `oneOf` list for the response status `200`
  - the `items/items/values/items/resourceSelector` response's property type/format changed from `string`/`` to ``/`` for status `200`
  - api operation id `listDeploymentVariablesByDeployment` removed and replaced with `listDeploymentVariables`
  - added the optional property `items/items/variable/defaultValue` to the response with the `200` status

[Change history](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/changes/v1/workspaces/:workspaceId/deployments/:deploymentId/variables/get.md)

---

[API](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api.md) · [All operations](https://skmtc.dev/ctrlplanedev/apis/ctrlplane-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/ctrlplanedev/ctrlplane-api/revisions/156e0d264995/schema)
