Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Scheduling Pipeline using API getting error

gaurav pant
Contributor
July 23, 2020 edited

Request:-

 

curl -X POST -is -u UID:PWD \
-H 'Content-Type: application/json' \
https://api.bitbucket.org/2.0/repositories/test/REPO1/pipelines_config/schedules/ \
-d '
{
"uuid": "f71d6da2-88b8-471c-b0e3-f03b9d881dc0",
"enabled": "true",
"target": {
"ref_type": "branch",
"type": "pipeline_ref_target",
"ref_name": "sonar"
},
"selector": {
"type": "custom",
"pattern": "sonar"
},
"cron_pattern": "15 * * * *"
}'

 

Getting 500 error:-

 

{"code": 500, "message": "There was an error processing your request. It has been logged (ID dc52f8890d3b9350)."}

 

 @Daniel Santos Can you please check this once?

1 answer

1 accepted

0 votes
Answer accepted
gaurav pant
Contributor
July 23, 2020 edited

Works fine by replacing te json payload by below:-

{
"type":"pipeline_schedule",
"uuid":"{714a83a6-9064-495e-97ce-db28e3848a87}",
"enabled":true,
"target":{
"type":"pipeline_ref_target",
"ref_type":"branch",
"ref_name":"test",
"selector":{
"type":"custom",
"pattern":"sonar"
}
},
"cron_pattern":"15 * * * * ? *",
"created_on":"2020-07-23T15:17:10.661Z",
"updated_on":"2020-07-23T16:32:11.13Z"
}

Suggest an answer

Log in or Sign up to answer
TAGS
loom essentials certification, loom training, get certified in loom, atlassian certification, loom async video, video messaging skills, atlassian learning, loom for teams, online certification, loom badge, loom for business, atlassian education

Get Certified in Loom! 🧑‍🎓

Time to up your Loom game! The new Loom Essentials Certification is here! Show off your skills, learn pro tips, and get officially recognized. Perfect for taking your video messaging to the next level.

Learn more
AUG Leaders

Atlassian Community Events