diff options
author | Achilleas Pipinellis <axilleas@axilleas.me> | 2016-02-02 15:22:51 +0300 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2016-02-19 15:18:46 +0300 |
commit | cd62c7470019a88cfda7c2d54a14eaf8db21e9d5 (patch) | |
tree | c9fd0964fab43952e6d50d1e034099ededcf8178 /doc/api/runners.md | |
parent | 1532d28c69ec77b7f1271a8ad2fa71937b47ab0d (diff) |
Add `Example response` above each json output
[ci skip]
Diffstat (limited to 'doc/api/runners.md')
-rw-r--r-- | doc/api/runners.md | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/doc/api/runners.md b/doc/api/runners.md index e0e3d35535c..23486de3726 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -8,7 +8,7 @@ Get a list of runners. GET /runners ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-----------|---------|----------|---------------------| | `scope` | string | no | The scope of runners to show, one of: `specific`, `shared`, `active`, `paused`, `online`; showing all runners if none provided | @@ -16,6 +16,8 @@ GET /runners curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners" ``` +Example response: + ```json [ { @@ -43,7 +45,7 @@ Get details of a runner. GET /runners/:id ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-----------|---------|----------|---------------------| | `id` | integer | yes | The ID of a runner | @@ -51,6 +53,8 @@ GET /runners/:id curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" ``` +Example response: + ```json { "active": true, @@ -78,7 +82,7 @@ Update details of a runner. PUT /runners/:id ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |---------------|---------|----------|---------------------| | `id` | integer | yes | The ID of a runner | | `description` | string | no | The description of a runner | @@ -89,6 +93,8 @@ PUT /runners/:id curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" -F "description=test-1-20150125-test" -F "tag_list=ruby,mysql,tag1,tag2" ``` +Example response: + ```json { "active": true, @@ -118,7 +124,7 @@ Remove a runner. DELETE /runners/:id ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-----------|---------|----------|---------------------| | `id` | integer | yes | The ID of a runner | @@ -126,6 +132,8 @@ DELETE /runners/:id curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" ``` +Example response: + ```json { "active": true, @@ -151,7 +159,7 @@ is defined **and** shared runners usage is enabled in project's settings. GET /projects/:id/runners ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-----------|---------|----------|---------------------| | `id` | integer | yes | The ID of a project | @@ -159,6 +167,8 @@ GET /projects/:id/runners curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners" ``` +Example response: + ```json [ { @@ -186,7 +196,7 @@ Enable available specific runner in project. PUT /projects/:id/runners/:runner_id ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-------------|---------|----------|---------------------| | `id` | integer | yes | The ID of a project | | `runner_id` | integer | yes | The ID of a runner | @@ -195,6 +205,8 @@ PUT /projects/:id/runners/:runner_id curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9" ``` +Example response: + ```json { "active": true, @@ -214,7 +226,7 @@ specified runner. If so, then an error is returned and user should use the [remo PUT /projects/:id/runners/:runner_id ``` -| Attribute | Type | required | Description | +| Attribute | Type | Required | Description | |-------------|---------|----------|---------------------| | `id` | integer | yes | The ID of a project | | `runner_id` | integer | yes | The ID of a runner | @@ -223,6 +235,8 @@ PUT /projects/:id/runners/:runner_id curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9" ``` +Example response: + ```json { "active": true, |