title: Get consumed pipeline artifacts from Azure Devops build via REST API
body: <p>For a release pipeline I want to get the <strong>consumed</strong> pipeline artifacts from a build artifact via REST API (or a task).</p>
  <p>Background:
  I have a release pipeline in azure devops that consumes one main artifact, the setup. The setup packs several binaries in a certain version inside. In the release pipeline I want to find the system tests that fit to the binaries that were packed in the setup. These system tests are published as artifact together with the binaries.</p>
  <p>I have the following piplines, that are triggered one after another:</p>
  <ol>
  <li><strong>BinaryPipeline</strong> -&gt; publish artifacts: <em>&quot;binaries&quot;</em>, <em>&quot;system tests&quot;</em></li>
  <li><strong>SetupPipeline</strong> -&gt; consumes artifact <em>&quot;binaries&quot;</em> from BinaryPipeline, publish artifacts: <em>&quot;setup&quot;</em>,</li>
  <li><strong>Release pipeline</strong> -&gt; consumes artifact <em>&quot;setup&quot;</em> from setup pipline, consumes <em>&quot;system tests&quot;</em> from BinaryPipeline</li>
  </ol>
  <p>Problem:
  The release pipeline should consume the artifact &quot;system tests&quot; from the same build (of BinaryPipeline) that was consumed to build the setup.</p>
  <p>I tried to solve the problem with the REST API, but</p>
  <pre><code>https://dev.azure.com/&lt;company&gt;/&lt;project&gt;/_apis/build/builds/&lt;buildid&gt;/artifacts
  </code></pre>
  <p>returns only the produced artifacts, not the consumed.</p>
  <p>I see the following workarounds, still I don't like them:</p>
  <ol>
  <li>Publish a text file that contains version information
  -&gt; Best workaround. I don't like that I have to rely on a special file in artifacts.</li>
  <li>Set build properties (although I didn't find out how to set the properties during build)
  -&gt; Didn't find out how</li>
  <li>Republish the system tests in my setup build
  -&gt; Bad pactrice to copy artifacts</li>
  <li>Parse the logs
  -&gt; Bad because I've to rely on title names of tasks</li>
  </ol>
  <p>How can I get the <strong>consumed</strong> pipeline artifacts from a build via REST API in Azure Devops?</p>