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”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
enabled
required
boolean
notificationTargets
required
Array<object>
object
id
required
string format: uuid
name
required
string
channel
required
string
enabled
required
boolean
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", "notificationTargets": [ { "name": "Ops on-call email", "channel": "EMAIL" } ] }]