You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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?
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
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)
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.