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:
@@ -2007,12 +2007,91 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/notifications/receivers": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"notifications"
|
||||
],
|
||||
"summary": "Get all receivers.",
|
||||
"operationId": "RouteGetReceivers",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string"
|
||||
},
|
||||
"name": "names",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"name": "limit",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"name": "offset",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "decrypt",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GetReceiversResponse"
|
||||
},
|
||||
"403": {
|
||||
"description": "PermissionDenied",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/PermissionDenied"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/notifications/receivers/{Name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"notifications"
|
||||
],
|
||||
"summary": "Get a receiver by name.",
|
||||
"operationId": "RouteGetReceiver",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "string",
|
||||
"name": "name",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"name": "decrypt",
|
||||
"in": "query"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/responses/GetReceiverResponse"
|
||||
},
|
||||
"404": {
|
||||
"description": "NotFound",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NotFound"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/notifications/time-intervals": {
|
||||
"get": {
|
||||
"description": "Get all the time intervals",
|
||||
"tags": [
|
||||
"notifications",
|
||||
"stable"
|
||||
"notifications"
|
||||
],
|
||||
"operationId": "RouteNotificationsGetTimeIntervals",
|
||||
"responses": {
|
||||
@@ -2031,8 +2110,7 @@
|
||||
"/v1/notifications/time-intervals/{name}": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"notifications",
|
||||
"stable"
|
||||
"notifications"
|
||||
],
|
||||
"summary": "Get a time interval by name.",
|
||||
"operationId": "RouteNotificationsGetTimeInterval",
|
||||
@@ -7994,7 +8072,6 @@
|
||||
}
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"alerts",
|
||||
@@ -8019,6 +8096,7 @@
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
@@ -8124,6 +8202,7 @@
|
||||
}
|
||||
},
|
||||
"gettableAlert": {
|
||||
"description": "GettableAlert gettable alert",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"labels",
|
||||
@@ -8187,7 +8266,6 @@
|
||||
"$ref": "#/definitions/gettableAlerts"
|
||||
},
|
||||
"gettableSilence": {
|
||||
"description": "GettableSilence gettable silence",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"comment",
|
||||
@@ -8244,6 +8322,7 @@
|
||||
"$ref": "#/definitions/gettableSilences"
|
||||
},
|
||||
"integration": {
|
||||
"description": "Integration integration",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
@@ -8426,7 +8505,6 @@
|
||||
"$ref": "#/definitions/postableSilence"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"active",
|
||||
@@ -8557,6 +8635,21 @@
|
||||
"$ref": "#/definitions/GettableTimeIntervals"
|
||||
}
|
||||
},
|
||||
"GetReceiverResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/GettableApiReceiver"
|
||||
}
|
||||
},
|
||||
"GetReceiversResponse": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/GettableApiReceiver"
|
||||
}
|
||||
}
|
||||
},
|
||||
"GettableHistoricUserConfigs": {
|
||||
"description": "",
|
||||
"schema": {
|
||||
|
||||
Reference in New Issue
Block a user