I am looking to retrieve SonarCloud historical trend data of Vulnerabilities
, Bugs
and Security Hotspot
with Severity of BLOCKER
and CRITICAL
only.
I have used this API https://sonarcloud.io/api/issues/search?componentKeys={project_key}&types=BUG,VULNERABILITY,SECURITY_HOTSPOT&severities=CRITICAL,BLOCKER
which only shows me latest issue with BLOCKER
and CRITICAL
severity.
I am more interested for a historical trend like this API https://sonarcloud.io/api/measures/search_history?metrics=critical_violations&from=2020-01-01&ps=100&component={project_key}
but this violations include CODE_SMELLS
which is something I do not want to track. If I swap the metrics for Vulnerabilities
, Bugs
and Security Hotspot
, it wont shows severity.
No, according to one of the SonarSourcer response. There is no API that can search historical trend on issue by severity only.
Reference: https://community.sonarsource.com/t/is-there-an-api-to-retrieve-historical-trend-of-issue-by-certain-severity-only/31930