API Documentation for Service Event Rules


I want to manipulate some service event rules using the API, but I can’t find any documentation on that. Can you please give some guidance?



Hey Gabriel! Thanks so much for waiting! At the moment, we currently do not offer the functionality of adding or removing event rules via API. However, I would love to gather more information on the problem you are trying to solve and pass along your feedback to our Product team. Would you mind me asking for a brief description of this need? Once I have that information, I can then submit your request to our product team here at PagerDuty.

Hi Jay,
We are using Event Rules to filter alarms that need immediate action from those that don’t.
We want to be able to keep that configuration in code, and with a script (Ruby/Python) we would use the API to configure the service on PD.
Our configuration code would be something like:

  - id: PNW9UGL
    environment: dev

  - predicate:
      type: contains
      subject: details.AlarmName
      substring: Target5XXCloudwatchAlarm
      - type: set_field
        field: severity
        value: critical


1 Like

Hey Gabriel! Thanks so much for waiting. Perfect! Let me pass this information along to our product teams for review. Let me know if you have any further questions. Have a great rest of your day Gabriel!

Hey, we would like to automate Event Rule management for our service, but based on the API Reference there is still no API for Event Rules yet. Can you please give some update on this? Thanks.

I was hoping to do the same type of automation. My plan was to use terraform to configure an individual service per application and use the new global event rules to route alerts to those services. Then, utilize service event rules to further classify the individual alerts based on that application’s behavior. Please get an API up for both global event rules and service event rules. Additionally, make sure your terraform provider is updated to support both of those. This would be super helpful in our devops automation.


Any update on the this getting in the roadmap or if it was completed?

1 Like

Hi Everyone,

we are happy to announce that our Service Event Rules API is Generally Available. You can find the CRUD Calls nested in the Services Endpoint:
Terraform support will be added soon. Check our terraform provider release notes for updates.

1 Like