Pull (download) packages from Generic Package Registry

Problem to solve

Users will want to be able to download packages once they have been added to the release via release generation in #235492 (closed).

Intended users

User experience goal

Users should be able to upload, list and download packages in the feed with versioning metadata supported by being embedded in files names

Proposal

Implement new API endpoint to allow download of files from generic package:

/api/v4/projects/:id/packages/generic/:package_name/:package_version/:file_name

Example usage

curl --header 'Private-Token: <personal-access-token>' \
  http://gitlab.com/api/v4/projects/42/packages/generic/gitlab-runner/1.0.0/gitlab-runner-windows-amd64.exe

Documentation

We should add documentation for how to download packages to the generic registry in https://docs.gitlab.com/ee/user/project/releases/#release-assets

What is the type of buyer?

GitLab Core

Is this a cross-stage feature?

~"group::package" and ~"group::release management"

Edited by Jaime Martinez