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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,560,609
Community Members
 
Community Events
185
Community Groups

How can I get a Bitbucket user ID by bitbucket API

Hello,

I want get my team menber's user ID.

Because it cannot be confirmed from the screen.

I got user information with API(https://api.bitbucket.org/2.0/teams/xxxxx/members)
but nickname is Japanese Charactor It doesn't seem to be a user ID.

Doesn't "nickname" display user ID?

I can't see them in any field.
Please tell me can get team member's UserID.

I also get another API(https://api.bitbucket.org/2.0/users/xxxxx)

but I got same result.

 

1 answer

1 accepted

2 votes
Answer accepted
Daniil Penkin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 08, 2019 • edited

Hello @hi-oka,

The right identifier of a user (and many other entities in Bitbucket REST API) is the uuid field. Unlike nickname, which can change over time, uuid always remains same for the given user.

For instance, request to this URL will return display names of team members along with their uuids and pagination parameters required to fetch all pages of the response:

https://api.bitbucket.org/2.0/teams/xxxx/members?fields=values.display_name,values.uuid,page,next

Note that uuid contains curly braces and should be used like that anywhere in the REST API or URLs.

Hope this helps. Let me know if you have any questions.

Cheers,
Daniil

Hello Daniil,

Thank you for  your answer.

I understood that uuid is identifier.

But I have noticed.

This API is get team members, does not retrieve team plan-users.

Is there an API to get a list of plan-users? (URL :https://bitbucket.org/account/user/(ID)/plan-users/)

what is xxxx in the below call? 

 

https://api.bitbucket.org/2.0/teams/xxxx/members?fields=values.display_name,values.uuid,page,next

@Sarah Dwyer @Daniil Penkin  this endpoint show only the display name and not the bitbucket user name, how can I get it for username? or even email?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events