Event Rules API
Create rules that automatically trigger actions when platform events occur.
List Event Rules
[
{
"id": "rule_a1b2c3d4",
"name": "notify-on-failure",
"event": "app.deploy.failed",
"action": "webhook",
"action_config": {
"url": "https://slack.com/api/webhook/..."
},
"enabled": true,
"created_at": "2024-01-15T10:30:00Z"
}
]
Create an Event Rule
Action to perform: webhook, email, or pipeline
Configuration for the action
{
"name": "auto-scale-on-high-cpu",
"event": "droplet.metrics.cpu_high",
"action": "webhook",
"action_config": {
"url": "https://example.com/auto-scale"
}
}
Available Events
All webhook events can be used as triggers for event rules.