diff options
Diffstat (limited to 'doc/api/pipelines.md')
-rw-r--r-- | doc/api/pipelines.md | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/doc/api/pipelines.md b/doc/api/pipelines.md index a3835045e5c..67d9348ba92 100644 --- a/doc/api/pipelines.md +++ b/doc/api/pipelines.md @@ -4,7 +4,7 @@ > [Introduced][ce-5837] in GitLab 8.11 -``` +```plaintext GET /projects/:id/pipelines ``` @@ -23,7 +23,7 @@ GET /projects/:id/pipelines | `order_by`| string | no | Order pipelines by `id`, `status`, `ref`, `updated_at` or `user_id` (default: `id`) | | `sort` | string | no | Sort pipelines in `asc` or `desc` order (default: `desc`) | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines" ``` @@ -56,7 +56,7 @@ Example of response > [Introduced][ce-5837] in GitLab 8.11 -``` +```plaintext GET /projects/:id/pipelines/:pipeline_id ``` @@ -65,7 +65,7 @@ GET /projects/:id/pipelines/:pipeline_id | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_id` | integer | yes | The ID of a pipeline | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46" ``` @@ -101,7 +101,7 @@ Example of response ### Get variables of a pipeline -``` +```plaintext GET /projects/:id/pipelines/:pipeline_id/variables ``` @@ -110,7 +110,7 @@ GET /projects/:id/pipelines/:pipeline_id/variables | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_id` | integer | yes | The ID of a pipeline | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/variables" ``` @@ -134,7 +134,7 @@ Example of response > [Introduced][ce-7209] in GitLab 8.14 -``` +```plaintext POST /projects/:id/pipeline ``` @@ -144,7 +144,7 @@ POST /projects/:id/pipeline | `ref` | string | yes | Reference to commit | | `variables` | array | no | An array containing the variables available in the pipeline, matching the structure `[{ 'key' => 'UPLOAD_TO_S3', 'variable_type' => 'file', 'value' => 'true' }]` | -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipeline?ref=master" ``` @@ -182,7 +182,7 @@ Example of response > [Introduced][ce-5837] in GitLab 8.11 -``` +```plaintext POST /projects/:id/pipelines/:pipeline_id/retry ``` @@ -191,7 +191,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_id` | integer | yes | The ID of a pipeline | -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/retry" ``` @@ -229,7 +229,7 @@ Response: > [Introduced][ce-5837] in GitLab 8.11 -``` +```plaintext POST /projects/:id/pipelines/:pipeline_id/cancel ``` @@ -238,7 +238,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_id` | integer | yes | The ID of a pipeline | -``` +```shell curl --request POST --header "PRIVATE-TOKEN: <your_access_token>" "https://gitlab.example.com/api/v4/projects/1/pipelines/46/cancel" ``` @@ -276,7 +276,7 @@ Response: > [Introduced](https://gitlab.com/gitlab-org/gitlab-foss/-/merge_requests/22988) in GitLab 11.6. -``` +```plaintext DELETE /projects/:id/pipelines/:pipeline_id ``` @@ -285,7 +285,7 @@ DELETE /projects/:id/pipelines/:pipeline_id | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_id` | integer | yes | The ID of a pipeline | -``` +```shell curl --header "PRIVATE-TOKEN: <your_access_token>" --request "DELETE" "https://gitlab.example.com/api/v4/projects/1/pipelines/46" ``` |