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

How do you delete files from a repo using Bitbucket rest API?

prajjwalgupta
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!
June 12, 2020

I want to delete a file from Bitbucket server's repo using its rest api. I m using the files parameter but somehow i do not know how to use it exactly. Can some one please help me achieve this by telling the steps via Postman how to do it>?

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 19, 2020

I really don't think you can delete a directly file via the REST API...

The proper way to do this is by creating a commit with Git and pushing it to the repo:

  1. Clone the repo to a local clone (if you haven't already)
  2. Delete the file
  3. Commit the change with Git (it contains only a single deletion)
  4. Push the change to Bitbucket
ChellaMuthu Palanichamy
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!
September 9, 2024

Other than postman any idea?, is there any ways to remove the files without cheking out?

Any Atlassion API is availabe? May be REST/SOAP/Graph QL etc..

Using CI CD Integration like Bamboo or Jenkins will support anything through any plugins?

Any way to do this while executing some commans in stash self managed bitbucket server using shell script?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events