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

Find users in bitbucket based on nickname

Tejas Shah
Contributor
March 26, 2019

Hi All

 

I have a custom add-on that allows administrators to configure default reviewers for specific branches. The add-on then periodically synchronizes the development branch with these branches and adds the configured list of reviewers for each branch as a reviewer for the pull request

Now, according to the new privacy changes where the api's will no longer accept the username to be used when creating the pull requests and either the uuid or accountId should be passed. So I am making changes to get the accountid based on the username (which is mapped to nickname). However I am not able to find an api endpoint under /2.0/users which would allow me to search for a user based on the nickname.

Are there any other ways to do this?

Regards

Tejas

3 answers

0 votes
rcruz2
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 18, 2023

Good morning,

Have you tried using the following endpoint to search for the user in your workspace?

https://api.bitbucket.org/workspaces/{{YOUR_WORKSPACE}}/members?q=user.nickname="{{nickname}}"

Is this the information you are looking for?

Kind regards, 

R.

0 votes
Griet
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 7, 2020

I have the same problem as Tejas_shah, who unfortunately did not receive an answer. The documentation suggests that is possible to query for the uuid of a user by entering a nickname as paramater. Yet how is this to be accomplished?

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 27, 2019

Hi Tejas, thanks for your question!

The changes to the API have been documented at Bitbucket API changes GDPR. Is there anything that is not clear enough, or any specific area where you'd need more help? Let us know and we'll be glad to help.

Kind regards,

Ana 

Tejas Shah
Contributor
March 27, 2019

Hi Ana

Thanks for your reply. I am looking for a way to search for a user using the nickname field. I assume the nickname field will hold the username info going forward? 

I have a custom addon where the repository administrators can configure what users should be added as reviewers for automatic PR created from the main development branch to our integration branches. This Pull request is created using the rest api where I pass a list of reviewers (username). Going forward I understand that instead of creating the PR with the username of users as reviewer I would need to pass the accountId or the uuid. So I would like a way to search for a user given his username (nickname in the new api). I was not able to find any api to directly search for users with their nickname.

 

Regards

Tejas

Tejas Shah
Contributor
March 29, 2019

Hi @Ana Retamal 

Do you have any suggestions about how I can go about doing this? I can even try an alternate approach for doing something similar if needed. 

Regards

Tejas

Tejas Shah
Contributor
April 20, 2019

Hi @Ana Retamal 

 

Do you have any suggestions please? I am kind of stuck with this problem with no alternate way to make it work. 

 

Regards

Tejas

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events