Alert rules
List alert rules
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
uuidQuery Parameters
state?string
Value in
- "Enabled"
- "Disabled"
Response Body
application/json
curl -X GET "https://example.com/workspaces/00000000-0000-0000-0000-000000000001/alert-rules?state=Enabled"All alert rules in the workspace.
[ { "id": "a7Kd93mQx2Lp", "name": "High CPU usage", "description": "Fires when the average CPU usage of a device exceeds 90 %.", "state": "Enabled", "type": "MetricFixedThreshold", "evaluationFrequency": "5m", "createdAt": "2026-01-12T09:30:00+00:00", "targets": [ { "id": "n4Tg81vBz6Rw", "name": "On-call e-mail" } ], "hasFiringAlert": true, "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" } ] }, { "id": "b3Xn17sVt9Kc", "name": "Memory usage growth", "description": "Fires when memory usage grows by more than 25 % in an hour.", "state": "Enabled", "type": "MetricPercentualThreshold", "evaluationFrequency": "1h", "createdAt": "2026-01-05T08:15:00+00:00", "targets": [ { "id": "n4Tg81vBz6Rw", "name": "On-call e-mail" } ], "hasFiringAlert": false, "evaluations": [] }]