Forums

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

Is there a way to know if a branch can be deleted without using the "branch-restrictions" endpoint?

Eric Zounes
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!
July 31, 2019

I'm currently trying to use the Bitbucket Cloud API to see if a particular branch is protected against deletion. At the moment I have to do this by hitting the "branch-restrictions" endpoint to identify if a branch has protection, but this is problematic because I'd rather not require users to have the "repository:admin" scope for their Oauth applications. I know Bitbucket Server has a "dryRun" parameter for the branch delete endpoint, but I don't think Bitbucket Cloud has anything like that. Before I decide to change my approach, I wanted to see if I'm possibly missing something in the API and maybe there is an easier way to check.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events