Commit 16f18227 authored by Sytse Sijbrandij's avatar Sytse Sijbrandij

Merge pull request #6535 from docwhat/sys-hooks-eols

Switched line endings to LF for system_hooks.md
parents 492dc82c 901976d9
All methods require admin authorization. All methods require admin authorization.
The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks). The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks).
## List system hooks ## List system hooks
Get list of system hooks Get list of system hooks
``` ```
GET /hooks GET /hooks
``` ```
Parameters: Parameters:
+ **none** + **none**
```json ```json
[ [
{ {
"id":3, "id":3,
"url":"http://example.com/hook", "url":"http://example.com/hook",
"created_at":"2013-10-02T10:15:31Z" "created_at":"2013-10-02T10:15:31Z"
} }
] ]
``` ```
## Add new system hook hook ## Add new system hook hook
``` ```
POST /hooks POST /hooks
``` ```
Parameters: Parameters:
+ `url` (required) - The hook URL + `url` (required) - The hook URL
## Test system hook ## Test system hook
``` ```
GET /hooks/:id GET /hooks/:id
``` ```
Parameters: Parameters:
+ `id` (required) - The ID of hook + `id` (required) - The ID of hook
```json ```json
{ {
"event_name":"project_create", "event_name":"project_create",
"name":"Ruby", "name":"Ruby",
"path":"ruby", "path":"ruby",
"project_id":1, "project_id":1,
"owner_name":"Someone", "owner_name":"Someone",
"owner_email":"example@gitlabhq.com" "owner_email":"example@gitlabhq.com"
} }
``` ```
## Delete system hook ## Delete system hook
Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the 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. is not available. If the hook is deleted it is also returned as JSON.
``` ```
DELETE /hooks/:id DELETE /hooks/:id
``` ```
Parameters: Parameters:
+ `id` (required) - The ID of hook + `id` (required) - The ID of hook
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment