summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2016-01-14 11:08:33 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2016-01-14 11:08:45 +0100
commitc5b429f099d8b6b71225a96f111d65c97f15d2a8 (patch)
tree65acd45cad54f3a17157ce8f2978c3f0c01c527d
parentd8359a4f6ec7b4d2927c5878360314024c4e0761 (diff)
downloadgitlab-ce-c5b429f099d8b6b71225a96f111d65c97f15d2a8.tar.gz
Add mofications to triggers API documentation [ci skip]
-rw-r--r--doc/api/build_triggers.md44
1 files changed, 12 insertions, 32 deletions
diff --git a/doc/api/build_triggers.md b/doc/api/build_triggers.md
index 14f7e3534bd..4a12e962b62 100644
--- a/doc/api/build_triggers.md
+++ b/doc/api/build_triggers.md
@@ -1,27 +1,23 @@
# Build triggers
+You can read more about [triggering builds through the API](../ci/triggers/README.md).
+
## List project triggers
-Get a list of project triggers
+Get a list of project's build triggers.
```
GET /projects/:id/triggers
```
-### Parameters
-
| Attribute | Type | required | Description |
|-----------|---------|----------|---------------------|
-| id | integer | yes | The ID of a project |
-
-### Example of request
+| `id` | integer | yes | The ID of a project |
```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
```
-### Example of response
-
```json
[
{
@@ -43,27 +39,21 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3
## Get trigger details
-Get details of trigger of a project
+Get details of project's build trigger.
```
GET /projects/:id/triggers/:token
```
-### Parameters
-
| Attribute | Type | required | Description |
|-----------|---------|----------|--------------------------|
-| id | integer | yes | The ID of a project |
-| token | string | yes | The `token` of a project |
-
-### Example of request
+| `id` | integer | yes | The ID of a project |
+| `token` | string | yes | The `token` of a trigger |
```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"
```
-### Example of response
-
```json
{
"created_at": "2015-12-23T16:25:56.760Z",
@@ -76,26 +66,20 @@ curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3
## Create a project trigger
-Create a trigger for a project
+Create a build trigger for a project.
```
POST /projects/:id/triggers
```
-### Parameters
-
| Attribute | Type | required | Description |
|-----------|---------|----------|--------------------------|
-| id | integer | yes | The ID of a project |
-
-### Example of request
+| `id` | integer | yes | The ID of a project |
```
curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
```
-### Example of response
-
```json
{
"created_at": "2016-01-07T09:53:58.235Z",
@@ -108,20 +92,16 @@ curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.co
## Remove a project trigger
-Remove a trigger of a project
+Remove a project's build trigger.
```
DELETE /projects/:id/triggers/:token
```
-### Parameters
-
| Attribute | Type | required | Description |
|-----------|---------|----------|--------------------------|
-| id | integer | yes | The ID of a project |
-| token | string | yes | The `token` of a project |
-
-### Example of request
+| `id` | integer | yes | The ID of a project |
+| `token` | string | yes | The `token` of a project |
```
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"