From 1dd712ddc238d2e6c30be09cb071c8e9b60cfcac Mon Sep 17 00:00:00 2001 From: Matt Humphrey Date: Wed, 6 Mar 2013 10:33:32 +0000 Subject: System hooks API. --- doc/api/system_hooks.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 doc/api/system_hooks.md (limited to 'doc/api/system_hooks.md') diff --git a/doc/api/system_hooks.md b/doc/api/system_hooks.md new file mode 100644 index 00000000000..f6e11ed238e --- /dev/null +++ b/doc/api/system_hooks.md @@ -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. \ No newline at end of file -- cgit v1.2.1