Add API for retrieving limit exclusions
What does this MR do and why?
Adds an admin-only API endpoint for retrieving all Namespaces::Storage::LimitExclusions records
GET /namespaces/storage/limit_exclusions
This endpoint will be used by an admin-only frontend UI as part of https://gitlab.com/groups/gitlab-org/-/epics/9173
Testing
Replace :id and :your-pat (for an admin user) in the below cURLs accordingly:
First create some exclusions
curl --request POST \
--url http://gdk.test:3000/api/v4/namespaces/:id/storage/limit_exclusion \
--header 'Content-Type: application/json' \
--header 'PRIVATE-TOKEN: :your-pat' \
--data '{
"reason": "testing an exclusion"
}'
Then retrieve all of them:
curl --request GET \
--url http://gdk.test:3000/api/v4/namespaces/storage/limit_exclusions \
--header 'PRIVATE-TOKEN: :your-pat'
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Vijay Hawoldar