notes.md 2.9 KB
Newer Older
N
Nihad Abbasov 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
## 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,
18
      "username": "john_smith",
N
Nihad Abbasov 已提交
19 20 21 22 23
      "email": "john@example.com",
      "name": "John Smith",
      "blocked": false,
      "created_at": "2012-05-23T08:00:58Z"
    },
24
    "created_at": "2012-11-27T19:16:44Z"
N
Nihad Abbasov 已提交
25 26 27 28 29 30
  }
]
```

Parameters:

31
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
32

D
Dmitriy Zaporozhets 已提交
33 34 35 36 37 38 39 40 41 42 43 44 45
### List merge request notes

Get a list of merge request notes.

```
GET /projects/:id/merge_requests/:merge_request_id/notes
```

Parameters:

+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of an merge request

N
Nihad Abbasov 已提交
46 47 48 49 50 51 52 53 54 55
### List issue notes

Get a list of issue notes.

```
GET /projects/:id/issues/:issue_id/notes
```

Parameters:

56
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
57 58 59 60 61 62 63 64 65 66 67 68
+ `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:

69
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
70 71 72 73
+ `snippet_id` (required) - The ID of a snippet

## Single note

N
Nihad Abbasov 已提交
74 75 76 77 78 79 80 81 82 83
### Single wall note

Get a wall note.

```
GET /projects/:id/notes/:note_id
```

Parameters:

84
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
85 86
+ `note_id` (required) - The ID of a wall note

N
Nihad Abbasov 已提交
87 88 89 90 91
### Single issue note

Get an issue note.

```
92
GET /projects/:id/issues/:issue_id/notes/:note_id
N
Nihad Abbasov 已提交
93 94 95 96
```

Parameters:

97
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
98 99 100 101 102 103 104 105
+ `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.

```
106
GET /projects/:id/issues/:snippet_id/notes/:note_id
N
Nihad Abbasov 已提交
107 108 109 110
```

Parameters:

111
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
112 113 114 115 116
+ `snippet_id` (required) - The ID of a project snippet
+ `note_id` (required) - The ID of an snippet note

## New note

N
Nihad Abbasov 已提交
117 118 119 120 121 122 123 124 125 126
### New wall note

Create a new wall note.

```
POST /projects/:id/notes
```

Parameters:

127
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
128 129
+ `body` (required) - The content of a note

130
Will return created note with status `201 Created` on success, `400 Bad Request` if the body attribute is missing or `404 Not found` on fail.
N
Nihad Abbasov 已提交
131 132


N
Nihad Abbasov 已提交
133 134 135 136 137 138 139 140 141 142
### New issue note

Create a new issue note.

```
POST /projects/:id/issues/:issue_id/notes
```

Parameters:

143
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
144 145 146
+ `issue_id` (required) - The ID of an issue
+ `body` (required) - The content of a note

147
Will return created note with status `201 Created` on success, `400 Bad Request` if the body attribute is missing or `404 Not found` on fail.
N
Nihad Abbasov 已提交
148 149 150 151 152 153 154 155 156 157 158

### New snippet note

Create a new snippet note.

```
POST /projects/:id/snippets/:snippet_id/notes
```

Parameters:

159
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
160 161 162
+ `snippet_id` (required) - The ID of an snippet
+ `body` (required) - The content of a note

163
Will return created note with status `201 Created` on success, `400 Bad Request` if the body attribute is missing or `404 Not found` on fail.