title: GitLab Release Links API: 404 project not found
body: <p>I'm trying to add an asset to a GitLab release but I keep getting <code>{&quot;message&quot;:&quot;404 Project Not Found&quot;}</code> when trying to add a link. I was trying to follow <a href="https://docs.gitlab.com/13.7/ee/api/releases/links.html#create-a-link" rel="nofollow noreferrer">https://docs.gitlab.com/13.7/ee/api/releases/links.html#create-a-link</a>, but I am either crazy or missing something. I have echoed the URLs for both <code>${PACKAGE_REGISTRY_URL}/${PKG_VERSION}/${LINUX}</code> and <code>${RELEASE_REGISTRY_URL}/${CI_PROJECT_ID}/releases/v${PKG_VERSION}/assets/links</code> and both are valid, and appear to be correct, links. If I use the first one (<code>PACKAGE_URL</code>) then I get a download of the file that I am wanting. If I use the (<code>RELEASE_REGISTRY_URL</code>) then I get a page that shows an empty array.</p>
  <p><a href="https://i.stack.imgur.com/5ZKHo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5ZKHo.png" alt="enter image description here" /></a></p>
  <p>I have also verified that all variables do have the correct values that I would be expecting. I have tried with and without the <code>link_type</code> option.</p>
  <pre class="lang-sh prettyprint-override"><code># This works with no problem
  curl --header &quot;JOB-TOKEN: $CI_JOB_TOKEN&quot; \
    --upload-file bin/${LINUX} &quot;${PACKAGE_REGISTRY_URL}/${PKG_VERSION}/${LINUX}&quot;
  
  # This returns: {&quot;message&quot;:&quot;404 Project Not Found&quot;}
  curl --request POST \
    --header &quot;JOB-TOKEN: $CI_JOB_TOKEN&quot; \
    --data link_type=&quot;other&quot; \
    --data name=&quot;${LINUX}&quot; \
    --data url=&quot;${PACKAGE_REGISTRY_URL}/${PKG_VERSION}/${LINUX}&quot; \
    --data filepath=&quot;bin/${LINUX}&quot; \
      &quot;${RELEASE_REGISTRY_URL}/${CI_PROJECT_ID}/releases/v${PKG_VERSION}/assets/links&quot;
  </code></pre>
  <pre class="lang-sh prettyprint-override"><code>&quot;${PACKAGE_REGISTRY_URL}/${PKG_VERSION}/${LINUX}&quot; -&gt; # https://gitlab.com/api/v4/projects/&lt;myidishere&gt;/packages/generic/test/1.1.0/test-1.1.0-linux
  
  &quot;${RELEASE_REGISTRY_URL}/${CI_PROJECT_ID}/releases/v${PKG_VERSION}/assets/links&quot; -&gt; # https://gitlab.com/api/v4/projects/&lt;myidishere&gt;/releases/v1.1.0/assets/links
  </code></pre>
  <p>Here is the example that is in the GitLab documentation.</p>
  <pre class="lang-sh prettyprint-override"><code>curl --request POST \
      --header &quot;PRIVATE-TOKEN: &lt;your_access_token&gt;&quot; \
      --data name=&quot;hellodarwin-amd64&quot; \
      --data url=&quot;https://gitlab.example.com/mynamespace/hello/-/jobs/688/artifacts/raw/bin/hello-darwin-amd64&quot; \
      --data filepath=&quot;/bin/hellodarwin-amd64&quot; \
      &quot;https://gitlab.example.com/api/v4/projects/20/releases/v1.7.0/assets/links&quot;
  </code></pre>