From 359b17611dbbfec8881319f29b81cf8f1c7bf06e Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Sat, 13 May 2017 01:37:01 +0900 Subject: Add doc --- doc/api/pipeline_schedules.md | 253 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 doc/api/pipeline_schedules.md (limited to 'doc/api/pipeline_schedules.md') diff --git a/doc/api/pipeline_schedules.md b/doc/api/pipeline_schedules.md new file mode 100644 index 00000000000..60b968822d8 --- /dev/null +++ b/doc/api/pipeline_schedules.md @@ -0,0 +1,253 @@ +# Pipeline schedules + +You can read more about [pipeline schedules](../ci/pipeline_schedules.md). + +## List Pipeline schedules + +Get a list of pipeline schedules. + +``` +GET /projects/:id/pipeline_schedules +``` + +| Attribute | Type | required | Description | +|-----------|---------|----------|---------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | + +``` +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules" +``` + +```json +[ + { + "id": 11, + "description": "Acceptance Test", + "ref": "master", + "cron": "0 4 * * *", + "cron_timezone": "America/Los_Angeles", + "next_run_at": "2017-05-13T11:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:10:34.497Z", + "updated_at": "2017-05-12T13:10:34.497Z", + "deleted_at": null, + "owner": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/root" + } + } +] +``` + +## Single pipeline schedule + +Get a single pipeline schedule. + +``` +GET /projects/:id/pipeline_schedules/:pipeline_schedule_id +``` + +| Attribute | Type | required | Description | +|--------------|---------|----------|--------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `pipeline_schedule_id` | integer | yes | The pipeline schedule id | + +``` +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +``` + +```json +{ + "id": 11, + "description": "Acceptance Test", + "ref": "master", + "cron": "0 4 * * *", + "cron_timezone": "America/Los_Angeles", + "next_run_at": "2017-05-13T11:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:10:34.497Z", + "updated_at": "2017-05-12T13:10:34.497Z", + "deleted_at": null, + "owner": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/root" + } +} +``` + +## New pipeline schedule + +Creates a new pipeline schedule. + +``` +POST /projects/:id/pipeline_schedules +``` + +| Attribute | Type | required | Description | +|---------------|---------|----------|--------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `description` | string | yes | The description of pipeline schedule | +| `ref` | string | yes | The branch/tag name will be triggered | +| `cron ` | string | yes | The cron (e.g. `0 1 * * *`) ([Cron syntax](https://en.wikipedia.org/wiki/Cron)) | +| `cron_timezone ` | string | yes | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) or `TZInfo::Timezone` (e.g. `America/Los_Angeles`) | +| `active ` | boolean | yes | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | + +``` +curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules" +``` + +```json +{ + "id": 12, + "description": "Build packages", + "ref": "master", + "cron": "0 1 * * 5", + "cron_timezone": "UTC", + "next_run_at": "2017-05-19T01:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:18:58.879Z", + "updated_at": "2017-05-12T13:18:58.879Z", + "deleted_at": null, + "owner": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/root" + } +} +``` + +## Edit pipeline schedule + +Updates an existing pipeline schedule. Once the update is done, it will be rescheduled automatically. + +``` +PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id +``` + +| Attribute | Type | required | Description | +|---------------|---------|----------|--------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `pipeline_schedule_id` | integer | yes | The pipeline schedule id | +| `description` | string | no | The description of pipeline schedule | +| `ref` | string | no | The branch/tag name will be triggered | +| `cron ` | string | no | The cron (e.g. `0 1 * * *`) ([Cron syntax](https://en.wikipedia.org/wiki/Cron)) | +| `cron_timezone ` | string | no | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) or `TZInfo::Timezone` (e.g. `America/Los_Angeles`) | +| `active ` | boolean | no | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | + +``` +curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 2 * * *" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +``` + +```json +{ + "id": 11, + "description": "Acceptance Test", + "ref": "master", + "cron": "0 2 * * *", + "cron_timezone": "America/Los_Angeles", + "next_run_at": "2017-05-13T09:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:10:34.497Z", + "updated_at": "2017-05-12T13:22:07.798Z", + "deleted_at": null, + "owner": { + "name": "Administrator", + "username": "root", + "id": 1, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/root" + } +} +``` + +## Take ownership of a pipeline schedule + +Update an owner of a pipeline schedule. + +``` +POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership +``` + +| Attribute | Type | required | Description | +|---------------|---------|----------|--------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `pipeline_schedule_id` | integer | yes | The pipeline schedule id | + +``` +curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11/take_ownership" +``` + +```json +{ + "id": 11, + "description": "Acceptance Test", + "ref": "master", + "cron": "0 2 * * *", + "cron_timezone": "America/Los_Angeles", + "next_run_at": "2017-05-13T09:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:10:34.497Z", + "updated_at": "2017-05-12T13:26:12.191Z", + "deleted_at": null, + "owner": { + "name": "shinya", + "username": "maeda", + "id": 50, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/maeda" + } +} +``` + +## Delete a pipeline schedule + +Delete a pipeline schedule. + +``` +DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id +``` + +| Attribute | Type | required | Description | +|----------------|---------|----------|--------------------------| +| `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `pipeline_schedule_id` | integer | yes | The pipeline schedule id | + +``` +curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +``` + +```json +{ + "id": 11, + "description": "Acceptance Test", + "ref": "master", + "cron": "0 2 * * *", + "cron_timezone": "America/Los_Angeles", + "next_run_at": "2017-05-13T09:00:00.000Z", + "active": true, + "created_at": "2017-05-12T13:10:34.497Z", + "updated_at": "2017-05-12T13:26:12.191Z", + "deleted_at": "2017-05-12T13:27:38.529Z", + "owner": { + "name": "shinya", + "username": "maeda", + "id": 50, + "state": "active", + "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", + "web_url": "http://192.168.10.5:3000/maeda" + } +} +``` -- cgit v1.2.1 From 0b2fd147eca68911342003333dd2d0daa558627b Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Fri, 19 May 2017 22:48:36 +0900 Subject: Update doc with latest entity --- doc/api/pipeline_schedules.md | 115 ++++++++++++++++++++++++------------------ 1 file changed, 67 insertions(+), 48 deletions(-) (limited to 'doc/api/pipeline_schedules.md') diff --git a/doc/api/pipeline_schedules.md b/doc/api/pipeline_schedules.md index 60b968822d8..439d92eff98 100644 --- a/doc/api/pipeline_schedules.md +++ b/doc/api/pipeline_schedules.md @@ -15,22 +15,21 @@ GET /projects/:id/pipeline_schedules | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | ``` -curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules" +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules" ``` ```json [ { - "id": 11, - "description": "Acceptance Test", + "id": 13, + "description": "Test schedule pipeline", "ref": "master", - "cron": "0 4 * * *", - "cron_timezone": "America/Los_Angeles", - "next_run_at": "2017-05-13T11:00:00.000Z", + "cron": "* * * * *", + "cron_timezone": "Asia/Tokyo", + "next_run_at": "2017-05-19T13:41:00.000Z", "active": true, - "created_at": "2017-05-12T13:10:34.497Z", - "updated_at": "2017-05-12T13:10:34.497Z", - "deleted_at": null, + "created_at": "2017-05-19T13:31:08.849Z", + "updated_at": "2017-05-19T13:40:17.727Z", "owner": { "name": "Administrator", "username": "root", @@ -57,21 +56,26 @@ GET /projects/:id/pipeline_schedules/:pipeline_schedule_id | `pipeline_schedule_id` | integer | yes | The pipeline schedule id | ``` -curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" ``` ```json { - "id": 11, - "description": "Acceptance Test", + "id": 13, + "description": "Test schedule pipeline", "ref": "master", - "cron": "0 4 * * *", - "cron_timezone": "America/Los_Angeles", - "next_run_at": "2017-05-13T11:00:00.000Z", + "cron": "* * * * *", + "cron_timezone": "Asia/Tokyo", + "next_run_at": "2017-05-19T13:41:00.000Z", "active": true, - "created_at": "2017-05-12T13:10:34.497Z", - "updated_at": "2017-05-12T13:10:34.497Z", - "deleted_at": null, + "created_at": "2017-05-19T13:31:08.849Z", + "updated_at": "2017-05-19T13:40:17.727Z", + "last_pipeline": { + "id": 332, + "sha": "0e788619d0b5ec17388dffb973ecd505946156db", + "ref": "master", + "status": "pending" + }, "owner": { "name": "Administrator", "username": "root", @@ -101,21 +105,21 @@ POST /projects/:id/pipeline_schedules | `active ` | boolean | yes | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | ``` -curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules" +curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules" ``` ```json { - "id": 12, + "id": 14, "description": "Build packages", "ref": "master", "cron": "0 1 * * 5", "cron_timezone": "UTC", - "next_run_at": "2017-05-19T01:00:00.000Z", + "next_run_at": "2017-05-26T01:00:00.000Z", "active": true, - "created_at": "2017-05-12T13:18:58.879Z", - "updated_at": "2017-05-12T13:18:58.879Z", - "deleted_at": null, + "created_at": "2017-05-19T13:43:08.169Z", + "updated_at": "2017-05-19T13:43:08.169Z", + "last_pipeline": null, "owner": { "name": "Administrator", "username": "root", @@ -146,21 +150,26 @@ PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id | `active ` | boolean | no | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | ``` -curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 2 * * *" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 2 * * *" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" ``` ```json { - "id": 11, - "description": "Acceptance Test", + "id": 13, + "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", - "cron_timezone": "America/Los_Angeles", - "next_run_at": "2017-05-13T09:00:00.000Z", + "cron_timezone": "Asia/Tokyo", + "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, - "created_at": "2017-05-12T13:10:34.497Z", - "updated_at": "2017-05-12T13:22:07.798Z", - "deleted_at": null, + "created_at": "2017-05-19T13:31:08.849Z", + "updated_at": "2017-05-19T13:44:16.135Z", + "last_pipeline": { + "id": 332, + "sha": "0e788619d0b5ec17388dffb973ecd505946156db", + "ref": "master", + "status": "pending" + }, "owner": { "name": "Administrator", "username": "root", @@ -186,21 +195,26 @@ POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership | `pipeline_schedule_id` | integer | yes | The pipeline schedule id | ``` -curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11/take_ownership" +curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13/take_ownership" ``` ```json { - "id": 11, - "description": "Acceptance Test", + "id": 13, + "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", - "cron_timezone": "America/Los_Angeles", - "next_run_at": "2017-05-13T09:00:00.000Z", + "cron_timezone": "Asia/Tokyo", + "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, - "created_at": "2017-05-12T13:10:34.497Z", - "updated_at": "2017-05-12T13:26:12.191Z", - "deleted_at": null, + "created_at": "2017-05-19T13:31:08.849Z", + "updated_at": "2017-05-19T13:46:37.468Z", + "last_pipeline": { + "id": 332, + "sha": "0e788619d0b5ec17388dffb973ecd505946156db", + "ref": "master", + "status": "pending" + }, "owner": { "name": "shinya", "username": "maeda", @@ -226,21 +240,26 @@ DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id | `pipeline_schedule_id` | integer | yes | The pipeline schedule id | ``` -curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/28/pipeline_schedules/11" +curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" ``` ```json { - "id": 11, - "description": "Acceptance Test", + "id": 13, + "description": "Test schedule pipeline", "ref": "master", "cron": "0 2 * * *", - "cron_timezone": "America/Los_Angeles", - "next_run_at": "2017-05-13T09:00:00.000Z", + "cron_timezone": "Asia/Tokyo", + "next_run_at": "2017-05-19T17:00:00.000Z", "active": true, - "created_at": "2017-05-12T13:10:34.497Z", - "updated_at": "2017-05-12T13:26:12.191Z", - "deleted_at": "2017-05-12T13:27:38.529Z", + "created_at": "2017-05-19T13:31:08.849Z", + "updated_at": "2017-05-19T13:46:37.468Z", + "last_pipeline": { + "id": 332, + "sha": "0e788619d0b5ec17388dffb973ecd505946156db", + "ref": "master", + "status": "pending" + }, "owner": { "name": "shinya", "username": "maeda", -- cgit v1.2.1 From 20c26eaf9371dcc89cd3a403f79882e6c2dbf6ec Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Mon, 22 May 2017 15:52:08 +0900 Subject: FIx doc lint --- doc/api/pipeline_schedules.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc/api/pipeline_schedules.md') diff --git a/doc/api/pipeline_schedules.md b/doc/api/pipeline_schedules.md index 439d92eff98..a8b5f5228f1 100644 --- a/doc/api/pipeline_schedules.md +++ b/doc/api/pipeline_schedules.md @@ -1,6 +1,6 @@ # Pipeline schedules -You can read more about [pipeline schedules](../ci/pipeline_schedules.md). +You can read more about [pipeline schedules](../user/project/pipelines/schedules.md). ## List Pipeline schedules -- cgit v1.2.1 From c91292b61f80626b91d41cc17d0a662f302d6ecd Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Wed, 24 May 2017 19:25:13 +0900 Subject: Improve document --- doc/api/pipeline_schedules.md | 56 +++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 28 deletions(-) (limited to 'doc/api/pipeline_schedules.md') diff --git a/doc/api/pipeline_schedules.md b/doc/api/pipeline_schedules.md index a8b5f5228f1..73b4f345a62 100644 --- a/doc/api/pipeline_schedules.md +++ b/doc/api/pipeline_schedules.md @@ -2,9 +2,9 @@ You can read more about [pipeline schedules](../user/project/pipelines/schedules.md). -## List Pipeline schedules +## Get all pipeline schedules -Get a list of pipeline schedules. +Get a list of the pipeline schedules of a project. ``` GET /projects/:id/pipeline_schedules @@ -14,8 +14,8 @@ GET /projects/:id/pipeline_schedules |-----------|---------|----------|---------------------| | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | -``` -curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules" +```sh +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" ``` ```json @@ -36,15 +36,15 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/ap "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/root" + "web_url": "https://gitlab.example.com/root" } } ] ``` -## Single pipeline schedule +## Get a single pipeline schedule -Get a single pipeline schedule. +Get the pipeline schedule of a project. ``` GET /projects/:id/pipeline_schedules/:pipeline_schedule_id @@ -55,8 +55,8 @@ GET /projects/:id/pipeline_schedules/:pipeline_schedule_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_schedule_id` | integer | yes | The pipeline schedule id | -``` -curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" +```sh +curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ```json @@ -82,14 +82,14 @@ curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/ap "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/root" + "web_url": "https://gitlab.example.com/root" } } ``` -## New pipeline schedule +## Create a new pipeline schedule -Creates a new pipeline schedule. +Create a new pipeline schedule of a project. ``` POST /projects/:id/pipeline_schedules @@ -104,8 +104,8 @@ POST /projects/:id/pipeline_schedules | `cron_timezone ` | string | yes | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) or `TZInfo::Timezone` (e.g. `America/Los_Angeles`) | | `active ` | boolean | yes | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | -``` -curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules" +```sh +curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" ``` ```json @@ -126,14 +126,14 @@ curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form descri "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/root" + "web_url": "https://gitlab.example.com/root" } } ``` -## Edit pipeline schedule +## Edit a pipeline schedule -Updates an existing pipeline schedule. Once the update is done, it will be rescheduled automatically. +Updates the pipeline schedule of a project. Once the update is done, it will be rescheduled automatically. ``` PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id @@ -149,8 +149,8 @@ PUT /projects/:id/pipeline_schedules/:pipeline_schedule_id | `cron_timezone ` | string | no | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) or `TZInfo::Timezone` (e.g. `America/Los_Angeles`) | | `active ` | boolean | no | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | -``` -curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 2 * * *" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" +```sh +curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 2 * * *" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ```json @@ -176,14 +176,14 @@ curl --request PUT --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form cron="0 "id": 1, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/root" + "web_url": "https://gitlab.example.com/root" } } ``` ## Take ownership of a pipeline schedule -Update an owner of a pipeline schedule. +Update the owner of the pipeline schedule of a project. ``` POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership @@ -194,8 +194,8 @@ POST /projects/:id/pipeline_schedules/:pipeline_schedule_id/take_ownership | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | | `pipeline_schedule_id` | integer | yes | The pipeline schedule id | -``` -curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13/take_ownership" +```sh +curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13/take_ownership" ``` ```json @@ -221,14 +221,14 @@ curl --request POST --header "PRIVATE-TOKEN: hf2CvZXB9w8Uc5pZKpSB" "http://192.1 "id": 50, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/maeda" + "web_url": "https://gitlab.example.com/maeda" } } ``` ## Delete a pipeline schedule -Delete a pipeline schedule. +Delete the pipeline schedule of a project. ``` DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_id @@ -239,8 +239,8 @@ DELETE /projects/:id/pipeline_schedules/:pipeline_schedule_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_schedule_id` | integer | yes | The pipeline schedule id | -``` -curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192.168.10.5:3000/api/v4/projects/29/pipeline_schedules/13" +```sh +curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules/13" ``` ```json @@ -266,7 +266,7 @@ curl --request DELETE --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "http://192 "id": 50, "state": "active", "avatar_url": "http://www.gravatar.com/avatar/8ca0a796a679c292e3a11da50f99e801?s=80&d=identicon", - "web_url": "http://192.168.10.5:3000/maeda" + "web_url": "https://gitlab.example.com/maeda" } } ``` -- cgit v1.2.1 From 0e0e278196801cb9b42791ad4ef9707ad52c4896 Mon Sep 17 00:00:00 2001 From: Shinya Maeda Date: Mon, 29 May 2017 15:03:07 +0900 Subject: Fix document according to the new change --- doc/api/pipeline_schedules.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc/api/pipeline_schedules.md') diff --git a/doc/api/pipeline_schedules.md b/doc/api/pipeline_schedules.md index 73b4f345a62..433654c18cc 100644 --- a/doc/api/pipeline_schedules.md +++ b/doc/api/pipeline_schedules.md @@ -13,6 +13,7 @@ GET /projects/:id/pipeline_schedules | Attribute | Type | required | Description | |-----------|---------|----------|---------------------| | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user | +| `scope` | string | no | The scope of pipeline schedules, one of: `active`, `inactive` | ```sh curl --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" @@ -101,8 +102,8 @@ POST /projects/:id/pipeline_schedules | `description` | string | yes | The description of pipeline schedule | | `ref` | string | yes | The branch/tag name will be triggered | | `cron ` | string | yes | The cron (e.g. `0 1 * * *`) ([Cron syntax](https://en.wikipedia.org/wiki/Cron)) | -| `cron_timezone ` | string | yes | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) or `TZInfo::Timezone` (e.g. `America/Los_Angeles`) | -| `active ` | boolean | yes | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially. | +| `cron_timezone ` | string | no | The timezone supproted by `ActiveSupport::TimeZone` (e.g. `Pacific Time (US & Canada)`) (default: `'UTC'`) | +| `active ` | boolean | no | The activation of pipeline schedule. If false is set, the pipeline schedule will deactivated initially (default: `true`) | ```sh curl --request POST --header "PRIVATE-TOKEN: k5ESFgWY2Qf5xEvDcFxZ" --form description="Build packages" --form ref="master" --form cron="0 1 * * 5" --form cron_timezone="UTC" --form active="true" "https://gitlab.example.com/api/v4/projects/29/pipeline_schedules" -- cgit v1.2.1