Add API for creating limit exclusions
What does this MR do and why?
Adds an admin-only API endpoint for creating Namespaces::Storage::LimitExclusions records relating to a Namespace
-
POST /namespaces/:id/storage/limit_exclusion- create a new exclusion
Eventually we'll also add DELETE and GET endpoints (!116531 (merged), !116532 (merged) - separate MRs to keep the diff easier to review)
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 cURL accordingly:
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"
}'
Refs https://gitlab.com/gitlab-org/gitlab/-/issues/385740
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