title: Get build information from Jenkins API
body: <p>I'm writing a Jenkins plugin and I want to retrieve last build information (number, timestamp) for a given job from Jenkins api. I can do following REST call and obtain it. </p>
  
  <pre><code>&lt;url_to_jenkins&gt;job/&lt;job name&gt;/api/json?tree=builds[number,status,timestamp,id,result]
  </code></pre>
  
  <p>Since my plugin is also deployed inside Jenkins is there a way to get this info by calling direct JAVA api instead of this REST call ?</p>