mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Re-generate swagger definitions (#62154)
Regenerate swagger, add body binding so parameters work
This commit is contained in:
@@ -31,7 +31,7 @@ func (f *TestingApiHandler) BacktestConfig(ctx *models.ReqContext) response.Resp
|
||||
if err := web.Bind(ctx.Req, &conf); err != nil {
|
||||
return response.Error(http.StatusBadRequest, "bad request data", err)
|
||||
}
|
||||
return f.handleBacktestingConfig(ctx, conf)
|
||||
return f.handleBacktestConfig(ctx, conf)
|
||||
}
|
||||
func (f *TestingApiHandler) RouteEvalQueries(ctx *models.ReqContext) response.Response {
|
||||
// Parse Request Body
|
||||
|
||||
@@ -29,6 +29,6 @@ func (f *TestingApiHandler) handleRouteEvalQueries(c *models.ReqContext, body ap
|
||||
return f.svc.RouteEvalQueries(c, body)
|
||||
}
|
||||
|
||||
func (f *TestingApiHandler) handleBacktestingConfig(ctx *models.ReqContext, conf apimodels.BacktestConfig) response.Response {
|
||||
func (f *TestingApiHandler) handleBacktestConfig(ctx *models.ReqContext, conf apimodels.BacktestConfig) response.Response {
|
||||
return f.svc.BacktestAlertRule(ctx, conf)
|
||||
}
|
||||
|
||||
@@ -7,26 +7,6 @@
|
||||
"Ack": {
|
||||
"type": "object"
|
||||
},
|
||||
"AddCommand": {
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"role": {
|
||||
"enum": [
|
||||
"Viewer",
|
||||
"Editor",
|
||||
"Admin"
|
||||
],
|
||||
"type": "string"
|
||||
},
|
||||
"secondsToLive": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"Alert": {
|
||||
"properties": {
|
||||
"activeAt": {
|
||||
@@ -191,9 +171,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AlertStateType": {
|
||||
"type": "string"
|
||||
},
|
||||
"AlertingRule": {
|
||||
"description": "adapted from cortex",
|
||||
"properties": {
|
||||
@@ -452,9 +429,31 @@
|
||||
"type": "object"
|
||||
},
|
||||
"DataTopic": {
|
||||
"description": "nolint:revive",
|
||||
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
|
||||
"type": "string"
|
||||
},
|
||||
"DiscordConfig": {
|
||||
"properties": {
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"webhook_url": {
|
||||
"$ref": "#/definitions/SecretURL"
|
||||
}
|
||||
},
|
||||
"title": "DiscordConfig configures notifications via Discord.",
|
||||
"type": "object"
|
||||
},
|
||||
"DiscoveryBase": {
|
||||
"properties": {
|
||||
"error": {
|
||||
@@ -902,6 +901,12 @@
|
||||
},
|
||||
"GettableApiReceiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -960,6 +965,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -1025,7 +1036,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -1257,9 +1268,15 @@
|
||||
"victorops_api_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"victorops_api_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"victorops_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"webex_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"wechat_api_corp_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1298,6 +1315,9 @@
|
||||
"oauth2": {
|
||||
"$ref": "#/definitions/OAuth2"
|
||||
},
|
||||
"proxy_connect_header": {
|
||||
"$ref": "#/definitions/Header"
|
||||
},
|
||||
"proxy_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
@@ -1308,6 +1328,15 @@
|
||||
"title": "HTTPClientConfig configures an HTTP client.",
|
||||
"type": "object"
|
||||
},
|
||||
"Header": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"HostPort": {
|
||||
"properties": {
|
||||
"Host": {
|
||||
@@ -1401,82 +1430,6 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"LegacyAlert": {
|
||||
"properties": {
|
||||
"Created": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"DashboardId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"EvalData": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"ExecutionError": {
|
||||
"type": "string"
|
||||
},
|
||||
"For": {
|
||||
"$ref": "#/definitions/Duration"
|
||||
},
|
||||
"Frequency": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Handler": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Message": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"NewStateDate": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"OrgId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"PanelId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"Severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"Silenced": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"State": {
|
||||
"$ref": "#/definitions/AlertStateType"
|
||||
},
|
||||
"StateChanges": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Updated": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"Version": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MatchRegexps": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Regexp"
|
||||
@@ -1772,15 +1725,24 @@
|
||||
"routing_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"routing_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"service_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"service_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
}
|
||||
@@ -1870,6 +1832,12 @@
|
||||
},
|
||||
"PostableApiReceiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -1928,6 +1896,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -1990,7 +1964,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -2276,6 +2250,9 @@
|
||||
"token": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"token_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2284,6 +2261,9 @@
|
||||
},
|
||||
"user_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"user_key_file": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -2369,8 +2349,17 @@
|
||||
"title": "QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.",
|
||||
"type": "object"
|
||||
},
|
||||
"RawMessage": {
|
||||
"type": "object"
|
||||
},
|
||||
"Receiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -2423,6 +2412,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -2924,6 +2919,9 @@
|
||||
"description": "The client key file for the targets.",
|
||||
"type": "string"
|
||||
},
|
||||
"max_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
"min_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
@@ -3157,6 +3155,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"URL": {
|
||||
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
|
||||
"properties": {
|
||||
"ForceQuery": {
|
||||
"type": "boolean"
|
||||
@@ -3192,7 +3191,7 @@
|
||||
"$ref": "#/definitions/Userinfo"
|
||||
}
|
||||
},
|
||||
"title": "URL is a custom URL type that allows validation at configuration load time.",
|
||||
"title": "A URL represents a parsed URL (technically, a URI reference).",
|
||||
"type": "object"
|
||||
},
|
||||
"Userinfo": {
|
||||
@@ -3231,7 +3230,7 @@
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"api_key_file": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
"type": "string"
|
||||
},
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
@@ -3271,6 +3270,27 @@
|
||||
"title": "VisType is used to indicate how the data should be visualized in explore.",
|
||||
"type": "string"
|
||||
},
|
||||
"WebexConfig": {
|
||||
"properties": {
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"room_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "WebexConfig configures notifications via Webex.",
|
||||
"type": "object"
|
||||
},
|
||||
"WebhookConfig": {
|
||||
"properties": {
|
||||
"http_config": {
|
||||
@@ -3348,7 +3368,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@@ -3592,6 +3611,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",
|
||||
@@ -3735,6 +3755,7 @@
|
||||
"type": "array"
|
||||
},
|
||||
"postableSilence": {
|
||||
"description": "PostableSilence postable silence",
|
||||
"properties": {
|
||||
"comment": {
|
||||
"description": "comment",
|
||||
@@ -3772,7 +3793,6 @@
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"properties": {
|
||||
"active": {
|
||||
"description": "active",
|
||||
|
||||
@@ -176,6 +176,12 @@ type ResponseDetails struct {
|
||||
Msg string `json:"msg"`
|
||||
}
|
||||
|
||||
// swagger:parameters BacktestConfig
|
||||
type BacktestConfigRequest struct {
|
||||
// in:body
|
||||
Body BacktestConfig
|
||||
}
|
||||
|
||||
// swagger:model
|
||||
type BacktestConfig struct {
|
||||
From time.Time `json:"from"`
|
||||
|
||||
@@ -171,9 +171,6 @@
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"AlertStateType": {
|
||||
"type": "string"
|
||||
},
|
||||
"AlertingRule": {
|
||||
"description": "adapted from cortex",
|
||||
"properties": {
|
||||
@@ -432,9 +429,31 @@
|
||||
"type": "object"
|
||||
},
|
||||
"DataTopic": {
|
||||
"description": "nolint:revive",
|
||||
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
|
||||
"type": "string"
|
||||
},
|
||||
"DiscordConfig": {
|
||||
"properties": {
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"webhook_url": {
|
||||
"$ref": "#/definitions/SecretURL"
|
||||
}
|
||||
},
|
||||
"title": "DiscordConfig configures notifications via Discord.",
|
||||
"type": "object"
|
||||
},
|
||||
"DiscoveryBase": {
|
||||
"properties": {
|
||||
"error": {
|
||||
@@ -882,6 +901,12 @@
|
||||
},
|
||||
"GettableApiReceiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -940,6 +965,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -1005,7 +1036,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -1237,9 +1268,15 @@
|
||||
"victorops_api_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"victorops_api_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"victorops_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"webex_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"wechat_api_corp_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -1278,6 +1315,9 @@
|
||||
"oauth2": {
|
||||
"$ref": "#/definitions/OAuth2"
|
||||
},
|
||||
"proxy_connect_header": {
|
||||
"$ref": "#/definitions/Header"
|
||||
},
|
||||
"proxy_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
@@ -1288,6 +1328,15 @@
|
||||
"title": "HTTPClientConfig configures an HTTP client.",
|
||||
"type": "object"
|
||||
},
|
||||
"Header": {
|
||||
"additionalProperties": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"HostPort": {
|
||||
"properties": {
|
||||
"Host": {
|
||||
@@ -1381,82 +1430,6 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"LegacyAlert": {
|
||||
"properties": {
|
||||
"Created": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"DashboardId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"EvalData": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"ExecutionError": {
|
||||
"type": "string"
|
||||
},
|
||||
"For": {
|
||||
"$ref": "#/definitions/Duration"
|
||||
},
|
||||
"Frequency": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Handler": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Message": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"NewStateDate": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"OrgId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"PanelId": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"Severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"Silenced": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"State": {
|
||||
"$ref": "#/definitions/AlertStateType"
|
||||
},
|
||||
"StateChanges": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
},
|
||||
"Updated": {
|
||||
"format": "date-time",
|
||||
"type": "string"
|
||||
},
|
||||
"Version": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
},
|
||||
"MatchRegexps": {
|
||||
"additionalProperties": {
|
||||
"$ref": "#/definitions/Regexp"
|
||||
@@ -1752,15 +1725,24 @@
|
||||
"routing_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"routing_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"service_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"service_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
}
|
||||
@@ -1850,6 +1832,12 @@
|
||||
},
|
||||
"PostableApiReceiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -1908,6 +1896,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -1970,7 +1964,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -2256,6 +2250,9 @@
|
||||
"token": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"token_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -2264,6 +2261,9 @@
|
||||
},
|
||||
"user_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"user_key_file": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object"
|
||||
@@ -2349,8 +2349,17 @@
|
||||
"title": "QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time.",
|
||||
"type": "object"
|
||||
},
|
||||
"RawMessage": {
|
||||
"type": "object"
|
||||
},
|
||||
"Receiver": {
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"email_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/EmailConfig"
|
||||
@@ -2403,6 +2412,12 @@
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webex_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
},
|
||||
"type": "array"
|
||||
},
|
||||
"webhook_configs": {
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebhookConfig"
|
||||
@@ -2904,6 +2919,9 @@
|
||||
"description": "The client key file for the targets.",
|
||||
"type": "string"
|
||||
},
|
||||
"max_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
"min_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
@@ -3211,7 +3229,7 @@
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"api_key_file": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
"type": "string"
|
||||
},
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
@@ -3251,6 +3269,27 @@
|
||||
"title": "VisType is used to indicate how the data should be visualized in explore.",
|
||||
"type": "string"
|
||||
},
|
||||
"WebexConfig": {
|
||||
"properties": {
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"room_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
"title": "WebexConfig configures notifications via Webex.",
|
||||
"type": "object"
|
||||
},
|
||||
"WebhookConfig": {
|
||||
"properties": {
|
||||
"http_config": {
|
||||
@@ -3328,6 +3367,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"properties": {
|
||||
"alerts": {
|
||||
"description": "alerts",
|
||||
@@ -3351,6 +3391,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
@@ -3752,6 +3793,7 @@
|
||||
"type": "object"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"properties": {
|
||||
"active": {
|
||||
"description": "active",
|
||||
@@ -6222,6 +6264,15 @@
|
||||
],
|
||||
"description": "Test rule",
|
||||
"operationId": "BacktestConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "body",
|
||||
"name": "Body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/BacktestConfig"
|
||||
}
|
||||
}
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
|
||||
@@ -2397,6 +2397,15 @@
|
||||
"testing"
|
||||
],
|
||||
"operationId": "BacktestConfig",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Body",
|
||||
"in": "body",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/BacktestConfig"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "BacktestResult",
|
||||
@@ -2653,9 +2662,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"AlertStateType": {
|
||||
"type": "string"
|
||||
},
|
||||
"AlertingRule": {
|
||||
"description": "adapted from cortex",
|
||||
"type": "object",
|
||||
@@ -2914,9 +2920,31 @@
|
||||
}
|
||||
},
|
||||
"DataTopic": {
|
||||
"description": "nolint:revive",
|
||||
"type": "string",
|
||||
"title": "DataTopic is used to identify which topic the frame should be assigned to."
|
||||
},
|
||||
"DiscordConfig": {
|
||||
"type": "object",
|
||||
"title": "DiscordConfig configures notifications via Discord.",
|
||||
"properties": {
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"title": {
|
||||
"type": "string"
|
||||
},
|
||||
"webhook_url": {
|
||||
"$ref": "#/definitions/SecretURL"
|
||||
}
|
||||
}
|
||||
},
|
||||
"DiscoveryBase": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -3368,6 +3396,12 @@
|
||||
"GettableApiReceiver": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
}
|
||||
},
|
||||
"email_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3426,6 +3460,12 @@
|
||||
"$ref": "#/definitions/VictorOpsConfig"
|
||||
}
|
||||
},
|
||||
"webex_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
}
|
||||
},
|
||||
"webhook_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -3491,7 +3531,7 @@
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -3723,9 +3763,15 @@
|
||||
"victorops_api_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"victorops_api_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"victorops_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"webex_api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"wechat_api_corp_id": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -3765,6 +3811,9 @@
|
||||
"oauth2": {
|
||||
"$ref": "#/definitions/OAuth2"
|
||||
},
|
||||
"proxy_connect_header": {
|
||||
"$ref": "#/definitions/Header"
|
||||
},
|
||||
"proxy_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
@@ -3773,6 +3822,15 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Header": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
}
|
||||
}
|
||||
},
|
||||
"HostPort": {
|
||||
"type": "object",
|
||||
"title": "HostPort represents a \"host:port\" network address.",
|
||||
@@ -3866,82 +3924,6 @@
|
||||
"$ref": "#/definitions/Label"
|
||||
}
|
||||
},
|
||||
"LegacyAlert": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"Created": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"DashboardId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"EvalData": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"ExecutionError": {
|
||||
"type": "string"
|
||||
},
|
||||
"For": {
|
||||
"$ref": "#/definitions/Duration"
|
||||
},
|
||||
"Frequency": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Handler": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Id": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Message": {
|
||||
"type": "string"
|
||||
},
|
||||
"Name": {
|
||||
"type": "string"
|
||||
},
|
||||
"NewStateDate": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"OrgId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"PanelId": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
},
|
||||
"Severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"Silenced": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"State": {
|
||||
"$ref": "#/definitions/AlertStateType"
|
||||
},
|
||||
"StateChanges": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
},
|
||||
"Updated": {
|
||||
"type": "string",
|
||||
"format": "date-time"
|
||||
},
|
||||
"Version": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MatchRegexps": {
|
||||
"type": "object",
|
||||
"title": "MatchRegexps represents a map of Regexp.",
|
||||
@@ -4240,15 +4222,24 @@
|
||||
"routing_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"routing_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"service_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"service_key_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"severity": {
|
||||
"type": "string"
|
||||
},
|
||||
"source": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
}
|
||||
@@ -4337,6 +4328,12 @@
|
||||
"PostableApiReceiver": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
}
|
||||
},
|
||||
"email_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4395,6 +4392,12 @@
|
||||
"$ref": "#/definitions/VictorOpsConfig"
|
||||
}
|
||||
},
|
||||
"webex_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
}
|
||||
},
|
||||
"webhook_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4457,7 +4460,7 @@
|
||||
}
|
||||
},
|
||||
"settings": {
|
||||
"$ref": "#/definitions/Json"
|
||||
"$ref": "#/definitions/RawMessage"
|
||||
},
|
||||
"type": {
|
||||
"type": "string"
|
||||
@@ -4743,6 +4746,9 @@
|
||||
"token": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"token_file": {
|
||||
"type": "string"
|
||||
},
|
||||
"url": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -4751,6 +4757,9 @@
|
||||
},
|
||||
"user_key": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"user_key_file": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -4835,10 +4844,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"RawMessage": {
|
||||
"type": "object"
|
||||
},
|
||||
"Receiver": {
|
||||
"type": "object",
|
||||
"title": "Receiver configuration provides configuration on how to contact a receiver.",
|
||||
"properties": {
|
||||
"discord_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/DiscordConfig"
|
||||
}
|
||||
},
|
||||
"email_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -4891,6 +4909,12 @@
|
||||
"$ref": "#/definitions/VictorOpsConfig"
|
||||
}
|
||||
},
|
||||
"webex_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/WebexConfig"
|
||||
}
|
||||
},
|
||||
"webhook_configs": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
@@ -5392,6 +5416,9 @@
|
||||
"description": "The client key file for the targets.",
|
||||
"type": "string"
|
||||
},
|
||||
"max_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
"min_version": {
|
||||
"$ref": "#/definitions/TLSVersion"
|
||||
},
|
||||
@@ -5699,7 +5726,7 @@
|
||||
"$ref": "#/definitions/Secret"
|
||||
},
|
||||
"api_key_file": {
|
||||
"$ref": "#/definitions/Secret"
|
||||
"type": "string"
|
||||
},
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
@@ -5737,6 +5764,27 @@
|
||||
"type": "string",
|
||||
"title": "VisType is used to indicate how the data should be visualized in explore."
|
||||
},
|
||||
"WebexConfig": {
|
||||
"type": "object",
|
||||
"title": "WebexConfig configures notifications via Webex.",
|
||||
"properties": {
|
||||
"api_url": {
|
||||
"$ref": "#/definitions/URL"
|
||||
},
|
||||
"http_config": {
|
||||
"$ref": "#/definitions/HTTPClientConfig"
|
||||
},
|
||||
"message": {
|
||||
"type": "string"
|
||||
},
|
||||
"room_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"send_resolved": {
|
||||
"type": "boolean"
|
||||
}
|
||||
}
|
||||
},
|
||||
"WebhookConfig": {
|
||||
"type": "object",
|
||||
"title": "WebhookConfig configures notifications via a generic webhook.",
|
||||
@@ -5814,6 +5862,7 @@
|
||||
}
|
||||
},
|
||||
"alertGroup": {
|
||||
"description": "AlertGroup alert group",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"alerts",
|
||||
@@ -5838,6 +5887,7 @@
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
},
|
||||
"alertGroups": {
|
||||
"description": "AlertGroups alert groups",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/alertGroup"
|
||||
@@ -6246,6 +6296,7 @@
|
||||
"$ref": "#/definitions/postableSilence"
|
||||
},
|
||||
"receiver": {
|
||||
"description": "Receiver receiver",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"active",
|
||||
|
||||
Reference in New Issue
Block a user