How to Delete the files in Bitbucket Repo using Bitbucket API, the below endpoints are not working.
$ curl https://api.bitbucket.org/2.0/repositories/username/slug/src \
-F files=/file/to/delete/1.txt \
-F files=/file/to/delete/2.txt
Hello Raja,
The only methods supported from /2.0/repositories/{username}/{repo_slug}/src are POST or GET. There is not a listed method for DELETE.
To find out more about the available methods, please see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/src
Regards,
Stephen Sifers
Hello Stephen,
As there is No endpoint to delete the files. Could you please let me know, how to delete the files from bitbucket repo using Bitbucket API? I went through the Documentation/link. but it didn't work out.
Thanks
Raja,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello again Raja,
As it stands, there is no method to delete files via the REST API within Bitbucket. Meaning, deleting files via the REST API is not available.
If you would like to see this as a feature within the product in the future, we would suggest you submit a feature request. You may find more about raising a feature request at Raising a request with Atlassian Support. When creating your request, ensure you select suggestion since this will be a feature request.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Stephen Sifers Regarding this topic: deleting files using REST API is not available. Is this still the case today?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.