As described in the subject:
curl --request GET \
--url https://api.bitbucket.org/2.0/workspaces/{...}/pipelines-config/variables \
--header 'Authorization: REDACTED'
results in this response body:
{
"page": 1,
"values": [
{
"type": "pipeline_variable",
"uuid": "{d7b6444b-be17-4eef-a759-95fba11291af}",
"key": "REDACTED",
"value": "REDACTED",
"secured": false,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{84925f70-c37f-4cde-83d7-d191869d425b}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{1361b85b-744c-44a2-96be-c2ce284f7ced}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{2104ca5a-6994-4936-a374-1df2dcc1e2d7}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{2e9768a4-cbec-4778-a92e-b31daa7dc612}",
"key": "REDACTED",
"value": "REDACTED",
"secured": false,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{a1cab633-ac1a-40e1-b823-1f7a6645a793}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{86b29f5a-e64e-4e9a-9e17-a0d88f595e27}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{d6a72e44-0903-48b7-ab70-81e574a02202}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{b8d31c4d-f273-40a1-8de1-ca7edb936b10}",
"key": "REDACTED",
"secured": true,
"system": false,
"scope": "ACCOUNT"
},
{
"type": "pipeline_variable",
"uuid": "{5a6dcb7d-e679-4bfb-83f9-b4f4c0158bab}",
"key": "REDACTED",
"value": "REDACTED",
"secured": false,
"system": false,
"scope": "ACCOUNT"
}
],
"size": 68,
"pagelen": 10
}
As you can see there are 68 variables however no `next` URL is included. I have increased pagelen to 100 in my queries for now as a workaround.
Hey @Alex Honeywell
Welcome to the community!
Can you try to use the following pagelen and let me know if that works?
curl -u Username:AppPassword -X GET -H "Content-Type: application/json" https://api.bitbucket.org/2.0/repositories/workspace-id/repo-slug/pipelines_config/variables/?pagelen=100
Regards,
Syahrul
Hi Syahrul, this issue is specifically about the `/2.0/workspaces/...` endpoint, the one you mention is for repositories only and does not include any workspace-scope variables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.