Get a deployment's variables
GET
Returns the variable values the deployment froze when it was made. Later
changes to the project's variables do not affect them. A secret reads
back as {"secret": true}.
oauth2 deployment.read, variable.readheader
AuthorizationBearer <token>Scope: deployment.read, variable.read
deployment_id*stringThe unique identifier of the deployment.
Match
^dep_[a-zA-Z0-9_-]+$project_id*stringThe unique identifier of the project
Match
^[a-zA-Z0-9_-]+$The deployment's variables were retrieved successfully.
application/json- response
The variables a deployment froze, keyed by name.
An empty object is an ordinary answer, not an error.
[key: string]?|||One resolved variable. A non-secret variable is its value; a secret is an object saying so and withholding the value.
The two forms mirror the update body, so a value read here can be written back unchanged — with the one asymmetry that a secret read back has no value to write.
Example Request
import { createZitadelClient } from "@zitadel/api/client";const client = createZitadelClient({ baseUrl: process.env.ZITADEL_URL ?? "http://localhost:8080", token: process.env.ZITADEL_PROJECT_SECRET!, // server-side only});const deploymentVariables = await client.getDeploymentVariables( "dep_01KX4SB9C8E1F0N9WD3P2E4YM5", { project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" },);Example Response
{ "property1": "string", "property2": "string"}Was this helpful?