lumen.alert-rule.create
Creates a Lumen alert rule that dispatches webhook, Slack, or email notifications — or opens a native Orkestia incident ticket (channel=ticket) — when fingerprint_log detects a new_group, regressed, or threshold event.
Create a Lumen alert rule (webhook, Slack, email, or ticket) via the Lumen REST API.
Overview
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-lumen |
| Version | 1.0 |
Input Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
organization_uuid | string | Yes | — | Org scope; engine-injected, never from request body. |
channel | string | Yes | — | Delivery channel: webhook, slack, email, or ticket. 'ticket' opens a native Orkestia incident ticket (no destination needed). |
webhook_url | string | No | — | HTTPS URL; required when channel is webhook or slack. Omit for email or ticket. |
recipient | string | No | — | Alert destination address when channel is email. Mapped to Lumen's email_to on the wire. Omit for webhook, slack, or ticket. |
event_type | string | No | — | Trigger event: new_group, regressed, or threshold. Default: new_group. |
project | string | No | — | Project name or glob pattern. Default: * (all projects). |
level_filter | string | No | — | Comma-separated log levels that may trigger the rule, e.g. ERROR,CRITICAL. |
min_occurrences | integer | No | — | Minimum occurrence count before the rule fires. Default: 1. |
secret | string | No | — | HMAC-SHA256 signing secret for webhook and slack channels. |
enabled | boolean | No | — | Whether the rule is active immediately on creation. Default: true. |
workflow_run_id | string | No | — | — |
Output Schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
alert_rule_uuid | string | No | — | Public UUID of the created alert rule. |
channel | string | No | — | — |
event_type | string | No | — | — |
project | string | No | — | — |
enabled | boolean | No | — | — |
created_at | string | No | — | ISO 8601 creation timestamp. |
reason | string | No | — | — |
http_status | integer | No | — | — |
lumen_error | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram
Transitions
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
API Usage
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "lumen.alert-rule.create",
"initial_data": {
"organization_uuid": "value",
"channel": "value"
}
}