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 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

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events