List alarm rules
LogsGET /alarm-rules
Returns the tenant's alarm rules, both active and inactive, newest first, with cursor pagination (limit defaults to 20, at most 100). Each rule carries its source, comparison, threshold, clear threshold, severity and whether it is currently evaluated.
Parameters
sourceReturn only rules that watch this source: telemetry (sensor readings) or quality (water quality sample results); omit to return both.
limitMaximum resources to return (default 20, maximum 100).
afterOpaque cursor returned by the previous page.
Returns
200 OK
Show attributes
dataShow child attributes
idnamesourceone of
telemetry,qualitysensor_idparametercomparisonone of
above,belowthresholdclear_thresholdseverityone of
critical,warning,infoevent_typenotify_phonesactive
has_morenext_cursor
Permissions business:monitoring:read · Roles: admin, analyst, field_supervisor, operations, owner, viewer
curl -X GET "$BUSINESS_API/alarm-rules" \
-H "Authorization: Bearer sk_test_..."
# No matching CLI command; use cURL or direct HTTP.
const res = await fetch("$BUSINESS_API/alarm-rules", {
method: "GET",
headers: {
Authorization: "Bearer sk_test_..."
}
});
const data = await res.json();
import requests
res = requests.get(
"$BUSINESS_API/alarm-rules",
headers={
"Authorization": "Bearer sk_test_..."
}
)
data = res.json()
req, _ := http.NewRequest("GET", "$BUSINESS_API/alarm-rules", nil)
req.Header.Set("Authorization", "Bearer sk_test_...")
resp, err := http.DefaultClient.Do(req)
{
"data": [
{
"id": "ala_2Go3hsIph0iVZogl5Q41rKAV1E4",
"name": "Ana Matsinhe",
"source": "telemetry",
"sensor_id": "sen_28o3p46TDQsRdq8pzycV5cIxbMg",
"parameter": "parameter",
"comparison": "above",
"threshold": 1,
"clear_threshold": 1,
"severity": "critical",
"event_type": "event type",
"notify_phones": [
"+258841234567"
],
"active": true
}
],
"has_more": true,
"next_cursor": "next cursor"
}