v1
latestOpenAPI 3.0.22026-07-144652931.4 MBRulesets
Create a Ruleset
Create a new Ruleset.
<!-- theme: warning -->End-of-life
Rulesets and Event Rules will end-of-life soon. We highly recommend that you migrate to Event Orchestration as soon as possible so you can take advantage of the new functionality, such as improved UI, rule creation, APIs and Terraform support, advanced conditions, and rule nesting.
Rulesets allow you to route events to an endpoint and create collections of Event Rules, which define sets of actions to take based on event content.
For more information see the API Concepts Document
Scoped OAuth requires: event_rules.write
post/rulesets
Headers
Acceptstring required
The Accept header is used as a versioning header.
Content-Type'application/json' required
Request body
Example request
{
"ruleset": {
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
}Response
The Ruleset that was created.
Example response
{
"ruleset": {
"id": "0e84de00-9511-4380-9f4f-a7b568bb49a0",
"name": "MySQL Clusters",
"type": "global",
"routing_keys": [
"R0212P1QXGEIQE2NMTQ7L7WXD00DWHIN"
],
"self": "https://api.pagerduty.com/rulesets/0e84de00-9511-4380-9f4f-a7b568bb49a0",
"created_at": "2019-12-24T21:18:52Z",
"creator": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"updated_at": "2019-12-25T14:54:23Z",
"updater": {
"type": "user_reference",
"self": "https://api.pagerduty.com/users/PABO808",
"id": "PABO808"
},
"team": {
"type": "team_reference",
"self": "https://api.pagerduty.com/teams/P3ZQXDF",
"id": "P3ZQXDF"
}
}
}