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/"}}% `
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.