How to fetch metric details such as Bugs, Vulnerabilities, etc. using SonarQube CLI?

How to fetch metric details using SonarQube CLI?


  • Is there any way to fetch the details of the following metrics using the SonarQube CLI?

    The metrics are,

    • Bugs
    • Vulnerabilities
    • Hotspots Reviewed
    • Code Smells
    • Coverage
    • Duplications
    • Lines
  • The SonarQube version in use is

  • I looked for the metrics using the ceTaskUrl in report-task.txt but it only provides the warning count.

Thank you!


Welcome to the community!

Have you tried this via the UI? The best way to master the API is to perform the desired action via the UI and eavesdrop to see which calls the UI made to accomplish the action.

You may also find this guide helpful.