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

Given a user account ID is there a way to get the user username ? ( and vice versa)

Mihira_Wanninayake March 23, 2022

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 ?

 

2 answers

1 accepted

2 votes
Answer accepted
Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 24, 2022

Hi @Mihira_Wanninayake 

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. 

You can use List users in a workspace 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

0 votes
Jovana Jakovljević March 12, 2024

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.

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 12, 2024

Hey @Jovana Jakovljević 

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

Jovana Jakovljević March 13, 2024

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

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 13, 2024

Hey @Jovana Jakovljević 

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

Jovana Jakovljević March 14, 2024

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

Thank you!

Jovana

Syahrul
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 14, 2024

Hey @Jovana Jakovljević 

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

Like Jovana Jakovljević likes this
Jovana Jakovljević March 18, 2024

Thank you very much!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events