Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,438
Community Members
 
Community Events
165
Community Groups

BB Server 5.12 - GET branches API not returning all branches

using /rest/api/1.0/projects/{0}/repos/{1}/branches?details=true&limit=200 

I can page through and get 316 total branches.  

However, if I go to a git command line and execute: "git branch -r | wc -l " I get a result of 1678 branches 

I knew I was missing some branches because my release branches weren't listing in the 316 results and they were referenced in the metadata toRef object on some Pull Request meta data. 

I followed up with a call ~/branches?details=true&limit=200&filterText=release_ resulting in 27 matched records that are NOT in the 316 I'm getting back in the original API call.  

I even tried increasing and decreasing the limit to see if it work (went up to 500 and still only got the 316 branches I've been getting).  

Do I need to call an admin API for reindexing or something? 

Bonus Question: why would the ahead-behind api plug-in  seem to appear/disappear between runs?  (I saw it in my responses once today, but not the other 100+ times, while seeing it EVERY time over days last week)

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,179 views 2 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you