Commit cd62c747 authored by Achilleas Pipinellis's avatar Achilleas Pipinellis Committed by Tomasz Maczukin

Add `Example response` above each json output

[ci skip]
parent 1532d28c
...@@ -8,7 +8,7 @@ Get a list of runners. ...@@ -8,7 +8,7 @@ Get a list of runners.
GET /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 | | `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 ...@@ -16,6 +16,8 @@ GET /runners
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners" curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners"
``` ```
Example response:
```json ```json
[ [
{ {
...@@ -43,7 +45,7 @@ Get details of a runner. ...@@ -43,7 +45,7 @@ Get details of a runner.
GET /runners/:id GET /runners/:id
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
...@@ -51,6 +53,8 @@ GET /runners/:id ...@@ -51,6 +53,8 @@ GET /runners/:id
curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" curl -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6"
``` ```
Example response:
```json ```json
{ {
"active": true, "active": true,
...@@ -78,7 +82,7 @@ Update details of a runner. ...@@ -78,7 +82,7 @@ Update details of a runner.
PUT /runners/:id PUT /runners/:id
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|---------------|---------|----------|---------------------| |---------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
| `description` | string | no | The description of a runner | | `description` | string | no | The description of a runner |
...@@ -89,6 +93,8 @@ PUT /runners/:id ...@@ -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" 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 ```json
{ {
"active": true, "active": true,
...@@ -118,7 +124,7 @@ Remove a runner. ...@@ -118,7 +124,7 @@ Remove a runner.
DELETE /runners/:id DELETE /runners/:id
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a runner | | `id` | integer | yes | The ID of a runner |
...@@ -126,6 +132,8 @@ DELETE /runners/:id ...@@ -126,6 +132,8 @@ DELETE /runners/:id
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6" curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/runners/6"
``` ```
Example response:
```json ```json
{ {
"active": true, "active": true,
...@@ -151,7 +159,7 @@ is defined **and** shared runners usage is enabled in project's settings. ...@@ -151,7 +159,7 @@ is defined **and** shared runners usage is enabled in project's settings.
GET /projects/:id/runners GET /projects/:id/runners
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
...@@ -159,6 +167,8 @@ GET /projects/:id/runners ...@@ -159,6 +167,8 @@ GET /projects/:id/runners
curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners" curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners"
``` ```
Example response:
```json ```json
[ [
{ {
...@@ -186,7 +196,7 @@ Enable available specific runner in project. ...@@ -186,7 +196,7 @@ Enable available specific runner in project.
PUT /projects/:id/runners/:runner_id PUT /projects/:id/runners/:runner_id
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------| |-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
| `runner_id` | integer | yes | The ID of a runner | | `runner_id` | integer | yes | The ID of a runner |
...@@ -195,6 +205,8 @@ PUT /projects/:id/runners/:runner_id ...@@ -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" curl -X PUT -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9"
``` ```
Example response:
```json ```json
{ {
"active": true, "active": true,
...@@ -214,7 +226,7 @@ specified runner. If so, then an error is returned and user should use the [remo ...@@ -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 PUT /projects/:id/runners/:runner_id
``` ```
| Attribute | Type | required | Description | | Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------| |-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID of a project |
| `runner_id` | integer | yes | The ID of a runner | | `runner_id` | integer | yes | The ID of a runner |
...@@ -223,6 +235,8 @@ PUT /projects/:id/runners/:runner_id ...@@ -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" curl -X DELETE -H "PRIVATE_TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v3/project/9/runners/9"
``` ```
Example response:
```json ```json
{ {
"active": true, "active": true,
......
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