Inbound Events API
The Events API lets external systems send events to YipYap. Use it to integrate with monitoring tools that YipYap does not natively support, or to trigger alerts from custom scripts.
Endpoint
Section titled “Endpoint”POST https://console.yipyap.run/api/v1/eventsAuthentication
Section titled “Authentication”The Events API uses a routing key (also called an integration key) instead of API key authentication. Each monitor has a unique integration key that you include in the request body. Create a monitor and copy its integration key from the monitor settings.
Payload Format
Section titled “Payload Format”{ "routing_key": "your-monitor-integration-key", "event_action": "trigger", "dedup_key": "my-unique-alert-key", "payload": { "summary": "High error rate detected", "severity": "critical", "source": "prometheus", "component": "api-gateway", "custom_details": { "error_rate": "5.2%", "threshold": "5%" } }}| Field | Required | Description |
|---|---|---|
| routing_key | Yes | The monitor’s integration key. |
| event_action | Yes | trigger, acknowledge, or resolve. |
| dedup_key | No | Deduplication key to group related events. |
| payload | Yes | Event details (for trigger events). |
Payload Fields
Section titled “Payload Fields”| Field | Required | Description |
|---|---|---|
| summary | Yes | Short description of the event. |
| severity | No | critical, warning, or info. |
| source | No | Identifier for the system that sent the event. |
| component | No | Component or service affected. |
| custom_details | No | Arbitrary JSON with additional diagnostic data. |
Event Actions
Section titled “Event Actions”- trigger: Opens a new alert (or updates an existing one with the same dedup_key).
- acknowledge: Marks the alert as acknowledged.
- resolve: Resolves the alert.
Use Cases
Section titled “Use Cases”Custom Scripts
Section titled “Custom Scripts”Trigger an alert from a deployment script if a smoke test fails:
curl -X POST https://console.yipyap.run/api/v1/events \ -H "Content-Type: application/json" \ -d '{ "routing_key": "your-integration-key", "event_action": "trigger", "dedup_key": "deploy-smoke-test", "payload": { "summary": "Post-deploy smoke test failed", "severity": "critical", "source": "deploy-script" } }'Resolve it when the issue is fixed:
curl -X POST https://console.yipyap.run/api/v1/events \ -H "Content-Type: application/json" \ -d '{ "routing_key": "your-integration-key", "event_action": "resolve", "dedup_key": "deploy-smoke-test" }'