Get 404 when trying to download 'latest artifact' with link

Im trying to download the latest artifact for a build, but dont seem to be able to create the correct url.

From the doc. the url should be like this:<namespace>/<project>/-/jobs/artifacts/<ref>/download?job=<job_name>
example from doc:

the only thing i can see differs is that i have project with a format that is:


When i copy the url from the GitLab portal that works, but its tied to the job-id, so when i switch out the id with branch name it stops working.

This is the url from the portal downloading artifact from a job with job-id:
This works

So the url i thought ended up with that isnt working is:
This gives a 404 error

It looks like I’m having the same issue with my project.

I just found this issue that sounds related url to download the artifact of the latest build does not download the latest one. (#20230) · Issues · / GitLab · GitLab

Update ! I found the solution to my problem.

I have a pipeline with manual action and the manual action wasn’t done. It need to manual action to be done. It means the full full pipeline need to be successful.

Hopefully this comment will help.