Commit 633ac134 authored by Tomasz Maczukin's avatar Tomasz Maczukin

Modify triggers API documentation style [ci skip]

parent d44653da
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
- [Namespaces](namespaces.md) - [Namespaces](namespaces.md)
- [Settings](settings.md) - [Settings](settings.md)
- [Keys](keys.md) - [Keys](keys.md)
- [Triggers](triggers.md) - [Build triggers](build_triggers.md)
## Clients ## Clients
......
# Triggers # Build triggers
## List project triggers ## List project triggers
...@@ -8,9 +8,19 @@ Get a list of project triggers ...@@ -8,9 +8,19 @@ Get a list of project triggers
GET /projects/:id/triggers GET /projects/:id/triggers
``` ```
Parameters: ### Parameters
- `id` (required) - The ID of a project | Attribute | Type | required | Description |
|-----------|---------|----------|---------------------|
| id | integer | yes | The ID of a project |
### Example of request
```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
```
### Example of response
```json ```json
[ [
...@@ -39,10 +49,20 @@ Get details of trigger of a project ...@@ -39,10 +49,20 @@ Get details of trigger of a project
GET /projects/:id/triggers/:token GET /projects/:id/triggers/:token
``` ```
Parameters: ### Parameters
| Attribute | Type | required | Description |
|-----------|---------|----------|--------------------------|
| id | integer | yes | The ID of a project |
| token | string | yes | The `token` of a project |
### Example of request
```
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"
```
- `id` (required) - The ID of a project ### Example of response
- `token` (required) - The `token` of a trigger
```json ```json
{ {
...@@ -62,9 +82,19 @@ Create a trigger for a project ...@@ -62,9 +82,19 @@ Create a trigger for a project
POST /projects/:id/triggers POST /projects/:id/triggers
``` ```
Parameters: ### Parameters
- `id` (required) - The ID of a project | Attribute | Type | required | Description |
|-----------|---------|----------|--------------------------|
| id | integer | yes | The ID of a project |
### Example of request
```
curl -X POST -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers"
```
### Example of response
```json ```json
{ {
...@@ -84,7 +114,15 @@ Remove a trigger of a project ...@@ -84,7 +114,15 @@ Remove a trigger of a project
DELETE /projects/:id/triggers/:token DELETE /projects/:id/triggers/:token
``` ```
Parameters: ### Parameters
- `id` (required) - The ID of a project | Attribute | Type | required | Description |
- `token` (required) - The `token` of a trigger |-----------|---------|----------|--------------------------|
| id | integer | yes | The ID of a project |
| token | string | yes | The `token` of a project |
### Example of request
```
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/projects/1/triggers/7b9148c158980bbd9bcea92c17522d"
```
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