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

Naive question: How can I find the URL of my public bitbucket?

KingDrogba February 21, 2020

Hi Team, 

I am new to Bitbucket and trying to use bitbucket api to create the repository. (This is bitbucket account is for my personal use.) 

I am trying this way to create repo -- 

curl --user <user>:<password> -H "Content-Type: application/json" --data @input.json -X POST <Bitbucket URL>/rest/api/1.0/projects/<projectKey>/repos

 1) Is this correct way?

2) Also, what is my bitbucket url? When I am in my bitbucket cloud I see the format as 

https://bitbucket.org/<some hash value>/

 

2 answers

2 accepted

1 vote
Answer accepted
Tyler T
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2020

Hi @KingDrogba and welcome to the community.

  1. Bastian pasted a link to the correct documentation: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D#post
  2. The hash value or UUID is your workspace ID. If you visit a repository in the UI, the workspace name should be in readable text (slug), example: https://bitbucket.org/my-workspace/my-repo/

When using the API, you can use either the slug or UUID.

`workspace` can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces, for example: {workspace UUID}.

KingDrogba February 27, 2020

Thanks @Tyler T I tried Bastian suggestion and it worked. I appreciate for your response. I was doing with version 1.0 and that is why it was not working.

Like Tyler T likes this
1 vote
Answer accepted
Bastian Stehmann
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 22, 2020

Hi,

 

As it seems that you are on cloud, I think this will be the right api call https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D#post

KingDrogba February 27, 2020

Thanks @Bastian Stehmann It worked

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events