title: Jenkins: Get branch from last successful build
body: <p>I am wondering, if Jenkins API allows to retrieve the branch of a git repository, that has been built with the last successful build of a job.</p>
  <p>My job has a multi-branch specifier like 'developer-*', so it builds different feature branches.</p>
  <p>Now I would like to know, which branch actually has been build by this job lately.</p>
  <p>I can use this syntax to retrieve the last successful build with its timestamp.</p>
  <pre><code>http://localhost:8080/jenkins/view/myview/api/json?depth=2&amp;tree=jobs%5BdisplayName,lastBuild%5Bbuilding,result%5D,lastSuccessfulBuild%5Btimestamp%5D%5D
  </code></pre>
  <p>However, I could not find any property name in the API documentation that would give me the branch.</p>
  <p>Is that actually possible?</p>