Forums

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

How to fetch the Branch object, given its ID (Bitbucket data center Java API)?

Ajaykumar Muthukumar
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!
March 18, 2025

Hello!

This question is regarding the availability of a specific method in Bitbucket Java API (v8.19), needed for one of the plugins that I'm developing. I'm trying to get the Branch object, given its branch ID (in String format). As of now I'm able to only get the object by scanning and filtering through all the branches of the repository (using refService.getBranches() method).

But this method seems to be using unnecessary compute resources in case of large repositories. I could not find an alternative class/ method that could achieve this from the Java API docs.

I want your assistance in finding out the class and method that enables getting the branch object, provided its ID in string to achieve the same thing with lesser complexity, if it exists.

Warm regards

Ajaykumar Muthukumar

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events