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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket API 2.0 List of users

Edited

I have a connector to Bitbucket from Mylyn.  Part of MyLyn is the ability to add user names for 'Reported By' and 'Assignee'.  With version 2.0 of the Bitbucket API these people need to be allocated a Bitbucket account with an AccountID.  For this to work I need to be able to get a list of people who have been explicitly given access to the repositories.

I have looked through the API documentation and this forum but can not find a way to get that list. The users/{username}/members seems to be the closest but this has been depreciated due to 'privacy changes'.

Is there an API call that will return a list of active members for a repository?

1 answer

Came across your question whilst trying to do this myself. I think it's a matter of terminology. It ended up that what I was actually looking for was 'members' of the 'team', where the team is 'organisation'.

e.g. if your repo urls look like this /organisation-name/repo-name/src/master/

then you can call 

curl -s -H"Authentication: Bearer xxxx" "https://api.bitbucket.org/2.0/teams/organisation-name/members"

to get a list of every user with access to at least one of the repos in your organisation.

Hope that helps you.

Like junglefinance likes this

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,753 views 10 16
Read article

Community Events

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

Events near you