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:
https://api.bitbucket.org/2.0/repositories/accountName/repo_slug/pipelines_config/variables/?pagelen=20&page=1
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
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.
@Yana
Can I get a reference to the bug for follow up purposes?
It looks like you're new here. Sign in or register to get started.