Is there a way to retrieve all stats that I see on a project page?
for example: number of bugs, vulnerabilities, security hotspots, code smells, coverage and duplications?
I tried https://sonarcloud.io/api/qualitygates/project_status but it only showing new_*
api/qualitygates/project_status API returns only the measures that were used in conditions of the quality gate.
Please take a look at the
api/measures/component API to get other metrics. I think you should be able to find everything. The
api/metrics APIs may also be helpful.
api/measures/component/ doesnt return granular information. It only shows complexity and new violations. Is there a way to get more granular info?
Which metrics are you looking for exactly?
project_status and i think you are right that these need to be added in the quality gates before it shows up in the api.
I’m looking for bugs, vulnerabilities, security hotspots, code smells, coverage, duplications.
Someone may change the gate without us knowing so my reporting willl fail. So looking for an API where regardless, these values will return.
I tried with the following Api and it worked for me. Change the Project_key with your project_name and meticKeys as you required.