SonarQube way and how to find code coverage , issues of all the projects across the portfolio

I have 500+ projects across 30 portfolios, I want to find out the top 5 best performing and the bottom 5 worst performing projects with respect to code coverage and number of issues. I am not finding any Api as such to get that information readily. Is there a way out for me to get such information.

Hey there.

You might find it easiest to include all projects in one portfolio, and then check the Measures tab of the portfolio.

For example:

https://next.sonarqube.com/sonarqube/component_measures?id=BY_LICENSE&metric=coverage&view=list

https://next.sonarqube.com/sonarqube/component_measures?id=BY_LICENSE&metric=violations&view=list

It becomes clear pretty quickly which are the top / bottom 5 for a given measure.