List alert rules
GET
/api/v1/alert-rules
const url = 'http://localhost:3000/api/v1/alert-rules';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3000/api/v1/alert-rules \ --header 'X-API-Key: <X-API-Key>'Lists every alert rule in the caller’s organization, newest first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”x-organization-id
string format: uuid
UUID of the organization (tenant) the request acts in. It selects the tenant and grants nothing: the server checks membership or an open tenant switch. Not needed for global operations. A malformed value returns 400. API keys are fixed to their own organization; another organization returns 403. The x-organization-source header grants nothing.
Responses
Section titled “Responses”Media typeapplication/json
Array<object>
object
id
required
string format: uuid
name
required
string
ruleType
required
string
scope
required
string
targetId
object
targetLabels
required
object
key
additional properties
string
expression
object
thresholdMinutes
object
severity
required
string
enabled
required
boolean
notificationTargets
required
Array<object>
object
id
required
string format: uuid
name
required
string
channel
required
string
enabled
required
boolean
suppression
Notification suppression for this rule (FM-1269), or null when none is set.
object
enabled
required
boolean
trigger
required
string
maxNotifications
RATE trigger only. Null for AFTER_FIRST.
object
intervalSeconds
RATE trigger only. Null for AFTER_FIRST.
object
liftSchedule
required
The structured lift schedule as stored — never a cron expression. See AlertSuppressionDto.liftSchedule for the three admitted shapes.
object
key
additional properties
any
liftTimezone
required
string
liftMode
required
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
[ { "name": "CPU above 80% on edge nodes", "ruleType": "DEVICE_OFFLINE", "scope": "GLOBAL", "expression": "cpu > 80 for 5m", "severity": "INFO", "notificationTargets": [ { "name": "Ops on-call email", "channel": "EMAIL" } ], "suppression": { "trigger": "AFTER_FIRST", "liftSchedule": { "type": "dailyAt", "time": "23:59" }, "liftTimezone": "Europe/Berlin", "liftMode": "DIGEST" } }]