How to get LoC for all branches via API

Thanks Ann. Yes I did consider all branches. It is exactly the same APIs I used as in example. But, I have multiple projects which are just in initialized state as in the situation described here Sonar - 983,206 lines currently analyzed (License Manager) - #6 by dmeneses. I’m trying to get a ticket filed on this to investigate as the LoC keeps increasing.