Hi Experts,
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.
Thanks!
Rahul
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.
Cheers,
Daniel
Hi Daniel,
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.
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
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.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.