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:
authorRobert Schilling <rschilling@student.tugraz.at>2016-04-06 20:04:17 +0300
committerRobert Schilling <rschilling@student.tugraz.at>2016-04-12 15:24:05 +0300
commit9aefaa41ab1442f81ffc15ad9a8279bd1e92c91a (patch)
tree581326d413b1d83d237186c6a123da50787d3104 /doc/api/notes.md
parentba21c00f01bf4274d0e4cc3892293fc1e581b260 (diff)
Fix code review issues
Diffstat (limited to 'doc/api/notes.md')
-rw-r--r--doc/api/notes.md130
1 files changed, 113 insertions, 17 deletions
diff --git a/doc/api/notes.md b/doc/api/notes.md
index 82494bf83ff..2e0936f11b5 100644
--- a/doc/api/notes.md
+++ b/doc/api/notes.md
@@ -105,10 +105,10 @@ Parameters:
- `note_id` (required) - The ID of a note
- `body` (required) - The content of a note
-### Delete existing issue note
+### Delete an issue note
-Deletes an existing note of an issue. On success, this API method returns 200.
-If the note does not exist, the API returns 404.
+Deletes an existing note of an issue. On success, this API method returns 200
+and the deleted note. If the note does not exist, the API returns 404.
```
DELETE /projects/:id/issues/:issue_id/notes/:note_id
@@ -116,9 +116,41 @@ DELETE /projects/:id/issues/:issue_id/notes/:note_id
Parameters:
-- `id` (required) - The ID of a project
-- `issue_id` (required) - The ID of an issue
-- `note_id` (required) - The ID of a note
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer | yes | The ID of a project |
+| `issue_id` | integer | yes | The ID of an issue |
+| `note_id` | integer | yes | The ID of a note |
+
+```bash
+curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/issues/11/notes/636
+```
+
+Example Response:
+
+```json
+{
+ "id": 636,
+ "body": "This is a good idea.",
+ "attachment": null,
+ "author": {
+ "id": 1,
+ "username": "pipin",
+ "email": "admin@example.com",
+ "name": "Pip",
+ "state": "active",
+ "created_at": "2013-09-30T13:46:01Z",
+ "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon",
+ "web_url": "https://gitlab.example.com/u/pipin"
+ },
+ "created_at": "2016-04-05T22:10:44.164Z",
+ "system": false,
+ "noteable_id": 11,
+ "noteable_type": "Issue",
+ "upvote": false,
+ "downvote": false
+}
+```
## Snippets
@@ -197,10 +229,10 @@ Parameters:
- `note_id` (required) - The ID of a note
- `body` (required) - The content of a note
-### Delete existing snippet note
+### Delete a snippet note
-Deletes an existing note of a snippet. On success, this API method returns 200.
-If the note does not exist, the API returns 404.
+Deletes an existing note of a snippet. On success, this API method returns 200
+and the deleted note. If the note does not exist, the API returns 404.
```
DELETE /projects/:id/snippets/:snippet_id/notes/:note_id
@@ -208,9 +240,41 @@ DELETE /projects/:id/snippets/:snippet_id/notes/:note_id
Parameters:
-- `id` (required) - The ID of a project
-- `snippet_id` (required) - The ID of a snippet
-- `note_id` (required) - The ID of a note
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer | yes | The ID of a project |
+| `snippet_id` | integer | yes | The ID of a snippet |
+| `note_id` | integer | yes | The ID of a note |
+
+```bash
+curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/snippets/52/notes/1659
+```
+
+Example Response:
+
+```json
+{
+ "id": 1659,
+ "body": "This is a good idea.",
+ "attachment": null,
+ "author": {
+ "id": 1,
+ "username": "pipin",
+ "email": "admin@example.com",
+ "name": "Pip",
+ "state": "active",
+ "created_at": "2013-09-30T13:46:01Z",
+ "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon",
+ "web_url": "https://gitlab.example.com/u/pipin"
+ },
+ "created_at": "2016-04-06T16:51:53.239Z",
+ "system": false,
+ "noteable_id": 52,
+ "noteable_type": "Snippet",
+ "upvote": false,
+ "downvote": false
+}
+```
## Merge Requests
@@ -293,10 +357,10 @@ Parameters:
- `note_id` (required) - The ID of a note
- `body` (required) - The content of a note
-### Delete existing snippet note
+### Delete a merge request note
Deletes an existing note of a merge request. On success, this API method returns
-200. If the note does not exist, the API returns 404.
+200 and the deleted note. If the note does not exist, the API returns 404.
```
DELETE /projects/:id/merge_requests/:merge_request_id/notes/:note_id
@@ -304,6 +368,38 @@ DELETE /projects/:id/merge_requests/:merge_request_id/notes/:note_id
Parameters:
-- `id` (required) - The ID of a project
-- `merge_request_id` (required) - The ID of a merge request
-- `note_id` (required) - The ID of a note
+| Attribute | Type | Required | Description |
+| --------- | ---- | -------- | ----------- |
+| `id` | integer | yes | The ID of a project |
+| `merge_request_id` | integer | yes | The ID of a merge request |
+| `note_id` | integer | yes | The ID of a note |
+
+```bash
+curl -X DELETE -H "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v3/projects/5/merge_requests/7/notes/1602
+```
+
+Example Response:
+
+```json
+{
+ "id": 1602,
+ "body": "This is a good idea.",
+ "attachment": null,
+ "author": {
+ "id": 1,
+ "username": "pipin",
+ "email": "admin@example.com",
+ "name": "Pip",
+ "state": "active",
+ "created_at": "2013-09-30T13:46:01Z",
+ "avatar_url": "http://www.gravatar.com/avatar/5224fd70153710e92fb8bcf79ac29d67?s=80&d=identicon",
+ "web_url": "https://gitlab.example.com/u/pipin"
+ },
+ "created_at": "2016-04-05T22:11:59.923Z",
+ "system": false,
+ "noteable_id": 7,
+ "noteable_type": "MergeRequest",
+ "upvote": false,
+ "downvote": false
+}
+```