Unable to get historical count of severity like (critical, major and blocker)

For example this api:

Gives me count of major,critical and blocker bugs but i want the historical date wise data lets say in my last 12 execution of sonarqube in particular date so and so count was present.

In there any API available for that? i know an api “api/measures/search_history?component=svc-axis-facade-aws&metrics=code_smells,coverage,ncloc&ps=5” which gives historical data but only for coverage,ncloc etc but not for severity. Please help.

For historical queries the api/measures/search_history API is the way to go. Perhaps what you’re missing is the correct metric names. To find the count of major and critical issues, the metrics to use are major_violations and critical_violations. You can find all available metrics with the api/metrics/search API. I hope this helps!