Docs

Get variables

GET
/variables

Returns the project's variables, keyed by name, each with its value per kind. With kind, only that kind's values are returned.

Secret values are not returned. A secret appears as {"secret": true}, which says a value is held without disclosing it.

Authorization

headerAuthorizationBearer <token>

Scope: variable.read

Query Parameters

project_id*string

The unique identifier of the project

Match^[a-zA-Z0-9_-]+$
kind?string

The kind of value to address. Omit it for both kinds.

Value in"primary""preview"

Response Body

The variables were retrieved successfully.

application/json
  1. response

The project's variables, keyed by name, each with its value per kind.

An empty object is an ordinary answer, not an error.

[key: string]?

One variable's values, per kind. A kind with no value is absent.

Properties1 <= properties
Example Request
import { configureZitadel, getApi } from "@zitadel/api/config";// In the browser, through the SDK proxy: the session cookie authenticates the call.const client = getApi(configureZitadel({ projectId: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" }));const variables = await client.getVariables({ project_id: "proj_01KWH1P4MYS7F0N9WD3P2E4YM5" });
Example Response
{  "property1": {    "primary": "string",    "preview": "string"  },  "property2": {    "primary": "string",    "preview": "string"  }}

Was this helpful?