Return a list of all alerts
GET/v1/grafana/api/v1/provisioning/alert-rules
Returns a list of all alerts. Please ensure to change the region in the URL to match your account's region.
Request
Query Parameters
panelId integer
dashboardUid integer
Responses
- 200
successful query
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
annotations object
Annotations for the dashboard
runbook_url string
URL to the runbook
condition string
Condition
data object[]
Response wrapper for the data retrieved
datasourceUid string
Grafana data source unique identifier
model object
JSON is the raw JSON query and includes the model properties as well as custom properties.
conditions object[]
evaluator object
params int32[]
type string
operator object
type string
query object
params undefined[]
reducer object
params undefined[]
type string
type string
datasource object
type string
uid string
expression string
hide boolean
intervalMs int32
maxDataPoints int32
refId string
type string
queryType string
Optional identifier for the type of query
refId string
Unique identifier of the query, set by the frontend call.
relativeTimeRange object
Per query start and end time for requests
from int32
to int32
execErrState string
folderUID string
The unique identifier (uid) of a folder to search in for dashboards. You cannot use General
folder or the folder generated by logz.io - Logz.io Dashboards
- to place your alerts.
for int32
id int32
labels object
team string
noDataState string
orgID int32
provenance string
ruleGroup string
title string
uid string
updated string
{
"annotations": {
"runbook_url": "https://supercoolrunbook.com/page/13"
},
"condition": "A",
"data": [
{
"datasourceUid": -100,
"model": {
"conditions": [
{
"evaluator": {
"params": [
0
],
"type": "gt"
},
"operator": {
"type": "and"
},
"query": {
"params": [
null
]
},
"reducer": {
"params": [
null
],
"type": "avg"
},
"type": "query"
}
],
"datasource": {
"type": "__expr__",
"uid": "__expr__"
},
"expression": "1 == 1",
"hide": true,
"intervalMs": 1000,
"maxDataPoints": 43200,
"refId": "A",
"type": "math"
},
"queryType": null,
"refId": "A",
"relativeTimeRange": {
"from": 0,
"to": 0
}
}
],
"execErrState": "Alerting",
"folderUID": "project_x",
"for": 0,
"id": 0,
"labels": {
"team": "sre-team-1"
},
"noDataState": "Alerting",
"orgID": 0,
"provenance": "string",
"ruleGroup": "eval_group_1",
"title": "Always firing",
"uid": "string",
"updated": "2022-08-16T11:07:04.763Z"
}
Loading...