Resolve "Allow to delete deployments via API"
What does this MR do and why?
Allows a user to delete deployments they own via DELETE
command on the deployments API
curl --request "DELETE" --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/deployments/1"
This is behind the :delete_deployments_api
feature flag
Screenshots or screen recordings
Expected response
{ "message": "202 Accepted" }
How to set up and validate locally
- Enable the feature flag
:delete_deployments_api
- i.e.Feature.enable(:delete_deployments_api)
- Create a deployment and note the deployment ID (as well as the project ID)
- Delete the deployment via curl (or your favorite REST client)
curl --request "DELETE" --header "PRIVATE-TOKEN: <your_access_token>" "https://<GITLAB_HOST>/api/v4/projects/<PROJECT_ID>/deployments/<DEPLOYMENT_ID>"
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.
Related to #336746 (closed)
Edited by Allen Cook