title: TeamCity: How to get a list of last builds for each build configuration that are currently not running?
body: <p>I am using TeamCity 7.1. I want to get a list including the last build of each build configuration (build type) that is currently not running. I found this question: <a href="https://stackoverflow.com/questions/11089462/teamcity-how-do-you-get-a-list-of-the-last-finished-build-of-each-project-thro">TeamCity - How do you get a list of the last finished build of each project through rest api?</a> but the REST URI in the answer did not work for me.</p>
  
  <pre><code>&lt;teamcity-server&gt;/httpAuth/app/rest/builds?locator=sinceBuild:(status:failure) 
  </code></pre>
  
  <p>seems to work and gives me all builds that succeeded after failing before. </p>
  
  <p>But the opposite</p>
  
  <pre><code>&lt;teamcity-server&gt;/httpAuth/app/rest/builds?locator=sinceBuild:(status:success)
  </code></pre>
  
  <p>does not return any builds.</p>
  
  <p>I know that I can get all build types, iterate though them and get the most recent finished build using</p>
  
  <pre><code>&lt;teamcity-server&gt;/httpAuth/app/rest/buildTypes/id:&lt;build-type-id&gt;/builds/running:false?count=1&amp;start=0 
  </code></pre>
  
  <p>("count=1&amp;start=0" may not be necessary)
  but I am not really sure that what I get is really the latest build. Also this requires many REST calls for all build types. A neat solution would use only one REST call.</p>
  
  <p>Any ideas?</p>