title: Download dotenv job artifact via GitLab API
body: <p>I'm trying to download dotenv artifact called <code>release.env</code> from the latest job related to branch <code>feature/tests-update</code> but API returns <code>404</code> error.</p>
  <p>API docs: <a href="https://docs.gitlab.com/14.8/ee/api/job_artifacts.html#download-a-single-artifact-file-by-job-id" rel="nofollow noreferrer">https://docs.gitlab.com/14.8/ee/api/job_artifacts.html#download-a-single-artifact-file-by-job-id</a></p>
  <p>Request example:</p>
  <pre><code>curl -v --get --header &quot;PRIVATE-TOKEN: &lt;TOKEN&gt;&quot; --data-urlencode &quot;job=create-release&quot; &quot;https://&lt;gitlab-host&gt;/api/v4/projects/2/jobs/artifacts/feature%2Ftests-update/raw/release%2Eenv&quot;
  </code></pre>
  <p>GitLab community 14.8.</p>