Use this API to interact with pipeline schedules.
List all pipeline schedules
GET /api/v4/projects/{id}/pipeline_schedules
Lists all pipeline schedules for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
scopeQuery | String | The scope of pipeline schedules Allowed values: active,inactiveExample: active |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Create a pipeline schedule
POST /api/v4/projects/{id}/pipeline_schedules
Creates a pipeline schedule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
active | Boolean | The activation of pipeline schedule Default: trueExample: true |
cronRequired | String | The cron Example: * * * * * |
cron_ | String | The timezone Default: UTCExample: Asia/ |
descriptionRequired | String | The description of pipeline schedule Example: Test schedule pipeline |
inputs | Array of objects | Inputs for the pipeline schedule |
inputs[].Required | String | The name of the input Example: deploy_ |
inputs[].Required | String or array or number or boolean | The value of the input |
refRequired | String | The branch/ Example: develop |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Retrieve a pipeline schedule
GET /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}
Retrieves a pipeline schedule for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Update a pipeline schedule
PUT /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}
Updates a pipeline schedule for a project. After the update is done, it is rescheduled automatically.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
active | Boolean | The activation of pipeline schedule Example: true |
cron | String | The cron Example: * * * * * |
cron_ | String | The timezone Example: Asia/ |
description | String | The description of pipeline schedule Example: Test schedule pipeline |
inputs | Array of objects | Inputs for the pipeline schedule |
inputs[]. | Boolean | Whether to delete the input |
inputs[].Required | String | The name of the input Example: deploy_ |
inputs[].Required | String or array or number or boolean | The value of the input |
ref | String | The branch/ Example: develop |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Delete a pipeline schedule
DELETE /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}
Deletes a pipeline schedule for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Responses
| Code | Description | Schema |
|---|---|---|
204 | No Content | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
412 | Precondition Failed | — |
List all pipelines triggered by a pipeline schedule
GET /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/pipelines
Lists all pipelines triggered by a pipeline schedule in a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pageQuery | Integer | Current page number Default: 1Example: 1 |
per_Query | Integer | Number of items per page Default: 20Example: 20 |
pipeline_Path, | Integer | The pipeline schedule ID Example: 13 |
scopeQuery | String | The scope of pipelines Allowed values: running,pending,finished,branches,tagsExample: pending |
statusQuery | String | The status of pipelines Allowed values: created,waiting_,preparing,waiting_,pending,running,success,failed,canceling,canceled,skipped,manual,scheduledExample: pending |
updated_Query | String (date- | Return pipelines updated before the specified datetime. Example: 2015- |
updated_Query | String (date- | Return pipelines updated after the specified datetime. Example: 2015- |
created_Query | String (date- | Return pipelines created before the specified datetime. Example: 2015- |
created_Query | String (date- | Return pipelines created after the specified datetime. Example: 2015- |
sortQuery | String | Sort pipelines Allowed values: asc,descDefault: ascExample: desc |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Run a pipeline schedule
POST /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/play
Runs a pipeline schedule immediately. The next scheduled run of this pipeline is not affected.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | — |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Create or update ownership of a pipeline schedule
POST /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/take_ownership
Creates or updates the owner of a pipeline schedule for a project.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Create a variable for a pipeline schedule
POST /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables
Creates a variable for a pipeline schedule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
keyRequired | String | The key of the variable Example: NEW_ |
valueRequired | String | The value of the variable Example: new value |
variable_ | String | The type of variable, Allowed values: env_,file |
Responses
| Code | Description | Schema |
|---|---|---|
201 | Created | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Retrieve a variable for a pipeline schedule
GET /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables/{key}
Retrieves a specified variable for a pipeline schedule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
keyPath, | String | The key of the variable Example: NEW_ |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Update a variable for a pipeline schedule
PUT /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables/{key}
Updates a variable for a pipeline schedule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
keyPath, | String | The key of the variable Example: NEW_ |
Request body (application/json)
| Property | Type | Description |
|---|---|---|
value | String | The value of the variable Example: new value |
variable_ | String | The type of variable, Allowed values: env_,file |
Responses
| Code | Description | Schema |
|---|---|---|
200 | OK | APIEntities |
400 | Bad request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Delete a variable for a pipeline schedule
DELETE /api/v4/projects/{id}/pipeline_schedules/{pipeline_schedule_id}/variables/{key}
Deletes a specified variable for a pipeline schedule.
Parameters
| Name | Type | Description |
|---|---|---|
idPath, | String or integer | The ID or URL- Example: 18 |
pipeline_Path, | Integer | The pipeline schedule id Example: 13 |
keyPath, | String | The key of the variable Example: NEW_ |
Responses
| Code | Description | Schema |
|---|---|---|
202 | Accepted | APIEntities |
400 | Bad Request | — |
401 | Unauthorized | — |
403 | Forbidden | — |
404 | Not found | — |
Schemas
Objects returned by the operations above and objects nested in their request bodies.
APIEntitiesCiInput
| Property | Type | Description |
|---|---|---|
name | String | — |
value | String | — |
APIEntitiesCiPipelineBasic
| Property | Type | Description |
|---|---|---|
created_ | String (date- | Example:2022- |
id | Integer (int64) | Example:1 |
iid | Integer | Example:2 |
project_ | Integer (int64) | Example:3 |
ref | String | Example:feature- |
sha | String | Example:0ec9e58fdfca6cdd6652 |
source | String | Example:push |
status | String | Example:success |
updated_ | String (date- | Example:2022- |
web_ | String | Example:https: |
APIEntitiesCiPipelineSchedule
| Property | Type | Description |
|---|---|---|
active | Boolean | Example:true |
created_ | String (date- | Example:2017- |
cron | String | Example:* * * * * |
cron_ | String | Example:Asia/ |
description | String | Example:Test schedule pipeline |
id | Integer (int64) | Example:13 |
inputs | APIEntities | — |
next_ | String (date- | Example:2017- |
owner | APIEntities | — |
ref | String | Example:develop |
updated_ | String (date- | Example:2017- |
APIEntitiesCiPipelineScheduleDetails
| Property | Type | Description |
|---|---|---|
active | Boolean | Example:true |
created_ | String (date- | Example:2017- |
cron | String | Example:* * * * * |
cron_ | String | Example:Asia/ |
description | String | Example:Test schedule pipeline |
id | Integer (int64) | Example:13 |
inputs | APIEntities | — |
last_ | APIEntities | — |
next_ | String (date- | Example:2017- |
owner | APIEntities | — |
ref | String | Example:develop |
updated_ | String (date- | Example:2017- |
variables | APIEntities | — |
APIEntitiesCiVariable
| Property | Type | Description |
|---|---|---|
description | String | Example:This variable is being used for . |
environment_ | String | Example:* |
hidden | Boolean | — |
key | String | Example:TEST_ |
masked | Boolean | — |
protected | Boolean | — |
raw | Boolean | — |
value | String | Example:TEST_ |
variable_ | String | Example:env_ |
APIEntitiesCustomAttribute
| Property | Type | Description |
|---|---|---|
key | String | Example:foo |
value | String | Example:bar |
APIEntitiesUserBasic
| Property | Type | Description |
|---|---|---|
avatar_ | String | Example:/ |
avatar_ | String | Example:https: |
custom_ | Array of APIEntities | — |
id | Integer (int64) | Example:1 |
locked | Boolean | — |
name | String | Example:Administrator |
public_ | String | Example:john@example. |
state | String | Example:active |
username | String | Example:admin |
web_ | String | Example:https: |