title: Azure DevOps REST API get request not working
body: <p>I want to be able to get information about the latest pipeline builds using the Azure DevOps REST API. I'm using Azure DevOps Server 2020 with the January 12 update.</p>
  <p>This is the API endpoint I'm using:
  https://[organization url]/[project name]/_apis/build/latest/succeeded?api-version=6.0-preview.1</p>
  <p>I get this error after making the GET request:</p>
  <pre><code>{&quot;$id&quot;:&quot;1&quot;,&quot;innerException&quot;:null,&quot;message&quot;:&quot;Build pipeline succeeded was not
       | found.&quot;,&quot;typeName&quot;:&quot;Microsoft.TeamFoundation.Build.WebApi.DefinitionNotFoundException,
       | Microsoft.TeamFoundation.Build2.WebApi&quot;,&quot;typeKey&quot;:&quot;DefinitionNotFoundException&quot;,&quot;errorCode&quot;:0,&quot;eventId&quot;:3000}
  </code></pre>
  <p>I've also tried these variations of the API endpoint:</p>
  <ul>
  <li><p><code>https://[organization url]/[project name]/_apis/build/latest/BuildResult?api-version=6.0-preview.1</code></p>
  </li>
  <li><p><code>https://[organization url]/[project name]/_apis/build/latest/BuildResult=succeeded?api-version=6.0-preview.1</code></p>
  </li>
  </ul>
  <p>I end up getting the same type of error. I know the base API url works because I'm able to get a valid response back using the Get Commits endpoint.</p>
  <p>How do I get the url to work?</p>
  <p>UPDATE:
  Using @GChamon answer as a guide I got the latest successful builds.</p>
  <p>This is the url that worked for me:</p>
  <p><code>http://[organization url]/[project name]/_apis/build/builds?resultFilter=succeeded&amp;api-version=6.0</code></p>
  <p>Interestingly when I tried to only use `.../build/builds' without any optional parameters it didn't return any results. When I added an optional parameter like resultFilter or statusFilter, it returned results.</p>