diff options
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/issues.md | 18 | ||||
-rw-r--r-- | doc/api/merge_requests.md | 19 |
2 files changed, 32 insertions, 5 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md index 9e704648b25..18d64c41986 100644 --- a/doc/api/issues.md +++ b/doc/api/issues.md @@ -326,17 +326,25 @@ Example response: } ``` -## Delete existing issue (**Deprecated**) +## Delete an issue -This call is deprecated and returns a `405 Method Not Allowed` error if called. -An issue gets now closed and is done by calling -`PUT /projects/:id/issues/:issue_id` with the parameter `state_event` set to -`close`. See [edit issue](#edit-issue) for more details. +Only for admins and project owners. Soft deletes the issue in question. +If the operation is successful, a status code `200` is returned. In case you cannot +destroy this issue, or it is not present, code `404` is given. ``` DELETE /projects/:id/issues/:issue_id ``` +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | +| `issue_id` | integer | yes | The ID of a project's issue | + +```bash +curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/issues/85 +``` + ## Comments on issues Comments are done via the [notes](notes.md) resource. diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 5c527d55481..b20a6300b7a 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -380,6 +380,25 @@ Parameters: If the operation is successful, 200 and the updated merge request is returned. If an error occurs, an error number and a message explaining the reason is returned. +## Delete a merge request + +Only for admins and project owners. Soft deletes the merge request in question. +If the operation is successful, a status code `200` is returned. In case you cannot +destroy this merge request, or it is not present, code `404` is given. + +``` +DELETE /projects/:id/merge_requests/:merge_request_id +``` + +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | integer | yes | The ID of a project | +| `merge_request_id` | integer | yes | The ID of a project's merge request | + +```bash +curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/4/merge_request/85 +``` + ## Accept MR Merge changes submitted with MR using this API. |