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.
Hi all,
The unique identifier that you want to use is the Atlassian Account ID (also known as AAID).
The Atlassian Account ID is accepted in the REST API requests and available in the response as the account_id field.
Here is an article where I explain how to retrieve the AAID: Retrieve the Atlassian Account ID (AAID) in bitbucket.org
The most common REST API endpoint to retrieve the account IDs of users is the members endpoint. It returns the account_id of all users belonging to a workspace when calling the https://api.bitbucket.org/2.0/workspaces/{workspace}/members endpoint.
While the UUID was the standard a few years ago, these days the Atlassian Account ID is the preferred, recommended and future proof option as a unique identifier for users.
Caterina
Hello @hi-oka,
Please refer to @Caterina Curti's reply. The preferred unique user identifier is the Atlassian Account ID (also known as AAID).
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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/)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
what is xxxx in the below call?
https://api.bitbucket.org/2.0/teams/xxxx/members?fields=values.display_name,values.uuid,page,next
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.
@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?
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.