Add API for deleting limit exclusion records
What does this MR do and why?
Adds an admin-only API endpoint for deleting Namespaces::Storage::LimitExclusions
record related to a Namespace
-
DELETE /namespaces/:id/storage/limit_exclusion
- delete a new exclusion
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 an exclusion
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 delete it:
curl --request DELETE \
--url http://gdk.test:3000/api/v4/namespaces/:id/storage/limit_exclusion \
--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