Get variables
GET
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.
header
AuthorizationBearer <token>Scope: variable.read
project_id*stringThe unique identifier of the project
Match
^[a-zA-Z0-9_-]+$kind?stringThe kind of value to address. Omit it for both kinds.
Value in
"primary""preview"The variables were retrieved successfully.
application/json- 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.
Properties
1 <= propertiesExample 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?