Description
Returns every workspace-level variable with its values and scope filters. Use the /api/project/workspace-variable endpoints to import these into projects.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
workspaceId |
query | string | yes | ID of the workspace. |
Secret values
When the organization hides secret values (Organization settings, on by default for organizations created after this setting was introduced), theValue is null for every value of a Secret variable. Secrets are then write-only: create and update keep working, but the value cannot be read back. To change a secret's scope without resending it, update the value and omit theValue.
A service account that genuinely needs to read secrets can be given the Secret reader role for all workspaces or for this workspace. A role pinned to an environment or a project does not unlock secrets.
Errors
| Status | Meaning |
|---|---|
400 |
Invalid workspaceId. |
401 |
Missing or invalid Basic auth credentials, or the service account lacks the required role. |