Hi,
I've been digging around in the post and have found that that if I use https://api.bitbucket.org/2.0/workspaces/<workspace>/permissions/repositories that I should have gotten a list of repositories and the users. However, I see that I'm only getting a partial list. I need to do an audit of our admin permission and I would like to see if it's possible to list out all the repositories and the administrators. If there is an example of how to do this in Python that is even better. Thank you in advance for your help.
We are on Bitbucket cloud if it makes a difference.
If you're only getting a partial list, it's possibly because that endpoint is paginated, and you need to tell it which page (and how many records per page) you want.
pagelen defaults to 10, but you can request as many as 100, which might be enough. Otherwise you'll need to make additional requests to get the next page until you get them all.
Pagination is a fairly common pattern, you can see examples of how to interact with such APIs in Python here:
https://stackoverflow.com/questions/17777845/python-requests-arguments-dealing-with-api-pagination
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.