Give the following request:
curl -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type": "pipeline_schedule",
"enabled": false,
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "master",
"selector": {
"type": "custom",
"pattern": "<my-branch-name>"
}
},
"cron_pattern": "0 0 0 1 * ? *"
}' -u "${BITBUCKET_USERNAME}:${APP_PASSWORD}" 'https://api.bitbucket.org/2.0/repositories/<workspace>/<slug>/pipelines_config/schedules/'I would expect the new schedule to be disabled ("enabled": false). It, however, creates a schedule which is enabled. See the following response:
{
"type": "pipeline_schedule",
"uuid": "{cb5016c2-d127-4469-bc56-c19e6f328829}",
"enabled": true,
"target": {
"type": "pipeline_ref_target",
"ref_type": "branch",
"ref_name": "master",
"selector": {
"type": "custom",
"pattern": "<my-branch-name>"
}
},
"cron_pattern": "0 0 0 1 * ? *"
"created_on": "2022-11-29T10:52:01.984438Z",
"updated_on": "2022-11-29T10:52:01.984438Z"
}