Update doc/api/projects.md for hooks API

Added documentation for getting project hook and editing project hook.
This commit is contained in:
jozefvaclavik 2012-10-12 10:38:15 +03:00
parent cfbd0b4f26
commit d0000e5c18

View file

@ -196,9 +196,9 @@ Parameters:
Status code `200` will be returned on success.
## Get project hooks
## List project hooks
Get hooks for project
Get list for project hooks
```
GET /projects/:id/hooks
@ -210,6 +210,21 @@ Parameters:
Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
## Get project hook
Get hook for project
```
GET /projects/:id/hooks/:hook_id
```
Parameters:
+ `id` (required) - The ID or code name of a project
+ `hook_id` (required) - The ID of a project hook
Will return hook with status `200 OK` on success, or `404 Not found` on fail.
## Add project hook
Add hook to project
@ -225,6 +240,23 @@ Parameters:
Will return status `201 Created` on success, or `404 Not found` on fail.
## Edit project hook
Edit hook for project
```
PUT /projects/:id/hooks/:hook_id
```
Parameters:
+ `id` (required) - The ID or code name of a project
+ `hook_id` (required) - The ID of a project hook
+ `url` (required) - The hook URL
Will return status `201 Created` on success, or `404 Not found` on fail.
## Delete project hook
Delete hook from project