Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket repo import

Joel Hess
Contributor
August 21, 2020

Is there a developer API for the import repository function in Bitbucket Cloud?

 

I ran across this question, but it's a bit dated, and the the response was vague.

https://community.atlassian.com/t5/Answers-Developer-Questions/Bitbucket-API-Import/qaq-p/463734

 

Is there an API for importing another git repository? We're trying to work around the lack of repo templates in BB Cloud.

1 answer

0 votes
Mikael Sandberg
Community Champion
August 21, 2020

Yes, there is an API for the repository that allows you create a new one, have a look at repositories{workspace}{repo_slug} 

But note that you cannot populate the repository via the API, that has to be done via Git commands on a local copy of the repository that you then push up to Bitbucket.

Joel Hess
Contributor
August 21, 2020

Yeah, I know about that. I'm looking specifically to invoke the "import repository" functionality that is in the UI. I assume that it'd doing a clone and push under the covers, but I was hoping to not have to build that myself.

 

This thing:

Annotation 2020-08-21 201837.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events