summaryrefslogtreecommitdiff
path: root/doc/api/notes.md
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2012-11-29 12:32:05 -0800
committerNihad Abbasov <narkoz.2008@gmail.com>2012-11-29 12:32:05 -0800
commit658f260e9835800901462e5a5de350ee84fefe8d (patch)
treed35bbf052e56fc2f1c3bbfb9224f8e64e251600c /doc/api/notes.md
parent961cb285b08aed0281bc9a6e4634388ecc8e914c (diff)
downloadgitlab-ce-658f260e9835800901462e5a5de350ee84fefe8d.tar.gz
add docs for notes API
Diffstat (limited to 'doc/api/notes.md')
-rw-r--r--doc/api/notes.md121
1 files changed, 121 insertions, 0 deletions
diff --git a/doc/api/notes.md b/doc/api/notes.md
new file mode 100644
index 00000000000..3d8309d3b9d
--- /dev/null
+++ b/doc/api/notes.md
@@ -0,0 +1,121 @@
+## List notes
+
+### List project wall notes
+
+Get a list of project wall notes.
+
+```
+GET /projects/:id/notes
+```
+
+```json
+[
+ {
+ "id": 522,
+ "body": "The solution is rather tricky",
+ "author": {
+ "id": 1,
+ "email": "john@example.com",
+ "name": "John Smith",
+ "blocked": false,
+ "created_at": "2012-05-23T08:00:58Z"
+ },
+ "updated_at":"2012-11-27T19:16:44Z",
+ "created_at":"2012-11-27T19:16:44Z"
+ }
+]
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
+
+### List issue notes
+
+Get a list of issue notes.
+
+```
+GET /projects/:id/issues/:issue_id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `issue_id` (required) - The ID of an issue
+
+### List snippet notes
+
+Get a list of snippet notes.
+
+```
+GET /projects/:id/snippets/:snippet_id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `snippet_id` (required) - The ID of a snippet
+
+## Single note
+
+### Single issue note
+
+Get an issue note.
+
+```
+GET /projects/:id/issues/:issue_id/:notes/:note_id
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `issue_id` (required) - The ID of a project issue
++ `note_id` (required) - The ID of an issue note
+
+### Single snippet note
+
+Get a snippet note.
+
+```
+GET /projects/:id/issues/:snippet_id/:notes/:note_id
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `snippet_id` (required) - The ID of a project snippet
++ `note_id` (required) - The ID of an snippet note
+
+## New note
+
+### New issue note
+
+Create a new issue note.
+
+```
+POST /projects/:id/issues/:issue_id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `issue_id` (required) - The ID of an issue
++ `body` (required) - The content of a note
+
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.
+
+### New snippet note
+
+Create a new snippet note.
+
+```
+POST /projects/:id/snippets/:snippet_id/notes
+```
+
+Parameters:
+
++ `id` (required) - The ID or code name of a project
++ `snippet_id` (required) - The ID of an snippet
++ `body` (required) - The content of a note
+
+Will return created note with status `201 Created` on success, or `404 Not found` on fail.