Forums

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

Bitbucket Rest API - deleting a file / moving a file

Kunal S Bhandari
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 20, 2024

We are using the Bitbucket Rest API to interact with the voice-files repository. 
We want to use Rest API to delete the files from our repository.

Also is there any API which can be used to move files to another directory inside the same repo.

Links:
We are using the following docs for reference:

https://developer.atlassian.com/server/bitbucket/rest/v910/api-group-repository/#api-api-latest-projects-projectkey-repos-repositoryslug-diff-path-get

1 answer

0 votes
vikram
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 3, 2024

Hi @Kunal S Bhandari 

Welcome to Atlassian community

I think by deleting file directly will popup issues when we clone/push/pull repo. 

The best way is to do by creating a commit with Git and push to the repo. 

We can clone the repo to a local clone, if we do not have already in local
then Delete the file
Commit the change  and Push  the changes to Bitbucket repo. 

The Bitbucket Cloud REST API (atlassian.com)

or

check below urls for reference and knowledge base.

https://docs.atlassian.com/bitbucket-server/rest/5.16.0/bitbucket-rest.html#:~:text=Bitbucket's%20REST%20APIs%20provide%20access%20to%20resources%20(data

Bitbucket Data Center REST APIs (atlassian.com)

VIkram P

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events