Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Unable to get UUID for a specific user

Edited

Hi team, 

I'm trying to automate pull request creation (through jenkins job) using curl command but unable to retrieve the UUID of a specific user. 

I've tried multiple queries (which include) to get the UUID but none seems to worK:

[jenkins@linuxslave-jenkins demandware]$ curl -X GET --user "REDACTED:xxxxxM" https://api.bitbucket.org/2.0/teams?role=members
{"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation
[jenkins@linuxslave-jenkins demandware]$ curl -X GET -H "Content-Type: application/json" -u "REDACTED:9Fxxxxx" "https://api.bitbucket.org/2.0/users/REDACTED"
{"type": "error", "error": {"message": "REDACTED"}}[jenkins@linuxslave-jenkins demandware]$
[jenkins@linuxslave-jenkins demandware]$
[jenkins@linuxslave-jenkins demandware]$ curl -X GET --user "REDACTED:xxxxx" https://api.bitbucket.org/2.0/teams?role=member
{"type": "error", "error": {"message": "Resource not found", "detail": "There is no API hosted at this URL.\n\nFor information about our API's, please refer to the documentation at: https://developer.atlassian.com/bitbucket/api/2/reference/"}}[jenkins@linuxslave-jenkins demandware]$


Can you please help me in providing the right query to get the UUID of users in a workspace?

2 answers

0 votes
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 03, 2023

Hi @Sruthi_Nadimpally,

I recently wrote this guide: https://community.atlassian.com/t5/Bitbucket-articles/Retrieve-the-Atlassian-Account-ID-AAID-in-bitbucket-org/ba-p/2471787

 

When working with the Bitbucket REST APIs, I would recommend using the Atlassian Account IDs (AAID) instead of UUIDs.

 

Cheers,
Caterina

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Oct 02, 2023

Hi Sruthi,

The teams endpoint has been deprecated in favor of the workspaces endpoint, therefore any calls to the teams API will fail as it is non-existent.

The correct command would be as follows:

curl -X GET --user username:AppPassword https://api.bitbucket.org/2.0/workspaces/workspaceID/members

NOTE: You will need to replace username/AppPassword/workspaceID with actual values.

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events