It’s paginated, from the response example of web api doc for api/users/search
{
“paging”: {
“pageIndex”: 1,
“pageSize”: 50,
“total”: 2
},
“users”: [
{
…
You may use ps=500 (pagesize 500 is max) instead of default pagesize 50.
If that is not enough you need to get total pagecount and use a loop, similar to that example
Welcome
you didn’t reveal your Sonarqube version.
Sonarqube 9.1 comes with a new api/projects/export_findings endpoint that allows to fetch all issues and hotspots for a given project and a given branch, see
https://jira.sonarsource.com/browse/SONAR-15334
Otherwise with older versions you may use something like that
get total issues via
api/issues/search?componentKeys=com.foo:bar&severities=CRITICAL&ps=1
and then use total = (issues.total.toFloat()/100).round() in a loop
…
1 Like