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,
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)
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
It looks like you're new here. Sign in or register to get started.