Merge pull request #3170 from Asquera/api/system_hooks_adjustments

API: system hook request functions and documentation updated
This commit is contained in:
Dmitriy Zaporozhets 2013-03-10 23:56:29 -07:00
commit a29c883b5b
3 changed files with 36 additions and 12 deletions

View file

@ -8,7 +8,10 @@ Get list of system hooks
GET /hooks
```
Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
Parameters:
+ **none**
## Add new system hook hook
@ -20,7 +23,6 @@ Parameters:
+ `url` (required) - The hook URL
Will return status `201 Created` on success, or `404 Not found` on fail.
## Test system hook
@ -32,10 +34,12 @@ Parameters:
+ `id` (required) - The ID of hook
Will return hook with status `200 OK` on success, or `404 Not found` on fail.
## Delete system hook
Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook
is not available. If the hook is deleted it is also returned as JSON.
```
DELETE /hooks/:id
```
@ -43,5 +47,3 @@ DELETE /hooks/:id
Parameters:
+ `id` (required) - The ID of hook
Will return status `200 OK` on success, or `404 Not found` on fail.