title: Get Jenkins Job Build ID from Queue ID
body: <p>I'm successfully able to use this to kick off a Jenkins Job:</p>
  <pre><code>curl -X POST &quot;http://jenkins_srv:8080/job/MY_JOB/buildwithParameters?this=1&amp;that=2&quot; --user name:pass
  </code></pre>
  <p>I can also get the consoleText from this job using:</p>
  <pre><code>curl -X POST &quot;http://jenkins_srv:8080/job/MY_JOB/lastBuild/consoleText&quot;
  </code></pre>
  <p>However, this doesn't scale if I run multiple jobs back to back.  I've noticed that the first curl command has a return that includes:</p>
  <pre><code>Location: http://jenkins_srv:8080/queue/item/123/
  </code></pre>
  <p>I'm assuming that <code>123</code> is the job queue id.</p>
  <p>My question is, if I queue jobs <code>121</code>, <code>122</code>, &amp; <code>123</code> back to back, what do I use to check the status of job queue item <code>122</code>?  Also, what do I use to determine the actual build id that eventually resulted from job queue item <code>122</code>?</p>