Improve license API endpoints
https://docs.gitlab.com/ee/api/license.html
For https://gitlab.com/gitlab-org/gitlab-ee/issues/7054, I would like to add DELETE
and /download` endpoints.
These endpoints won't be useful to users because they will need the id of the license they want to destroy or download.
Currently, we don't present the license ID in the UI or API. Also, the user can only see the current license.
Current endpoints
- GET /license - Get current license, not including it's id
- POST /license - Add a new license
- GET /licenses - Get current and previous licenses, including their id's
- GET /license/:id - Get a license
- DELETE /license/:id - Destroy a license
Proposed endpoints
-
GET /licenses/:id - Get a license (same as GET /license/:id, but matches Rails convention)
-
GET /licenses/:id/download - Get a license file
-
GET /licenses/current - Get current license (Optional, might be good in case anyone is still expecting a single endpoint for only the current license.
-
GET /licenses/previous - Get previous licenses (Optional, just makes sense)
-
POST /licenses - Add a new license (This will probably be added by me shortly)
-
DELETE /licenses/:id - Destroy a license (same as DELETE /license/:id, but matches Rails convention)
I'm not opening this because I think that there is a huge use of this endpoint, it's just to solve a usability problem.