I need to get the UUID of all repository variables which is possible only through Bitbucket rest api. The requirement of this is I need to update variables using a script for which variable's UUID is must.
Here is my curl request:
curl --header 'Authorization: Bearer <access-token>' --header 'Accept: application/json' --url https://api.bitbucket.org/2.0/repositories/<workspace-name>/<repo-slug>/pipelines_config/variables/
"List Variables for a repository" API is giving values only for some variables. For the other variables, it is giving a next token.
Using next token, I am not able to list the other values. Here is how I tried:
curl --header 'Authorization: Bearer <access-token>' --header 'Accept: application/json' --url <next-token>
I am getting errors when trying to do it:
```
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>403 ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
Bad request.
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront)
Request ID: some-id
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
```
Not sure why there isn't any proper documentation for these type of actions in Bitbucket. Bitbucket documentation is not clear at all.
Please help me with this.
Thanks in advance!