Can I use the UUID of a repository to find the URL?

Jackson Jenkins
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!
May 8, 2023

I'd like to have a unique identifier for each repository and want to avoid assigning each one a part number. Is there a way to get to the repository given the UUID? Is there a way to find the URL for the repository given the UUID?

4 answers

3 accepted

1 vote
Answer accepted
Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 9, 2023

Hi all,
I just wrote this article to try to clarify this topic for the future:

Working with UUIDs and their curly brackets, workspace names or repository slugs in Bitbucket 

 

Let me know if you have any feedback,

Caterina

0 votes
Answer accepted
Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
May 9, 2023

Hi Jackson, 

welcome to the community!

You can use the Bitbucket cloud repository REST API endpoint 

https://developer.atlassian.com/cloud/bitbucket/rest/api-group-repositories/#api-repositories-workspace-repo-slug-get

to fetch repository details, including the uuid (with the curly brackets).

You can then access the repository via the uuid (including the curly brackets)

For example https://bitbucket.org/<workspace>/{3ccc67c9-2251-4216-bdce-5400cd864026}/

Hope that helps, let me know how you go.

Best, Ulrich

// Izymes

0 votes
Answer accepted
Jackson Jenkins
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!
May 9, 2023

After some searching I found you can use the link bitbucket.org/workspace/{UUID} to go to the repository. It is important to include the curly braces.

Ulrich Kuhnhardt _IzymesCo_
Atlassian Partner
May 9, 2023

Great!

0 votes
keyvan zare rami
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!
January 28, 2025

Could someone point me to the official doc or code that confirms the use of {UUID}, i need to as future reference purposes. 

Caterina Curti
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2025

Hi @keyvan zare rami,
the UUID behaviour for the REST APIs is described here: https://developer.atlassian.com/cloud/bitbucket/rest/intro/#uri-uuid

You can also use the UUIDs for Git commands (e.g., cloning a repository), but I couldn't find documentation for that.


Example git clone command where the first UUID is the workspace one and the second one is the repository one:

git clone git@bitbucket.org:{574aee80-bcfb-4554-a4c9-3f5a40cde35e}/{6f5a5efa-ab96-40e5-a800-431281728a73}

Suggest an answer

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

Atlassian Community Events