BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
16f18227
Commit
16f18227
authored
Mar 19, 2014
by
Sytse Sijbrandij
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6535 from docwhat/sys-hooks-eols
Switched line endings to LF for system_hooks.md
parents
492dc82c
901976d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
70 additions
and
70 deletions
+70
-70
system_hooks.md
doc/api/system_hooks.md
+70
-70
No files found.
doc/api/system_hooks.md
View file @
16f18227
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment