Alerting: Improve openAPI specification and docs for export endpoints (#85008)

pull/84882/head^2
Yuri Tseretyan 1 year ago committed by GitHub
parent e9db9106c1
commit e138ae3eb9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      docs/sources/alerting/set-up/provision-alerting-resources/export-alerting-resources/index.md
  2. 91
      docs/sources/shared/alerts/alerting_provisioning.md
  3. 91
      pkg/services/ngalert/api/tooling/api.json
  4. 11
      pkg/services/ngalert/api/tooling/definitions/cortex-ruler.go
  5. 3
      pkg/services/ngalert/api/tooling/definitions/provisioning.go
  6. 11
      pkg/services/ngalert/api/tooling/definitions/provisioning_alert_rules.go
  7. 7
      pkg/services/ngalert/api/tooling/definitions/provisioning_contactpoints.go
  8. 14
      pkg/services/ngalert/api/tooling/definitions/provisioning_mute_timings.go
  9. 7
      pkg/services/ngalert/api/tooling/definitions/provisioning_policies.go
  10. 124
      pkg/services/ngalert/api/tooling/post.json
  11. 120
      pkg/services/ngalert/api/tooling/spec.json
  12. 88
      public/api-merged.json
  13. 245
      public/openapi3.json

@ -142,7 +142,7 @@ However, note the standard endpoints return a JSON format that is not compatible
### Export API endpoints
The **Alerting HTTP API** provides specific endpoints for exporting alerting resources in YAML or JSON formats, facilitating [provisioning via configuration files][alerting_file_provisioning]. Currently, Terraform format is not supported.
The **Alerting HTTP API** provides specific endpoints for exporting alerting resources in YAML or JSON, facilitating [provisioning via configuration files][alerting_file_provisioning], or Terraform (HCL).
| Resource | Method / URI | Summary |
| ------------------------ | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |

@ -337,7 +337,9 @@ GET /api/v1/provisioning/alert-rules/:uid/export
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
@ -416,16 +418,18 @@ GET /api/v1/provisioning/folder/:folderUid/rule-groups/:group/export
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| --------- | ------- | ------- | -------- | --------- | :------: | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| FolderUID | `path` | string | `string` | | ✓ | | |
| Group | `path` | string | `string` | | ✓ | | |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence. |
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| --------- | ------- | ------- | -------- | --------- | :------: | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| FolderUID | `path` | string | `string` | | ✓ | | |
| Group | `path` | string | `string` | | ✓ | | |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
#### All responses
@ -478,12 +482,20 @@ Status: OK
GET /api/v1/provisioning/alert-rules/export
```
#### Produces
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence. |
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
#### All responses
@ -542,13 +554,21 @@ Status: OK
GET /api/v1/provisioning/contact-points/export
```
#### Produces
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| decrypt | `query` | boolean | `bool` | | | | Whether any contained secure settings should be decrypted or left redacted. Redacted settings will contain RedactedValue instead. Currently, only org admin can view decrypted secure settings. |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
| name | `query` | string | `string` | | | | Filter by name |
#### All responses
@ -639,12 +659,20 @@ Status: OK
GET /api/v1/provisioning/mute-timings/export
```
#### Produces
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence. |
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
#### All responses
@ -677,13 +705,21 @@ Status: Forbidden
GET /api/v1/provisioning/mute-timings/:name/export
```
#### Produces
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| name | `path` | string | `string` | | ✓ | | Mute timing name. |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence. |
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| name | `path` | string | `string` | | ✓ | | Mute timing name. |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
#### All responses
@ -738,6 +774,21 @@ Status: OK
GET /api/v1/provisioning/policies/export
```
#### Produces
- application/json
- application/yaml
- application/terraform+hcl
- text/yaml
- text/hcl
#### Parameters
| Name | Source | Type | Go type | Separator | Required | Default | Description |
| -------- | ------- | ------- | -------- | --------- | :------: | -------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| download | `query` | boolean | `bool` | | | | Whether to initiate a download of the file or not. |
| format | `query` | string | `string` | | | `"yaml"` | Format of the downloaded file, either yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence. |
#### All responses
| Code | Status | Description | Has headers | Schema |

@ -4176,7 +4176,6 @@
"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 the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -4212,7 +4211,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"UpdateRuleGroupResponse": {
@ -4442,6 +4441,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
},
@ -4807,6 +4807,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@ -4844,7 +4845,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@ -5032,7 +5032,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -5059,6 +5064,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -5189,7 +5201,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -5205,7 +5222,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@ -5300,7 +5319,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -5319,6 +5343,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -5545,7 +5576,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -5566,7 +5602,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@ -5653,12 +5691,24 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -5793,7 +5843,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -5806,6 +5861,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -5903,6 +5965,13 @@
"/v1/provisioning/policies/export": {
"get": {
"operationId": "RouteGetPolicyTreeExport",
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",

@ -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

@ -4600,7 +4600,6 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
},
@ -4656,12 +4655,14 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
},
"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",
@ -4842,6 +4843,7 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@ -6143,10 +6145,6 @@
},
"/ruler/grafana/api/v1/export/rules": {
"get": {
"consumes": [
"application/json",
"application/yaml"
],
"description": "List rules in provisioning format",
"operationId": "RouteGetRulesForExport",
"parameters": [
@ -6159,7 +6157,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -6186,6 +6189,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -6356,8 +6366,7 @@
"/ruler/grafana/api/v1/rules/{Namespace}/export": {
"post": {
"consumes": [
"application/json",
"application/yaml"
"application/json"
],
"description": "Converts submitted rule group to provisioning format",
"operationId": "RoutePostRulesGroupForExport",
@ -6385,12 +6394,24 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -7160,7 +7181,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -7187,6 +7213,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -7317,7 +7350,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -7333,7 +7371,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@ -7428,7 +7468,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -7447,6 +7492,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -7673,7 +7725,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -7694,7 +7751,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
@ -7781,12 +7840,24 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -7921,7 +7992,12 @@
},
{
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"enum": [
"yaml",
"json",
"hcl"
],
"in": "query",
"name": "format",
"type": "string"
@ -7934,6 +8010,13 @@
"type": "string"
}
],
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",
@ -8031,6 +8114,13 @@
"/v1/provisioning/policies/export": {
"get": {
"operationId": "RouteGetPolicyTreeExport",
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"responses": {
"200": {
"description": "AlertingFileExport",

@ -1200,9 +1200,12 @@
"/ruler/grafana/api/v1/export/rules": {
"get": {
"description": "List rules in provisioning format",
"consumes": [
"produces": [
"application/json",
"application/yaml"
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"ruler"
@ -1217,9 +1220,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -1413,8 +1421,14 @@
"post": {
"description": "Converts submitted rule group to provisioning format",
"consumes": [
"application/json"
],
"produces": [
"application/json",
"application/yaml"
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"ruler"
@ -1443,9 +1457,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
}
@ -2207,6 +2226,13 @@
},
"/v1/provisioning/alert-rules/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
"stable"
@ -2222,9 +2248,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -2371,7 +2402,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
@ -2388,9 +2421,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -2482,6 +2520,13 @@
},
"/v1/provisioning/contact-points/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
"stable"
@ -2497,9 +2542,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -2736,7 +2786,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
@ -2753,9 +2805,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -2844,6 +2901,13 @@
},
"/v1/provisioning/mute-timings/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
"stable"
@ -2859,9 +2923,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
}
@ -2988,6 +3057,13 @@
},
"/v1/provisioning/mute-timings/{name}/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
"stable"
@ -3003,9 +3079,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -3112,6 +3193,13 @@
},
"/v1/provisioning/policies/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning",
"stable"
@ -7807,6 +7895,7 @@
}
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
@ -7831,7 +7920,6 @@
"$ref": "#/definitions/alertGroup"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -7937,7 +8025,6 @@
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",
@ -7994,7 +8081,6 @@
"$ref": "#/definitions/gettableAlert"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
@ -8002,6 +8088,7 @@
"$ref": "#/definitions/gettableAlerts"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
@ -8051,6 +8138,7 @@
"$ref": "#/definitions/gettableSilence"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"

@ -9738,6 +9738,13 @@
},
"/v1/provisioning/alert-rules/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
],
@ -9752,9 +9759,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -9898,7 +9910,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
@ -9914,9 +9928,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -10006,6 +10025,13 @@
},
"/v1/provisioning/contact-points/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
],
@ -10020,9 +10046,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -10254,7 +10285,9 @@
"produces": [
"application/json",
"application/yaml",
"text/yaml"
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
@ -10270,9 +10303,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -10359,6 +10397,13 @@
},
"/v1/provisioning/mute-timings/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
],
@ -10373,9 +10418,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
}
@ -10499,6 +10549,13 @@
},
"/v1/provisioning/mute-timings/{name}/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
],
@ -10513,9 +10570,14 @@
"in": "query"
},
{
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string",
"default": "yaml",
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.",
"name": "format",
"in": "query"
},
@ -10619,6 +10681,13 @@
},
"/v1/provisioning/policies/export": {
"get": {
"produces": [
"application/json",
"application/yaml",
"application/terraform+hcl",
"text/yaml",
"text/hcl"
],
"tags": [
"provisioning"
],
@ -20484,6 +20553,7 @@
}
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -20877,6 +20947,7 @@
}
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": [
"comment",
@ -20942,7 +21013,6 @@
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",

@ -11525,6 +11525,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/components/schemas/alertGroup"
},
@ -11918,6 +11919,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@ -11983,7 +11985,6 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
@ -22635,11 +22636,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
},
@ -22678,6 +22684,26 @@
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
}
},
"description": "AlertingFileExport"
@ -22828,11 +22854,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
},
@ -22854,11 +22885,21 @@
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
@ -22970,11 +23011,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
},
@ -23003,6 +23049,26 @@
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
}
},
"description": "AlertingFileExport"
@ -23013,6 +23079,26 @@
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
}
},
"description": "PermissionDenied"
@ -23276,11 +23362,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
},
@ -23309,11 +23400,21 @@
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
@ -23415,11 +23516,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
}
@ -23431,6 +23537,26 @@
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
}
},
"description": "AlertingFileExport"
@ -23441,6 +23567,26 @@
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
}
},
"description": "PermissionDenied"
@ -23591,11 +23737,16 @@
}
},
{
"description": "Format of the downloaded file, either yaml or json. Accept header can also be used, but the query parameter will take precedence.",
"description": "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",
"name": "format",
"schema": {
"default": "yaml",
"enum": [
"yaml",
"json",
"hcl"
],
"type": "string"
}
},
@ -23616,6 +23767,26 @@
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
}
},
"description": "AlertingFileExport"
@ -23626,6 +23797,26 @@
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/PermissionDenied"
}
}
},
"description": "PermissionDenied"
@ -23736,6 +23927,26 @@
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/AlertingFileExport"
}
}
},
"description": "AlertingFileExport"
@ -23746,6 +23957,26 @@
"schema": {
"$ref": "#/components/schemas/NotFound"
}
},
"application/terraform+hcl": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
},
"application/yaml": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
},
"text/hcl": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
},
"text/yaml": {
"schema": {
"$ref": "#/components/schemas/NotFound"
}
}
},
"description": "NotFound"

Loading…
Cancel
Save