I’m using SonarQube Enterprise 8.7 and I would like to know if it’s possible to get an issues report by querying the SonarQube web API?
I know the HTML report feature doesn’t work anymore and the only way to get reports per each build might be through querying the web API but I’m not sure how to go about it.
At the moment, I’m trying this bit of code
curl -u foo:bar https://sonar.example.com/api/issues/search?pageSize=100&componentKeys=my-app&metricKeys=violations,ncloc,line
But it errors with {"errors":[{"msg":"The 'component' parameter is missing"}]
Ideally, what I’m after is to just get the lines of code, the number of bugs, vulnerabilities, and Code smells in each run/scan.
Something like this
But by querying the web API.
Is this possible, please?
Also I hear that Sonar Version 8.9 has the option to download reports as PDF, is this option available per project or per analysis?
Thank you.