I am writing a Jenkins plugin and I want to get the latest build information (number, timestamp) for jobs from the Jenkins api. I can make the next REST call and get it.
<url_to_jenkins>job/<job name>/api/json?tree=builds[number,status,timestamp,id,result]
Since my plugin is also deployed inside Jenkins, is there a way to get this information by calling the direct JAVA api instead of this REST call?
source
share