Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,394
Community Members
 
Community Events
184
Community Groups

Unable to get the user and group permissions of the repository using REST API

venkatesh.monangi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
Mar 23, 2023

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

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events