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
Name | Type | Description |
---|---|---|
domain Required | String | The workspace domain. |
GET Parameters
Name | Type | Description |
---|---|---|
projectName | String | If set, only variables defined for the desired project will be returned. |
pipelineId | Integer | If set, only variables defined for the desired pipeline will be returned. |
actionId | Integer | If 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 OKX-Rate-Limit-Limit: 1X-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"}]}