How do I use the DELETE endpoint of the REST API for branches?
https://developer.atlassian.com/static/rest/bitbucket-server/5.5.0/bitbucket-branch-rest.html
Looking at this, I'm supposed to send a request object with the DELETE, but DELETE doesn't support passing an object?
The endpoint should simply be a request to
/rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/branches?name=somebranch&dryRun=true
I don't know how you'll handle the /refs/head/- and forward slashes people use in their requests. But it seems wrong to imply that people should pass an object with their DELETE request.
Or do it like a POST request, to a
/rest/branch-utils/1.0/projects/{projectKey}/repos/{repositorySlug}/delete
With the object, with the name and dryRyn - that would work right out of the box. And the branch-target is inferred by the branch-utils in the beginning of the API.