Using postman, I have succeeded in creating branches in bitbucket via their REST API and using the guide below
But I cannot delete a branch using the same guide as well.
I have created a JSON and placed it in the body tab of POSTMAN then using DELETE for the HTTP method but no success.
I am getting error 405 - Method Not Allowed, what does that mean? Did my request pushed through but I am not allowed?
Using the bitbucket web UI, I am able to delete and create branches.
Edit:
This is the postman generated CURL
curl -X DELETE https://<url>/rest/api/1.0/projects/<abc>/repos/<xyz>/branches
-H 'authorization: Bearer xxxxxx' -H 'cache-control: no-cache'
-H 'content-type: application/json'
-H 'x-atlassian-token: nocheck'
-d '{"name": "refs/heads/feature/name","dryRun": false}'
curl
example to reproduce the issue – Hulbard