Ask Your Question

How to stop jobs from RestAPI for one label

asked 2020-03-04 10:37:02 -0600

anonymous user


Hi Guys,

A quick question can we stop jobs that are active under one label? let say 2 SDC has a label prod and we wanted to stop jobs in both SDC using rest api can we do that? if so please guide.

We are using control hub 3.12

Thank you.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-04 19:10:43 -0600

metadaddy gravatar image

You can do this, but you have to do it in two steps - retrieve the pipelines that match the label, then stop the jobs. This answer has sample code to do something very similar - you should be able to adapt it to your situation.

edit flag offensive delete link more


Thank You it's helpful!

strem_dev gravatar imagestrem_dev ( 2020-03-05 11:21:34 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-03-04 10:37:02 -0600

Seen: 83 times

Last updated: Mar 04 '20