Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <zegerjan@gitlab.com>2016-02-26 11:55:43 +0300
committerZeger-Jan van de Weg <zegerjan@gitlab.com>2016-03-19 23:23:03 +0300
commit212e83bab3f1f9055f1321c3e934b4f4659250bf (patch)
treef3b67cf54ba43ca7d008c470beadfd12df3cfbb2 /doc/api/issues.md
parent3f22a92f4a561543c2249786b695d0c65120455b (diff)
Soft delete issuables
Diffstat (limited to 'doc/api/issues.md')
-rw-r--r--doc/api/issues.md44
1 files changed, 39 insertions, 5 deletions
diff --git a/doc/api/issues.md b/doc/api/issues.md
index 9e704648b25..5df7ce9f006 100644
--- a/doc/api/issues.md
+++ b/doc/api/issues.md
@@ -326,17 +326,51 @@ Example response:
}
```
-## Delete existing issue (**Deprecated**)
+## Delete existing 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. Soft deletes the issue in question. Returns the issue which was deleted.
```
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
+```
+
+Example response:
+
+```json
+{
+ "created_at" : "2016-01-07T12:46:01.410Z",
+ "author" : {
+ "name" : "Alexandra Bashirian",
+ "avatar_url" : null,
+ "username" : "eileen.lowe",
+ "id" : 18,
+ "state" : "active",
+ "web_url" : "https://gitlab.example.com/u/eileen.lowe"
+ },
+ "state" : "closed",
+ "title" : "Issues with auth",
+ "project_id" : 4,
+ "description" : null,
+ "updated_at" : "2016-01-07T12:55:16.213Z",
+ "iid" : 15,
+ "labels" : [
+ "bug"
+ ],
+ "id" : 85,
+ "assignee" : null,
+ "milestone" : null
+}
+```
+
## Comments on issues
Comments are done via the [notes](notes.md) resource.