Alerting: extend rules export API to filter by folder and group (#74423)

update endpoint `GET /api/v1/provisioning/alert-rules/export` to accept query parameters `folderUid` and `group`
This commit is contained in:
Yuri Tseretyan
2023-09-07 17:34:32 -04:00
committed by GitHub
parent 5cc737bb24
commit 0df3647367
8 changed files with 117 additions and 18 deletions
+12 -5
View File
@@ -4066,7 +4066,6 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
@@ -4195,7 +4194,6 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
@@ -4251,14 +4249,12 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
@@ -4307,7 +4303,6 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
},
@@ -6469,6 +6464,18 @@
"in": "query",
"name": "format",
"type": "string"
},
{
"description": "UID of folder from which export rules",
"in": "query",
"name": "folderUid",
"type": "string"
},
{
"description": "Name of group of rules to export. Must be specified only together with folder UID",
"in": "query",
"name": "group",
"type": "string"
}
],
"responses": {