I'm using v2 of the API
https://api.bitbucket.org/2.0/repositories/**/**/pipelines_config/variables/
This works fine up to 10 variables, after which it gives a pagination link for 'next'.... Which is a v1 url...
And the v1 probably uses a different authentication as it gives me an error of:
{"error":{"message":"Unauthorized","detail":"Missing valid JWT token","data":{"key":"rest-service.rest-service.unauthorized","arguments":{}}}}
It's incredibly frustrating working with this API...
Hi Chris,
Thank you for reporting this, I was able to reproduce this and will create a bug for it on our master site.
However as a workaround here is the example of the request that you can use to get more than 10 variables:
under "pagelen=20" you can specify how many results per page you would like to see.
Hope this helps
Cheers.
Yana
Great thanks.
Just a note that parameter is also not documented in the docs here: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pipelines_config/variables/#get
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've run into this same bug. Are there other workarounds?
I'm currently using basic authorization using an App Password, but if one can acquire a JWT token from just the App Password (Resource Owner Password Credentials grant?), I'd be happy to switch to that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andrew,
Of course, here you go:
https://bitbucket.org/site/master/issues/16233/api-call-to-environment-variables-end
Cheers.
Yana
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.