How do I get list of "active" branches for a repo using the REST API?

Salgueiro, Flavio
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!
May 3, 2022

Using GET /2.0/repositories/{workspace}/{repo_slug}/refs/branches, I am getting a list of all the branches for a repo. 

I would like to filter this list somehow in the same manner that the Bitbucket UI does so as not to have to iterate through 1600+ branches.

Is there a way to to use the filter objects to obtain a list of branches for a repo that have not been merged?

1 answer

0 votes
o_kyrdan May 6, 2022

Hi @Salgueiro, Flavio

Thank you for your question!

Looks like this type of filtering is not supported by Bitbucket API.

Please look into this public issue request and vote for it.

 

Best regards,
Oleksandr Kyrdan

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events