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

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

1 vote
Answer accepted

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

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,730 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