API list all files on a project
Problem to solve
We have an endpoint for uploading a file to a project. At the moment just the create
action (POST /projects/:id/uploads
) is implemented. It is not possible to list all available files.
Proposal
We should create a new routes for the missing action
list: GET /projects/:id/uploads
Permissions and Security
Files can be used in issues, wiki pages and merge requests. The minimum access level to see all of these is Reporter
Documentation
This should add a new section to the API documentation: https://docs.gitlab.com/ee/api/projects.html#upload-a-file
Testing
Intended users
So far it seems like we don't have a UI to manage uploads. We still have to validate to which users this feature would be useful.
Links / references
This issue came up in a discussion on #25838
Implementation Guide
This can be added next to the POST upload endpoint in lib/api/projects.rb:667.
API endpoints are tested in request specs. The right place to add a test would be next to the description of POST /projects/:id/uploads