Return a list of all alerts by UID
GET/v1/grafana/api/v1/provisioning/alert-rules/:UID
Returns a list of all alerts by a UID. Please ensure to change the region in the URL to match your account's region.
Request
Path Parameters
UID stringrequired
Responses
- 200
successful query
- application/json
- Schema
- Example (from schema)
Schema
- Array [
- Array [
- ]
- ]
annotations object
runbook_url string
condition string
data object[]
datasourceUid string
model object
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
refId string
relativeTimeRange object
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-16T13:09:06.350Z"
}
Loading...