Unable to download artifacts via API for projects with path name containing '.'
I am hitting a problem with the API when trying to download jobs artifacts from a project that contains .s in its path name.
For a project name group/website-gitlab-io the following will work correctly:
curl -v --header "PRIVATE-TOKEN: <token>" \
https://gitlab.com/api/v4/projects/group%2Fwebsite-gitlab-io/jobs/artifacts/master/download?job=pages
However, if the same project has its path changed to group/website.gitlab.io the following request will return a 404 Not Found:
curl -v --header "PRIVATE-TOKEN: <token>" \
https://gitlab.com/api/v4/projects/group%2Fwebsite.gitlab.io/jobs/artifacts/master/download?job=pages
I've even tried URL encoding the . without any luck:
curl -v --header "PRIVATE-TOKEN: <token>" \
https://gitlab.com/api/v4/projects/group%2Fwebsite%2Egitlab%2Eio/jobs/artifacts/master/download?job=pages
Interestingly if the job ID is known, then the artifact can be downloaded:
curl -v --header "PRIVATE-TOKEN: <token>" \
https://gitlab.com/api/v4/projects/group%2Fwebsite.gitlab.io/jobs/<job_id>/artifacts