Integrations2 min read
PagerDuty Events API v2 Emulation
Drop-in compatible PagerDuty Events API v2 endpoint for seamless tool migration.
OpsKnight provides native, drop-in compatibility with the standard PagerDuty Events API v2.
This allows you to point existing monitoring agents, Terraform providers, Prometheus AlertManager configs, or custom scripts originally designed for PagerDuty directly to OpsKnight without changing your payload schemas.
🎯 Supported Endpoints
OpsKnight accepts PagerDuty v2 events on two routes:
- Canonical Emulation URL:
POST https://your-opsknight.com/api/integrations/pagerduty/v2/enqueue - Short URL:
POST https://your-opsknight.com/api/integrations/pagerduty
🔑 Authentication & Routing
OpsKnight supports all standard PagerDuty routing key locations:
routing_keyinside Payload: Included in the root JSON payload body.Authorization: Token token=...Header: Standard PagerDuty authentication header format.x-routing-keyHeader: Direct custom header.- URL Query Param:
?routing_key=YOUR_INTEGRATION_KEYor?key=YOUR_INTEGRATION_KEY.
📥 Supported Actions & Schemas
1. Trigger Incident
curl -X POST https://your-opsknight.com/api/integrations/pagerduty/v2/enqueue \
-H "Content-Type: application/json" \
-d '{
"routing_key": "YOUR_INTEGRATION_KEY",
"event_action": "trigger",
"dedup_key": "disk-usage-srv-01",
"payload": {
"summary": "Disk usage exceeded 95% on /dev/sda1",
"source": "srv-01.prod.internal",
"severity": "critical",
"component": "storage",
"group": "infra-prod",
"class": "disk-full",
"custom_details": {
"free_space_mb": 512,
"mount_point": "/var/log"
}
},
"links": [
{
"href": "https://grafana.company.com/d/storage-overview",
"text": "Grafana Storage Dashboard"
}
]
}'
2. Acknowledge Incident
curl -X POST https://your-opsknight.com/api/integrations/pagerduty/v2/enqueue \
-H "Content-Type: application/json" \
-d '{
"routing_key": "YOUR_INTEGRATION_KEY",
"event_action": "acknowledge",
"dedup_key": "disk-usage-srv-01"
}'
3. Resolve Incident
curl -X POST https://your-opsknight.com/api/integrations/pagerduty/v2/enqueue \
-H "Content-Type: application/json" \
-d '{
"routing_key": "YOUR_INTEGRATION_KEY",
"event_action": "resolve",
"dedup_key": "disk-usage-srv-01"
}'
⚡ Response Codes
202 Accepted: Event successfully parsed, validated, and queued into the incident pipeline.{ "status": "success", "message": "Event processed", "dedup_key": "disk-usage-srv-01" }400 Bad Request: Payload validation error (e.g. missing summary or invalid severity).401 / 404 Not Found: Invalid or disabled integration routing key.429 Too Many Requests: Rate limit exceeded for this integration key (returnsRetry-Afterheader).
Last updated for v1.3
Edit this page on GitHub