How to export the SonarQube, Sonar-Runner Analysis report to PDF or excel file

SonarQube: 5.1.2
sonar-runner:2.4

How to report The analysis report to the people about project?

Hi @parkdaechul,

Welcome to SonarSource community! :wave:

PDF reports are only available at the Portfolio level, not at the project or project branch level, and only available on Enterprise Edition or higher. The report will contain metrics about each component of our SonarQube Quality Model (Code Smell (Maintainability domain), Bug (Reliability domain), Vulnerability (Security domain), Security Hotspot (Security domain) and Releasability for that portfolio, so this won’t necessarily contain a specific project’s analysis results.

For Project-level data, the primary mechanism for extracting/exporting data from SonarQube is the Web API. It is fully documented inside your SonarQube instance – you can simply follow the “Web API” link at the bottom of any SonarQube page. You can then transform the JSON output from the web API into another format suitable for further use (like CSV).

Also, please update your SonarQube to 8.6, which is our latest version. It includes many bug fixes, security patches, features, and performance improvements.

Joe

Where is the Web-Api link at Sona Cube?
I Can’t find it

SonarQube 5.1.2 is so old that I don’t even know where it is. Please download SonarQube 8.6 here and once you install it, you will see Web API in the footer (bottom of the page) or in the :question: icon next to the search box in the top right-hand corner.

Example from SonarQube 7.9.3, but same in SonarQube 8.6 version:

How can I use Web API? Tell me how to use

Hi @parkdaechul ,

For basic documentation on web API, see Web API. Suppose your SonarQube URL is https://quantum.bigco.com/sonar.

You can use curl at your command line or similar tool to transfer data over network protocols like so:

GET api/projects/search

curl https://quantum.bigco.com/sonar/api/projects/search

GET api/project_analyses/search

curl https://quantum.bigco.com/sonar/api/project_analyses/search?project=node-typescript-starter&ps=3

GET api/system/health (this endpoint requires ‘Administer System’ permission or authentication with passcode)

curl -u admin:mypassword https://quantum.bigco.com/sonar/api/system/health 

POST api/permissions/bulk_apply_template (this example shows usage of query parameters)

curl -s -u admin:mypassword -X POST 'https://quantum.bigco.com/sonar/api/permissions/bulk_apply_template?templateId=AXWUZUeMWLCnkMwAgwdt&analyzedBefore=2017-10-19'  

Please review query parameters in REST API, such as this link and see curl examples here.

Joe

1 Like