Search code examples
gitrestbitbucketbitbucket-server

How to find Bitbucket Account UUID?


Since bitbucket no longer supported the use of username. We must instead use User uuid for accessing the bitbucket api's.

Depreciated or Earlier

https://api.bitbucket.com/2.0/users/udayRatan

Latest

https://api.bitbucket.com/2.0/users/558050:c0b72ad0-1cb5-4018-9cdc-0cde8492c443


Solution

  • You can make a GET request for a repository that you own and see your UUID listed under the owner attribute:

    curl https://api.bitbucket.org/2.0/repositories/1team/moxie
    

    Or you could possibly make a GET request for all team members of a team you're a part of and see their UUID's there

    curl https://api.bitbucket.org/2.0/teams/1team/members
    

    Info taken from https://developer.atlassian.com/bitbucket/api/2/reference/meta/uri-uuid#repo-obj