Skip to main content

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

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


As of February 2025, PagerDuty provides API access for managing Service Orchestration Rules through its REST API. This functionality allows you to programmatically create, update, and delete orchestration rules associated with specific services, enabling better automation and integration within your workflows.

To interact with Service Orchestration Rules via the API, you can utilize the following endpoints:

  • Create a Service Orchestration Rule: POST /services/{id}/rules
  • Update a Service Orchestration Rule: PUT /services/{id}/rules/{rule_id}
  • Delete a Service Orchestration Rule: DELETE /services/{id}/rules/{rule_id}

For detailed information on the request and response structures, required parameters, and examples, please refer to PagerDuty's REST API documentation.

Additionally, if you're looking to migrate existing Service Event Rules to Service Orchestration Rules, PagerDuty offers guidance on this process. The migration can be performed via the REST API or through the PagerDuty web interface. For comprehensive instructions and best practices on migrating to Event Orchestration, consult the Migrate to Event Orchestration guide.

By leveraging these API capabilities, you can effectively manage your Service Orchestration Rules, ensuring your incident response processes are both efficient and scalable.

For a seamless transition from Service Event Rules to Service Orchestration Rules, PagerDuty provides a Migration Guide.

If you're looking for expert developers to integrate such automation into your app, consider hire flutter developers to build scalable and efficient solutions tailored to your business needs.


Reply