Given a user account ID is there a way to get the user username ? ( and vice versa)
Asked by Mihira.Wanninayake:

I thought this endpoint <https://api.bitbucket.org/2.0/users/>\<account_id\> would return  
the username. However the username is not returned. I see there is a nickname returned, however that is different to the username as stated in the documentation.

Also, is there a way to get the account id given the username ?


Answers:
author: Syahrul
body: Hi [@Mihira.Wanninayake](/t5/user/viewprofilepage/user-id/4765447)

G'Day!

We no longer expose user usernames in API calls as per our changes back in April 2019 to comply with GDPR and replace it with the Atlassian account name.

Please check out the announcement [here.](https://developer.atlassian.com/cloud/bitbucket/bitbucket-api-changes-gdpr/)

You can use [List users in a workspace](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-workspaces/#api-workspaces-workspace-members-get) endpoint that will return a list of users currently in your workplace and their UUID because we don't have an endpoint to return user UUID based on the username.

Let me know if you have any additional questions.

Cheers,  
Syahrul


author: Jovana Jakovljevi?
body: hi guys,

is there any other way to get USER NAME out of User ID? I am not able to write code in Jira and I believe because I am not admin.

thank you.

comments: author: Syahrul
body: Hey [@Jovana Jakovljevi?](/t5/user/viewprofilepage/user-id/5283969)

I believe you can use the following endpoint with UUID to get the user display_name which is the user name:

<https://developer.atlassian.com/cloud/bitbucket/rest/api-group-users/#api-users-selected-user-get>

Regards,  
Syahrul


author: Jovana Jakovljevi?
body: Hey Syahrul,

The problem is that I do not have curl/ Node.js/ Java/ Python/PHP to write this what you suggested. Therefore I asked for other way?

I use only Jira Software.

Thank you!

Jovana


author: Syahrul
body: Hey [@Jovana Jakovljevi?](/t5/user/viewprofilepage/user-id/5283969)

Currently, the only available method to retrieve this information is through the API endpoint.

However, I'm keen to understand your overall objective. Could you provide some additional details about what you're looking to accomplish? This will allow me to suggest any possible alternatives if they exist.

Regards,  
Syahrul


author: Jovana Jakovljevi?
body: Hey, of course.

Some colleague created a filter (pic below) and now I have to check whether she included all necessary colleagues in it as worklogAuthor? Which is the best way? I need their names instead of their Jira User IDs.

![Jira.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/312047i8107F77DCAA1BA37/image-size/large?v=v2&px=999 "Jira.PNG")

Thank you!

Jovana


author: Syahrul
body: Hey [@Jovana Jakovljevi?](/t5/user/viewprofilepage/user-id/5283969)

It appears your query pertains to Jira rather than Bitbucket. While I'm not well-versed in Jira to assist you thoroughly, I can guide you to the right place for help. Please direct your question to the Jira community project by visiting:

<https://community.atlassian.com/t5/Products/ct-p/products>

Once there, identify the version of Jira you're using, select it, and then click 'Ask the Community' to post your question.

Regards,  
Syahrul


author: Jovana Jakovljevi?
body: Thank you very much!


Tags: api

bitbucket-cloud

cloud