List environment variables

Returns the list of defined environment variables. If no query params are set, returns only workspace-scoped variables. Restricted to admins only.

Required scopes: WORKSPACE, VARIABLE_INFO

Resource URL

GET /workspaces/:domain/variables

URL Parameters

NameTypeDescription
domain
Required
StringThe workspace domain.

GET Parameters

NameTypeDescription
projectNameStringIf set, only variables defined for the desired project will be returned.
pipelineIdIntegerIf set, only variables defined for the desired pipeline will be returned.
actionIdIntegerIf set, only variables defined for the desired action will be returned.

Example

Request

GET https://api.buddy.works/workspaces/buddy/variables

Example Response

HTTP

Status: 200 OK
X-Rate-Limit-Limit: 1
X-Rate-Limit-Remaining: 999

JSON

{
"url": "https://api.buddy.works/workspaces/buddy/variables",
"html_url": "https://app.buddy.works/buddy/environment-variables",
"variables": [
{
"url": "https://api.buddy.works/workspaces/buddytest/variables/1",
"id": 1,
"key": "VAR1",
"value": "",
"ssh_key": false,
"settable": true,
"encrypted": false,
"description": "Some important variable"
},
{
"url": "https://api.buddy.works/workspaces/buddytest/variables/2",
"id": 2,
"key": "VAR2",
"value": "secure!aF8xss5uNaak4fMKtm4VKxA==",
"ssh_key": false,
"settable": false,
"encrypted": true,
"description": "Some secret variable"
}
]
}