Skip to content

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.

id
required
One of:
string

The ID or URL-encoded path of the project

Example
18
pipeline_schedule_id
required
integer

The pipeline schedule id

Example
13
Media type application/json
object
description

The description of pipeline schedule

string
nullable
Example
Test schedule pipeline
ref

The branch/tag name will be triggered

string
nullable
Example
develop
cron

The cron

string
nullable
Example
* * * * *
cron_timezone

The timezone

string
nullable
Example
Asia/Tokyo
active

The activation of pipeline schedule

boolean
nullable
Example
true
inputs

Inputs for the pipeline schedule

Array<object>
nullable
object
name
required

The name of the input

string
nullable
Example
deploy_strategy
destroy

Whether to delete the input

boolean
nullable
value
required
One of:
string
nullable

OK

Media type application/json
object
id
integer format: int64
description
string
ref
string
cron
string
cron_timezone
string
next_run_at
string format: date-time
active
boolean
created_at
string format: date-time
updated_at
string format: date-time
owner
object
id
integer format: int64
username
string
public_email
string
name
string
state
string
locked
boolean
avatar_url
string
avatar_path
string
custom_attributes
Array<object>
object
key
string
value
string
web_url
string
inputs
object
name
string
value
string
last_pipeline
object
id
integer format: int64
iid
integer
project_id
integer format: int64
sha
string
ref
string
status
string
source
string
created_at
string format: date-time
updated_at
string format: date-time
web_url
string
variables
object
variable_type
string
key
string
value
string
hidden
boolean
protected
boolean
masked
boolean
raw
boolean
environment_scope
string
description
string
Example
{
"id": 13,
"description": "Test schedule pipeline",
"ref": "develop",
"cron": "* * * * *",
"cron_timezone": "Asia/Tokyo",
"next_run_at": "2017-05-19T13:41:00.000Z",
"active": true,
"created_at": "2017-05-19T13:31:08.849Z",
"updated_at": "2017-05-19T13:40:17.727Z",
"owner": {
"id": 1,
"username": "admin",
"public_email": "john@example.com",
"name": "Administrator",
"state": "active",
"avatar_url": "https://gravatar.com/avatar/1",
"avatar_path": "/user/avatar/28/The-Big-Lebowski-400-400.png",
"custom_attributes": [
{
"key": "foo",
"value": "bar"
}
],
"web_url": "https://gitlab.example.com/root"
},
"last_pipeline": {
"id": 1,
"iid": 2,
"project_id": 3,
"sha": "0ec9e58fdfca6cdd6652c083c9edb53abc0bad52",
"ref": "feature-branch",
"status": "success",
"source": "push",
"created_at": "2022-10-21T16:49:48.000+02:00",
"updated_at": "2022-10-21T16:49:48.000+02:00",
"web_url": "https://gitlab.example.com/gitlab-org/gitlab-foss/-/pipelines/61"
},
"variables": {
"variable_type": "env_var",
"key": "TEST_VARIABLE_1",
"value": "TEST_1",
"environment_scope": "*",
"description": "This variable is being used for ..."
}
}

Bad request

Unauthorized

Forbidden

Not found