I am using Sonarqube 9.0.1 on Windows server connected to a SQL Server database.
Sonarqube is working perfectly, no problems at all and I can see data in the Database.
Is there any documentation on how to query the database directly to pull out stats, much the same as the Sonarqube screens, total bugs, vulnerabilities, smells etc. I want to do this to pull some stats into an internal system.
No, there isn’t. You must use the web API (the documation is available at http://your_server…/web_api), take a look at the api/measures and the api/metrics endpoints.
I have a requirement to export the SonarQube data into Power BI. The web API provided by SonarQube extract data based on specific Project/Component (passed as parameter). Is there any way to extract all the Metrics/Measures/statistics/bugs/Vulnerabilities etc, related data for all the Projects/Components, without passing the parameters recursively.
Hi @Shalini22 ,
You can use the
GET api/projects/export_findings API, which is available in SonarQube Enterprise Edition. Otherwise, you will need to loop through all the projects’ branches for metrics.