Cannot download specific file from generic package when package contains multiple similarly-named files
Take the following example package:
The API endpoint for downloading a package file is:
GET /projects/:id/packages/generic/:package_name/:package_version/:file_name
For this API endpoint, the file you download is selected using a file name. Using the example in the screenshot, you can see that it would be impossible to select a specific file from the list, since they all have the same name.
In other package-related API endpoints, each of these files has a unique ID - take the endpoint for deleting a package file.
If there is an endpoint for deleting specific files, why is there not also an endpoint for downloading this file, using that same ID? This would alleviate the problem where a specific file cannot be selected.
In the web UI there is the URL
https://gitlab.com/{GROUP}/{PROJECT}/-/package_files/{FILE_ID}/download
However this URL cannot be used with an access token, and attempting to use it will simply return a 302 /users/sign_in
response.
Possibly this is a documentation issue, and there is in fact an endpoint which can be used to download these files?