diff options
Diffstat (limited to 'doc/api/runners.md')
-rw-r--r-- | doc/api/runners.md | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/doc/api/runners.md b/doc/api/runners.md index 53ca97b9e41..551a7580e54 100644 --- a/doc/api/runners.md +++ b/doc/api/runners.md @@ -31,7 +31,7 @@ GitLab and Runner are then connected. Get a list of specific runners available to the user. -``` +```plaintext GET /runners GET /runners?scope=active GET /runners?type=project_type @@ -46,7 +46,7 @@ GET /runners?tag_list=tag1,tag2 | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `tag_list` | string array | no | List of of the runner's tags | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners" ``` @@ -82,7 +82,7 @@ Example response: Get a list of all runners in the GitLab instance (specific and shared). Access is restricted to users with `admin` privileges. -``` +```plaintext GET /runners/all GET /runners/all?scope=online GET /runners/all?type=project_type @@ -97,7 +97,7 @@ GET /runners/all?tag_list=tag1,tag2 | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `tag_list` | string array | no | List of of the runner's tags | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/all" ``` @@ -152,7 +152,7 @@ Example response: Get details of a runner. -``` +```plaintext GET /runners/:id ``` @@ -160,7 +160,7 @@ GET /runners/:id |-----------|---------|----------|---------------------| | `id` | integer | yes | The ID of a runner | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" ``` @@ -204,7 +204,7 @@ Example response: Update details of a runner. -``` +```plaintext PUT /runners/:id ``` @@ -219,7 +219,7 @@ PUT /runners/:id | `access_level` | string | no | The access_level of the runner; `not_protected` or `ref_protected` | | `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job | -``` +```shell curl --request PUT --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2" ``` @@ -265,7 +265,7 @@ Example response: Remove a runner. -``` +```plaintext DELETE /runners/:id ``` @@ -273,7 +273,7 @@ DELETE /runners/:id |-----------|---------|----------|---------------------| | `id` | integer | yes | The ID of a runner | -``` +```shell curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/6" ``` @@ -283,7 +283,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git List jobs that are being processed or were processed by specified Runner. -``` +```plaintext GET /runners/:id/jobs ``` @@ -294,7 +294,7 @@ GET /runners/:id/jobs | `order_by`| string | no | Order jobs by `id`. | | `sort` | string | no | Sort jobs in `asc` or `desc` order (default: `desc`) | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/runners/1/jobs?status=running" ``` @@ -373,7 +373,7 @@ Example response: List all runners (specific and shared) available in the project. Shared runners are listed if at least one shared runner is defined. -``` +```plaintext GET /projects/:id/runners GET /projects/:id/runners?scope=active GET /projects/:id/runners?type=project_type @@ -389,7 +389,7 @@ GET /projects/:id/runners?tag_list=tag1,tag2 | `status` | string | no | The status of runners to show, one of: `active`, `paused`, `online`, `offline` | | `tag_list` | string array | no | List of of the runner's tags | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners" ``` @@ -424,7 +424,7 @@ Example response: Enable an available specific runner in the project. -``` +```plaintext POST /projects/:id/runners ``` @@ -433,7 +433,7 @@ POST /projects/:id/runners | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `runner_id` | integer | yes | The ID of a runner | -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners" --form "runner_id=9" ``` @@ -458,7 +458,7 @@ Disable a specific runner from the project. It works only if the project isn't the only project associated with the specified runner. If so, an error is returned. Use the [Remove a runner](#remove-a-runner) call instead. -``` +```plaintext DELETE /projects/:id/runners/:runner_id ``` @@ -467,7 +467,7 @@ DELETE /projects/:id/runners/:runner_id | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `runner_id` | integer | yes | The ID of a runner | -``` +```shell curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/9/runners/9" ``` @@ -475,7 +475,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: <your_access_token>" "https://git Register a new Runner for the instance. -``` +```plaintext POST /runners ``` @@ -491,7 +491,7 @@ POST /runners | `access_level` | string | no | The access_level of the runner; `not_protected` or `ref_protected` | | `maximum_timeout` | integer | no | Maximum timeout set when this Runner will handle the job | -``` +```shell curl --request POST "https://gitlab.example.com/api/v4/runners" --form "token=<registration_token>" --form "description=test-1-20150125-test" --form "tag_list=ruby,mysql,tag1,tag2" ``` @@ -514,7 +514,7 @@ Example response: Deletes a registered Runner. -``` +```plaintext DELETE /runners ``` @@ -522,7 +522,7 @@ DELETE /runners |-------------|---------|----------|---------------------| | `token` | string | yes | Runner's [authentication token](#registration-and-authentication-tokens). | -``` +```shell curl --request DELETE "https://gitlab.example.com/api/v4/runners" --form "token=<authentication_token>" ``` @@ -536,7 +536,7 @@ Response: Validates authentication credentials for a registered Runner. -``` +```plaintext POST /runners/verify ``` @@ -544,7 +544,7 @@ POST /runners/verify |-------------|---------|----------|---------------------| | `token` | string | yes | Runner's [authentication token](#registration-and-authentication-tokens). | -``` +```shell curl --request POST "https://gitlab.example.com/api/v4/runners/verify" --form "token=<authentication_token>" ``` |