Is there any API to retrieve historical issues from a certain date

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.

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.

but I have to find an API to retrieve code metrics data on “July 3, 2023 at 7.00 AM” (historical date)


Are you trying to retrive historical metric values or the list of issues that were open at a specific point in time. Because you can do the former with api/measures/search_history. But you simply can’t do the latter reliably. What’s stored in the database is only current issues. Once issues are fixed in code and closed, they’re cleaned out of the database. So there’s no way to get details on the issues that were Open on e.g. January 1, 2023. You can only get the counts.