Alerting: Receivers API (read only endpoints) (#81751)
* Add single receiver method * Add receiver permissions * Add single/multi GET endpoints for receivers * Remove stable tag from time intervals See end of PR description here: https://github.com/grafana/grafana/pull/81672
This commit is contained in:
@@ -4512,7 +4512,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@@ -4536,6 +4535,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
@@ -4640,6 +4640,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"gettableAlert": {
|
||||
"description": "GettableAlert gettable alert",
|
||||
"properties": {
|
||||
"annotations": {
|
||||
"$ref": "#/definitions/labelSet"
|
||||
@@ -4701,7 +4702,6 @@
|
||||
"type": "array"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"description": "comment",
|
||||
@@ -4756,6 +4756,7 @@
|
||||
"type": "array"
|
||||
},
|
||||
"integration": {
|
||||
"description": "Integration integration",
|
||||
"properties": {
|
||||
"lastNotifyAttempt": {
|
||||
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
|
||||
@@ -4936,7 +4937,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"properties": {
|
||||
"active": {
|
||||
"description": "active",
|
||||
@@ -7046,6 +7046,86 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/notifications/receivers": {
|
||||
"get": {
|
||||
"operationId": "RouteGetReceivers",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "query",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "names",
|
||||
"type": "array"
|
||||
},
|
||||
{
|
||||
"format": "int64",
|
||||
"in": "query",
|
||||
"name": "limit",
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"format": "int64",
|
||||
"in": "query",
|
||||
"name": "offset",
|
||||
"type": "integer"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "decrypt",
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GetReceiversResponse"
|
||||
},
|
||||
"403": {
|
||||
"description": "PermissionDenied",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PermissionDenied"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Get all receivers.",
|
||||
"tags": [
|
||||
"notifications"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/notifications/receivers/{Name}": {
|
||||
"get": {
|
||||
"operationId": "RouteGetReceiver",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "name",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"in": "query",
|
||||
"name": "decrypt",
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GetReceiverResponse"
|
||||
},
|
||||
"404": {
|
||||
"description": "NotFound",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NotFound"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Get a receiver by name.",
|
||||
"tags": [
|
||||
"notifications"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/notifications/time-intervals": {
|
||||
"get": {
|
||||
"description": "Get all the time intervals",
|
||||
@@ -8507,6 +8587,21 @@
|
||||
"$ref": "#/definitions/GettableTimeIntervals"
|
||||
}
|
||||
},
|
||||
"GetReceiverResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GettableApiReceiver"
|
||||
}
|
||||
},
|
||||
"GetReceiversResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/GettableApiReceiver"
|
||||
},
|
||||
"type": "array"
|
||||
}
|
||||
},
|
||||
"GettableHistoricUserConfigs": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
|
||||
Reference in New Issue
Block a user