I have a task to delete user from repository. Can anyone guide me how would I develop the same workflow and to reach it how many APIs I need to call. Please guide me where would I get all the Bitbucket APIs including Delete user API.
Hi Rahul, welcome to the Community!
The APIs you'll use depend on if you're using Bitbucket Server / Data Center (run on-premise on your own server) or if you're on Bitbucket Cloud (the address is bitbucket.org).
Hopefully those references are the starting point you need to fulfill your task.
Thank you so much for replying. Please don't mind if I keep this thread open for sometime. We are using on premise Data Server. Could you please tell how would I know that in how many repositories a user has access on. Please help me with API I need to call for it.
The REST API doesn't have an endpoint that would return all the repositories a user has access to. You would need to paginate through the repo/projects individually and check the permissions for the particular user or groups they are a member of.
If you are trying to remove all permissions for a user, I would recommend disabling the user instead. You can use the admin/users endpoint to disable them, and get details if their user is coming from the internal directory or an external managed directory. Disabling users also has the benefit of reducing your licensed user count.
Hi, Bitbucket community! Are you a DevOps practitioner (or know one in your network)? Do you have DevOps tips, tricks, or learnings you'd like to share with the community? If so, we'd love to hea...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events