Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

BB Server 5.12 - GET branches API not returning all branches

Dan Morris July 21, 2021

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
AUG Leaders

Atlassian Community Events