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

How do I remove a user privileges from a repository by api.?

Chaitanya Sharma
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!
September 1, 2023

I have a repository inside my bitbucket workspace. In this i have a user "XYZ", i want to remove the privileges of this user from this specific repository via APIs.

1 answer

0 votes
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 3, 2023

G'day @Chaitanya Sharma 

Is this user in groups? If yes, I believe what you are looking for is the following API endpoint:

Remove users from groups 

DELETE https://api.bitbucket.org/1.0/groups/{workspace_id}/{group_slug}/members/{uuid}

However, if the user is in a group and you wish to remove a specific repository, then no, it's impossible. Removing the user from a group will remove access to all the group's repositories.

With that said, if the user access was granted directly to the repository, this can be removed by using the Delete an explicit user permission for a repository endpoint.

I hope this helps.

Regards,
Syahrul

Suggest an answer

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

Atlassian Community Events