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

Bitbucket API 2.0 List of users

junglefinance July 11, 2019

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

2 votes
Andy Fletcher September 9, 2019

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.

Praveen Kumar Voruganti February 10, 2021

It really helpful

Like junglefinance likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events