Alert rules
Get alert rule
Authorization
API key Alerts: readAuthorizationBearer <token>
API key (sf_...) with any of the required scopes. Generate it in the Spotflow portal on the settings page.
In: header
Scope: Alerts: read
Path Parameters
workspaceId*string
Format
uuidalertRuleId*string
Response Body
application/json
application/problem+json
curl -X GET "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/alert-rules/a7Kd93mQx2Lp"Alert rule detail.
{ "id": "a7Kd93mQx2Lp", "name": "High CPU usage", "description": "Fires when the average CPU usage of a device exceeds 90 %.", "state": "Enabled", "type": "MetricFixedThreshold", "condition": { "fixed": { "query": "metrics | where metric_name == 'cpu' | summarize avg(value) by device_id", "thresholdValue": 90, "minimalTimeSeriesCount": 1, "thresholdType": "HigherThan", "evaluationWindow": "5m" } }, "evaluationFrequency": "5m", "createdAt": "2026-01-12T09:30:00+00:00", "firstEvaluationAt": "2026-01-12T10:00:00+00:00", "lastEvaluatedAt": "2026-01-12T14:05:12+00:00", "creatorSubjectId": "00000000-0000-0000-0000-0000000000aa", "targets": [ { "id": "n4Tg81vBz6Rw", "name": "On-call e-mail" } ], "evaluations": [ { "id": "e2Wq58hNc4Yt", "evaluatedAt": "2026-01-12T14:05:12+00:00", "evaluationScheduledAt": "2026-01-12T14:05:00+00:00", "evaluationWindowStart": "2026-01-12T14:00:00+00:00", "evaluationWindowEnd": "2026-01-12T14:05:00+00:00", "status": "Firing" } ], "hasFiringAlert": true, "queryType": "RawQuery"}