notes.md 3.5 KB
Newer Older
1
## Wall
N
Nihad Abbasov 已提交
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

### 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

33 34 35 36

### Get single wall note

Returns a single wall note.
D
Dmitriy Zaporozhets 已提交
37 38

```
39
GET /projects/:id/notes/:note_id
D
Dmitriy Zaporozhets 已提交
40 41 42 43 44
```

Parameters:

+ `id` (required) - The ID of a project
45
+ `note_id` (required) - The ID of a wall note
D
Dmitriy Zaporozhets 已提交
46

47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66

### Create new wall note

Creates a new wall note.

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

Parameters:

+ `id` (required) - The ID of a project
+ `body` (required) - The content of a note


## Issues

### List project issue notes

Gets a list of all notes for a single issue.
N
Nihad Abbasov 已提交
67 68 69 70 71 72 73

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

Parameters:

74
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
75 76
+ `issue_id` (required) - The ID of an issue

77 78 79 80

### Get single issue note

Returns a single note for a specific project issue
N
Nihad Abbasov 已提交
81 82

```
83
GET /projects/:id/issues/:issue_id/notes/:note_id
N
Nihad Abbasov 已提交
84 85 86 87
```

Parameters:

88
+ `id` (required) - The ID of a project
89 90 91
+ `issue_id` (required) - The ID of a project issue
+ `note_id` (required) - The ID of an issue note

N
Nihad Abbasov 已提交
92

93
### Create new issue note
N
Nihad Abbasov 已提交
94

95
Creates a new note to a single project issue.
N
Nihad Abbasov 已提交
96 97

```
98
POST /projects/:id/issues/:issue_id/notes
N
Nihad Abbasov 已提交
99 100 101 102
```

Parameters:

103
+ `id` (required) - The ID of a project
104 105 106 107 108 109 110 111 112
+ `issue_id` (required) - The ID of an issue
+ `body` (required) - The content of a note


## Snippets

### List all snippet notes

Gets a list of all notes for a single snippet. Snippet notes are comments users can post to a snippet.
N
Nihad Abbasov 已提交
113 114

```
115
GET /projects/:id/snippets/:snippet_id/notes
N
Nihad Abbasov 已提交
116 117 118 119
```

Parameters:

120
+ `id` (required) - The ID of a project
121 122
+ `snippet_id` (required) - The ID of a project snippet

N
Nihad Abbasov 已提交
123

124
### Get single snippet note
N
Nihad Abbasov 已提交
125

126
Returns a single note for a given snippet.
N
Nihad Abbasov 已提交
127 128

```
129
GET /projects/:id/snippets/:snippet_id/notes/:note_id
N
Nihad Abbasov 已提交
130 131 132 133
```

Parameters:

134
+ `id` (required) - The ID of a project
N
Nihad Abbasov 已提交
135 136 137
+ `snippet_id` (required) - The ID of a project snippet
+ `note_id` (required) - The ID of an snippet note

138 139 140 141

### Create new snippet note

Creates a new note for a single snippet. Snippet notes are comments users can post to a snippet.
N
Nihad Abbasov 已提交
142 143

```
144
POST /projects/:id/snippets/:snippet_id/notes
N
Nihad Abbasov 已提交
145 146 147 148
```

Parameters:

149
+ `id` (required) - The ID of a project
150
+ `snippet_id` (required) - The ID of an snippet
N
Nihad Abbasov 已提交
151 152
+ `body` (required) - The content of a note

153 154 155 156 157 158

## Merge Requests

### List all merge request notes

Gets a list of all notes for a single merge request.
N
Nihad Abbasov 已提交
159 160

```
161
GET /projects/:id/merge_requests/:merge_request_id/notes
N
Nihad Abbasov 已提交
162 163 164 165
```

Parameters:

166
+ `id` (required) - The ID of a project
167 168
+ `merge_request_id` (required) - The ID of a project merge request

N
Nihad Abbasov 已提交
169

170 171 172
### Get single merge request note

Returns a single note for a given merge request.
N
Nihad Abbasov 已提交
173 174

```
175
GET /projects/:id/merge_requests/:merge_request_id/notes/:note_id
N
Nihad Abbasov 已提交
176 177 178 179
```

Parameters:

180
+ `id` (required) - The ID of a project
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196
+ `merge_request_id` (required) - The ID of a project merge request
+ `note_id` (required) - The ID of a merge request note


### Create new merge request note

Creates a new note for a single merge request.

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

Parameters:

+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of a merge request
N
Nihad Abbasov 已提交
197 198
+ `body` (required) - The content of a note