Hello,
I'm new to using REST API and I'm seeking to know if there's an endpoint to simply get all repos that a specific group (such as Developers) in a Bitbucket Cloud Workspace can access. I've been looking thru the Bitbucket Cloud REST API documentation and also at articles in the community, but everything I found so far seems to indicate that this is not possible.
Thanks in advance for any guidance you can offer.
Hi @Durell Demartini,
We offer temporary support for certain 1.0 API resources until we have a replacement in version 2.0 of our API.
You can use the group-privileges endpoint:
Check the section "GET a list of repositories with a specific privilege group" in that document which includes an example as well.
If you have any questions, please feel free to let me know.
Kind regards,Theodora
Hi @Theodora Boudale - thanks for the information. I'm having trouble understanding what to indicate for the "group_owner." I'm an admin of the workspace but I don't see where this information is located when looking at any of our current groups.
https://api.bitbucket.org/1.0/group-privileges/{workspace_id}/{group_owner}/{group_slug}
Thanks very much for your time!
The "group_owner" should be the same as the workspace id where this user group belongs.
A few years back it was possible to add to a repo a user group belonging to another team account you had access to, so the group owner could have been different than the owner of the repo. However, we no longer allow that, so the group owner should be the same workspace where your repositories belong.
If your workspace id is e.g. workspace-a and the user group slug is e.g. developers, then the URL should be
https://api.bitbucket.org/1.0/group-privileges/workspace-a/workspace-a/developers
If you want to confirm, you can use the following URL, which will show all user groups having access to this workspace's repos, along with the owner of each group:
https://api.bitbucket.org/1.0/group-privileges/workspace-a/
If you have any other questions, please feel free to let me know!
Thanks, @Theodora Boudale - I appreciate the assistance. I've tried this:
But I get the message, "Group is not owned by the workspace."
It looks like you're new here. Sign in or register to get started.