You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I am working on the Bitbucket repository (Cloud) for a couple of actions to perform on it. Like getting the repository details and applying some changes to existing repositories based on conditions. In our workspace, we have around 2000+ repositories and thus we need some automation to do some changes.
Currently, I am able to fetch details like
- getting members
- getting repositories
- getting branches and it's restrictions
- etc...
Likewise, I am trying to get the `user and group permissions` of each repository. To achieve the same, I have referred bitbucket rest api doc and I found
https://developer.atlassian.com/server/bitbucket/rest/v807/api-group-permission-management/#api-api-latest-projects-projectkey-repos-repositoryslug-permissions-groups-get.
But, with that it's returning `404` error even though I am using admin-user and the repository exists.
Here is the example, I am getting branch restrictions with the below RESTAPI successfully but not for `user and group permissions`.
`curl -u {user}:{password} https://api.bitbucket.org/2.0/repositories/{workspace}/{repo-slug}/branch-restrictions/`
I am able to fetch the branch restrictions of the repository.
But, when I hit below REST API - Getting a 404 error
`curl -u {user}:{password} https://api.bitbucket.org/2.0/repositories/{workspace}/{repo-slug}/permissions/groups/`
`{"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"}}% `