Is there any API to retrieve historical issues from a certain date.
Our organization management assigned a task me to create weekly summary report using certain code metrics (Bugs, Code smells, Vulnerabilities). It might automate and needed to generate weekly.
for that I have to fetch Realtime data only when code gate status failed. since I only have read only API access to SonarQube. I have to retrieve data for certain period of time using SonarQube
Api calls and running it via scheduled shell script to generate the report.
Ex:
Project name: GRP_Area
July 7, 2023 at 8.30 AM (latest sonar status)
-Bugs : 20
-Code Smells : 600
-Vulnerabilities :20
July 5, 2023 at 10.30 AM
-Bugs : 43
-Code Smells : 100
-Vulnerabilities : 2
July 3, 2023 at 7.00 AM
-Bugs : 13
-Code Smells : 60
-Vulnerabilities : 32
I found below Api call to retrieve latest sonar failed status data. it works.
http://10.74.166.44:61088/api/issues/search?componentKeys=GRP_Area&statuses=OPEN&resolved=false&sinceLeakPeriod=true
but I have to find an API to retrieve code metrics data on “July 3, 2023 at 7.00 AM” (historical date)