Alerting: Improve openAPI specification and docs for export endpoints (#85008)
This commit is contained in:
@@ -24,9 +24,12 @@ import (
|
||||
//
|
||||
// List rules in provisioning format
|
||||
//
|
||||
// Consumes:
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
@@ -64,7 +67,13 @@ import (
|
||||
//
|
||||
// Consumes:
|
||||
// - application/json
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
|
||||
@@ -18,10 +18,11 @@ type ExportQueryParams struct {
|
||||
// default: false
|
||||
Download bool `json:"download"`
|
||||
|
||||
// Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.
|
||||
// Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
|
||||
// in: query
|
||||
// required: false
|
||||
// default: yaml
|
||||
// enum: yaml,json,hcl
|
||||
Format string `json:"format"`
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@ import (
|
||||
//
|
||||
// Export all alert rules in provisioning file format.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
// 404: description: Not found.
|
||||
@@ -36,7 +43,9 @@ import (
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
@@ -184,7 +193,9 @@ type ProvisionedAlertRule struct {
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
|
||||
@@ -15,6 +15,13 @@ import (
|
||||
//
|
||||
// Export all contact points in provisioning file format.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
|
||||
@@ -15,6 +15,13 @@ import (
|
||||
//
|
||||
// Export all mute timings in provisioning format.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
@@ -31,6 +38,13 @@ import (
|
||||
//
|
||||
// Export a mute timing in provisioning format.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
// 403: PermissionDenied
|
||||
|
||||
@@ -37,6 +37,13 @@ import (
|
||||
//
|
||||
// Export the notification policy tree in provisioning file format.
|
||||
//
|
||||
// Produces:
|
||||
// - application/json
|
||||
// - application/yaml
|
||||
// - application/terraform+hcl
|
||||
// - text/yaml
|
||||
// - text/hcl
|
||||
//
|
||||
// Responses:
|
||||
// 200: AlertingFileExport
|
||||
// 404: NotFound
|
||||
|
||||
Reference in New Issue
Block a user