SonarQube API and Power BI Tabulation

Hi Community, quick question, the sonar api works well with Power BI for data tabulation, there a data cap though, we are to pull total issues but the cap is 500 limit, is there anyway / approach we can use to increase this?
Here’s an example of the api data cap. api/issues/search?componentKeys=MyApp&ps=-1&p=1

{“total”:2808,“p”:1,“ps”:500,“paging”:{“pageIndex”:1,“pageSize”:500,“total”:2808},“effortTotal”:21827,“debtTotal”:21827,“issues”:

Hi @crispin,

the page size (the ps parameter) has a max of 500, so you would have to go to the next page (the p parameter) for the next 500 entries

hope that helps :slight_smile:

Thanks for the response, is there anyway we can pull without caps, for instance a single URL? (without any next page p parameter)

An example , api/issues/search?componentKeys=MyApp&ps=-1&p=1 (-1 means unlimited or infinite)

The scenario would be from

{“total”:2808,“p”:1,“ps”:500,“paging”:{“pageIndex”:1,“pageSize”:500,“total”:2808},“effortTotal”:21827,“debtTotal”:21827,“issues”:

to the scenario below,

{“total”:2808,“p”:1,“ps”:2808,“paging”:{“pageIndex”:1,“pageSize”:2808,“total”:2808},“effortTotal”:21827,“debtTotal”:21827,“issues”:

Hi @crispin ,

no. for performance reasons this is a hardcoded max value

Hi Crespo, I’m working on a similar project, I’m also trying to get data from sonarqube to Power Bi but I haven’t been able to connect them both, is it there any chance you can help me? I want to know what approach did you use. That’d help me a lot, thanks.

1 Like

I am interested in how to get data from Sonarqube to Power BI. Can you advise?

HI There,
Did anyone got the answer for this, how to get data from SonarQube into Power BI desktop. Plz help me in case anyone has worked on this requirement and got the solution.

Hello,

You can use the GET api/projects/export_findings API available starting in SonarQube Enterprise Edition:

Export all findings (issues and hotspots) of a specific project branch.
Requires 'Administer System' permission.
Keep in mind that this endpoint will return all findings, issues and hotspots (no filter), which can take time and use a lot of resources on the SonarQube server side and put pressure on the database until completion. This endpoint can be used to feed third party systems.
Either the branch key or the pull request key should be specified, and not both at the same time.