How to sort Rules by issue count from my project

versions used

  • SonarScanner 4.2.0.1873-macosx
  • Sonarqube 8.2.0.32929 Docker

I want to get top 80 rules that are mostly generating issues.
I found the following API but it only gets me 15 rules top rated.
https://xxx.sonarqube.com/api/issues/search?componentKeys=myproject&s=FILE_LINE&createdAfter=2020-01-01&ps=1&facets=severities%2Ctypes%2Crules%2CcreatedAt%2Cresolutions%2Cstatuses&additionalFields=_all

Can you help me how to sort Rules by issue count from my project?

Something like https://next.sonarqube.com/sonarqube/api/issues/search?s=FILE_LINE&resolved=false&ps=1&facets=rules should return the top 100 (check the bottom of the response)

The size of “facets” is 15 so I cannot get top 100

I am sorry for the wrong information.

The version of Sonarqube is 6.7.5.
There are only 15 items in the facets unlike you have more than that.