Ask Your Question
1

How to stop jobs from RestAPI for one label

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

anonymous user

Anonymous

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
0

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

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

Comments

Thank You it's helpful!

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

Question Tools

1 follower

Stats

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

Seen: 40 times

Last updated: Mar 04