System hooks API.
This commit is contained in:
parent
d03af842c5
commit
1dd712ddc2
4 changed files with 177 additions and 0 deletions
47
doc/api/system_hooks.md
Normal file
47
doc/api/system_hooks.md
Normal file
|
@ -0,0 +1,47 @@
|
|||
All methods require admin authorization.
|
||||
|
||||
## List system hooks
|
||||
|
||||
Get list of system hooks
|
||||
|
||||
```
|
||||
GET /hooks
|
||||
```
|
||||
|
||||
Will return hooks with status `200 OK` on success, or `404 Not found` on fail.
|
||||
|
||||
## Add new system hook hook
|
||||
|
||||
```
|
||||
POST /hooks
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `url` (required) - The hook URL
|
||||
|
||||
Will return status `201 Created` on success, or `404 Not found` on fail.
|
||||
|
||||
## Test system hook
|
||||
|
||||
```
|
||||
GET /hooks/:id
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
```
|
||||
DELETE /hooks/:id
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
+ `id` (required) - The ID of hook
|
||||
|
||||
Will return status `200 OK` on success, or `404 Not found` on fail.
|
Loading…
Add table
Add a link
Reference in a new issue