diff options
| author | Sytse Sijbrandij <sytses@gmail.com> | 2014-03-19 15:23:37 +0100 | 
|---|---|---|
| committer | Sytse Sijbrandij <sytses@gmail.com> | 2014-03-19 15:23:37 +0100 | 
| commit | 16f18227a8239be13dc41e72fcef1e7e5c22e283 (patch) | |
| tree | d5a88115c0116c0538f8c9505fc77be95d098623 | |
| parent | 492dc82ced619206aeed7e3aaae393d85a4d3f40 (diff) | |
| parent | 901976d9729fe5fb91929c463b0ad3a68e457c82 (diff) | |
| download | gitlab-ce-16f18227a8239be13dc41e72fcef1e7e5c22e283.tar.gz | |
Merge pull request #6535 from docwhat/sys-hooks-eols
Switched line endings to LF for system_hooks.md
| -rw-r--r-- | doc/api/system_hooks.md | 140 | 
1 files changed, 70 insertions, 70 deletions
| diff --git a/doc/api/system_hooks.md b/doc/api/system_hooks.md index 355ce31c126..2e87ada1d70 100644 --- a/doc/api/system_hooks.md +++ b/doc/api/system_hooks.md @@ -1,70 +1,70 @@ -All methods require admin authorization.
 -
 -The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks).
 -
 -## List system hooks
 -
 -Get list of system hooks
 -
 -```
 -GET /hooks
 -```
 -
 -Parameters:
 -
 -+ **none**
 -
 -```json
 -[
 -  {
 -    "id":3,
 -    "url":"http://example.com/hook",
 -    "created_at":"2013-10-02T10:15:31Z"
 -  }
 -]
 -```
 -
 -## Add new system hook hook
 -
 -```
 -POST /hooks
 -```
 -
 -Parameters:
 -
 -+ `url` (required) - The hook URL
 -
 -
 -## Test system hook
 -
 -```
 -GET /hooks/:id
 -```
 -
 -Parameters:
 -
 -+ `id` (required) - The ID of hook
 -
 -```json
 -{
 -  "event_name":"project_create",
 -  "name":"Ruby",
 -  "path":"ruby",
 -  "project_id":1,
 -  "owner_name":"Someone",
 -  "owner_email":"example@gitlabhq.com"
 -}
 -```
 -
 -## 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
 -```
 -
 -Parameters:
 -
 -+ `id` (required) - The ID of hook
 +All methods require admin authorization. + +The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks). + +## List system hooks + +Get list of system hooks + +``` +GET /hooks +``` + +Parameters: + ++ **none** + +```json +[ +  { +    "id":3, +    "url":"http://example.com/hook", +    "created_at":"2013-10-02T10:15:31Z" +  } +] +``` + +## Add new system hook hook + +``` +POST /hooks +``` + +Parameters: + ++ `url` (required) - The hook URL + + +## Test system hook + +``` +GET /hooks/:id +``` + +Parameters: + ++ `id` (required) - The ID of hook + +```json +{ +  "event_name":"project_create", +  "name":"Ruby", +  "path":"ruby", +  "project_id":1, +  "owner_name":"Someone", +  "owner_email":"example@gitlabhq.com" +} +``` + +## 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 +``` + +Parameters: + ++ `id` (required) - The ID of hook | 
