I am able to add new file to bitbucket server using below URL
http://localhost:7990/rest/api/1.0/projects/BLAC/repos/sddc-test/browse/checkin1.txt
form data
branch: master
message: Update README and File content
content: Hello
sourceBranch:<commitid>
I want to know if I can add multiple files using the same API and how ?
Hello Uttam and welcome to the Community!
The API endpoint which your using will only allow a single file to be uploaded/edited per call. This means you’ll need to write a script to accomplish uploading multiple files. I would approach writing the script in the following method:
Each scripting language will approach this differently and your end result will be based more on what you’re wanting to accomplish and what other requirements you may have.
I hope this proves helpful in using the API to upload/edit files into Bitbucket along with giving an idea of how to approach writing such a script.
Regards,Stephen Sifers
Thanks Stephen, Yes I am using Java to upload multiple files in a loop. So as per your answer this is only way to upload multiple files. We cannot upload multiple files using single REST calls.
It looks like you're new here. Sign in or register to get started.