Skip to main content
Solved

API Access for Service Orchestration Rules?

  • February 6, 2025
  • 1 reply
  • 75 views

Forum|alt.badge.img

Hello all!

We just moved our old ‘event rules’ to ‘Service Orchestration Rules’ using the API. So far, so good. 

 

However, I’d like to be able to enable / disable rules with the API, and ideally, manipulate one specific one (e.g. change from ‘event.summary matches host foo’ to ‘event.summary matches host bar’ ). 

 

The docs (https://developer.pagerduty.com/api-reference/aeaec09888036-update-the-service-orchestration-for-a-service) read like I have to send the whole enchilada and then it will figure it out by checking ‘existing’ vs what was sent in the payload. I’d rather just send ‘set "disabled": false where “id” = ABC123’ if it’s possible. 

 

Thanks in advance!

 

-dd

Best answer by mwalls

Hi ​@big.dan.dobbs 

You’re on the right track there. You do have to send the whole set back to the API to make changes. Hopefully that will change in the future, but right now the set operates as a single object.

 

It’s a bit cumbersome. I have some sample Python code to hack through it, if that helps.

 

--mandi

1 reply

mwalls
Forum|alt.badge.img
  • Community Manager
  • Answer
  • February 14, 2025

Hi ​@big.dan.dobbs 

You’re on the right track there. You do have to send the whole set back to the API to make changes. Hopefully that will change in the future, but right now the set operates as a single object.

 

It’s a bit cumbersome. I have some sample Python code to hack through it, if that helps.

 

--mandi