Through the SonarQube Web API’s, you can retrieve code metric values and histories.
Through the SonarQube Web API’s, you can retrieve code metric values and histories by using the /api/measures``endpoint. The metric keys are listed in the metric tables in Metric definitions or you can use the /api/metrics endpoint to retrieve them.