Commit d0000e5c189534468da41205a1d5ad61f5c26547
1 parent
cfbd0b4f
Exists in
master
and in
4 other branches
Update doc/api/projects.md for hooks API
Added documentation for getting project hook and editing project hook.
Showing
1 changed file
with
34 additions
and
2 deletions
Show diff stats
doc/api/projects.md
... | ... | @@ -196,9 +196,9 @@ Parameters: |
196 | 196 | |
197 | 197 | Status code `200` will be returned on success. |
198 | 198 | |
199 | -## Get project hooks | |
199 | +## List project hooks | |
200 | 200 | |
201 | -Get hooks for project | |
201 | +Get list for project hooks | |
202 | 202 | |
203 | 203 | ``` |
204 | 204 | GET /projects/:id/hooks |
... | ... | @@ -210,6 +210,21 @@ Parameters: |
210 | 210 | |
211 | 211 | Will return hooks with status `200 OK` on success, or `404 Not found` on fail. |
212 | 212 | |
213 | +## Get project hook | |
214 | + | |
215 | +Get hook for project | |
216 | + | |
217 | +``` | |
218 | +GET /projects/:id/hooks/:hook_id | |
219 | +``` | |
220 | + | |
221 | +Parameters: | |
222 | + | |
223 | ++ `id` (required) - The ID or code name of a project | |
224 | ++ `hook_id` (required) - The ID of a project hook | |
225 | + | |
226 | +Will return hook with status `200 OK` on success, or `404 Not found` on fail. | |
227 | + | |
213 | 228 | ## Add project hook |
214 | 229 | |
215 | 230 | Add hook to project |
... | ... | @@ -225,6 +240,23 @@ Parameters: |
225 | 240 | |
226 | 241 | Will return status `201 Created` on success, or `404 Not found` on fail. |
227 | 242 | |
243 | +## Edit project hook | |
244 | + | |
245 | +Edit hook for project | |
246 | + | |
247 | +``` | |
248 | +PUT /projects/:id/hooks/:hook_id | |
249 | +``` | |
250 | + | |
251 | +Parameters: | |
252 | + | |
253 | ++ `id` (required) - The ID or code name of a project | |
254 | ++ `hook_id` (required) - The ID of a project hook | |
255 | ++ `url` (required) - The hook URL | |
256 | + | |
257 | +Will return status `201 Created` on success, or `404 Not found` on fail. | |
258 | + | |
259 | + | |
228 | 260 | ## Delete project hook |
229 | 261 | |
230 | 262 | Delete hook from project | ... | ... |