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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How can I Upload entire directory to bitbucket repo via cloud API

Hello, I have an existing repo and would like to add an entire directory to it.

I am following this from the docs:

I am successfully able to add a single file with the following request:

curl --user $user:$password \
 -X POST$workspace/$repo_name/src \
 -F helloworld.txt=@helloworld.txt
Now lets say I had a directory named "mydir" which had multiple files inside it, Is there a way I can upload that entire directory, or the contents of the directory with one API call?

2 answers

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 01, 2023

Hey Andre,

Unfortunately, wget/cURL does not have the concept of what a "folder" is in this context.

They can be used to upload individual files as you have stated - but they are unable to upload entire folders in a singular command.

You would need to write a bash script to cycle through each individual file in that directory to achieve what you wish to do.


- Ben (Bitbucket Cloud Support)

0 votes
Ulrich Kuhnhardt _IzymesCo_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Feb 01, 2023

Hi Andre,

first thing that comes to mind is to use git add, git commit and git push to add a directory to a BB repository. The commands can run as a script if you need to automate. However I'm not sure about your specific use-case.

Best, Ulrich

// Izymes

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events