sonarqubesonarqube-api

REST API for getting project last analysis date?


How do I get a project's last analysis time (the one you can see in the dashboard) with the REST API of SonarQube?

I am working with SonarQube 4.5.6, but if it's only available on later versions I'd still be interested in how it is done.


Solution

  • You can use the Resources API : https://nemo.sonarqube.org/api/resources/index?metrics=date&format=json and look at the 'date' field to get the last analysis time.