The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/pkg/services/ngalert/api/tooling/spec.json

5571 lines
149 KiB

{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"description": "Package definitions includes the types required for generating or consuming an OpenAPI\nspec for the Grafana Alerting API.",
"title": "Grafana Alerting API.",
"version": "1.1.0"
},
"basePath": "/api/v1",
"paths": {
"/api/alertmanager/grafana/api/v2/alerts": {
"get": {
"description": "get alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaAMAlerts",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
}
],
"responses": {
"200": {
"description": "gettableAlerts",
"schema": {
"$ref": "#/definitions/gettableAlerts"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RoutePostGrafanaAMAlerts",
"parameters": [
{
"name": "PostableAlerts",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
}
}
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/api/v2/alerts/groups": {
"get": {
"description": "get alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaAMAlertGroups",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
}
],
"responses": {
"200": {
"description": "alertGroups",
"schema": {
"$ref": "#/definitions/alertGroups"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/api/v2/silence/{SilenceId}": {
"get": {
"description": "get silence",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "delete silence",
"tags": [
"alertmanager"
],
"operationId": "RouteDeleteGrafanaSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/api/v2/silences": {
"get": {
"description": "get silences",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaSilences",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Filter",
"name": "filter",
"in": "query"
}
],
"responses": {
"200": {
"description": "gettableSilences",
"schema": {
"$ref": "#/definitions/gettableSilences"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create silence",
"tags": [
"alertmanager"
],
"operationId": "RouteCreateGrafanaSilence",
"parameters": [
{
"name": "Silence",
"in": "body",
"schema": {
"$ref": "#/definitions/postableSilence"
}
}
],
"responses": {
"201": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/api/v2/status": {
"get": {
"description": "get alertmanager status and configuration",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaAMStatus",
"responses": {
"200": {
"description": "GettableStatus",
"schema": {
"$ref": "#/definitions/GettableStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/config/api/v1/alerts": {
"get": {
"description": "gets an Alerting config",
"tags": [
"alertmanager"
],
"operationId": "RouteGetGrafanaAlertingConfig",
"responses": {
"200": {
"description": "GettableUserConfig",
"schema": {
"$ref": "#/definitions/GettableUserConfig"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "sets an Alerting config",
"tags": [
"alertmanager"
],
"operationId": "RoutePostGrafanaAlertingConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableUserConfig"
}
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "deletes the Alerting config for a tenant",
"tags": [
"alertmanager"
],
"operationId": "RouteDeleteGrafanaAlertingConfig",
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/grafana/config/api/v1/receivers/test": {
"post": {
"tags": [
"alertmanager"
],
"summary": "Test Grafana managed receivers without saving them.",
"operationId": "RoutePostTestGrafanaReceivers",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestReceiversConfigBodyParams"
}
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"207": {
"description": "MultiStatus",
"schema": {
"$ref": "#/definitions/MultiStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"403": {
"description": "PermissionDenied",
"schema": {
"$ref": "#/definitions/PermissionDenied"
}
},
"404": {
"description": "AlertManagerNotFound",
"schema": {
"$ref": "#/definitions/AlertManagerNotFound"
}
},
"408": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"409": {
"description": "AlertManagerNotReady",
"schema": {
"$ref": "#/definitions/AlertManagerNotReady"
}
}
}
}
},
"/api/alertmanager/{Recipient}/api/v2/alerts": {
"get": {
"description": "get alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RouteGetAMAlerts",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableAlerts",
"schema": {
"$ref": "#/definitions/gettableAlerts"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RoutePostAMAlerts",
"parameters": [
{
"name": "PostableAlerts",
"in": "body",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
}
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/api/v2/alerts/groups": {
"get": {
"description": "get alertmanager alerts",
"tags": [
"alertmanager"
],
"operationId": "RouteGetAMAlertGroups",
"parameters": [
{
"type": "boolean",
"default": true,
"x-go-name": "Active",
"description": "Show active alerts",
"name": "active",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Silenced",
"description": "Show silenced alerts",
"name": "silenced",
"in": "query"
},
{
"type": "boolean",
"default": true,
"x-go-name": "Inhibited",
"description": "Show inhibited alerts",
"name": "inhibited",
"in": "query"
},
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Matchers",
"description": "A list of matchers to filter alerts by",
"name": "filter",
"in": "query"
},
{
"type": "string",
"x-go-name": "Receivers",
"description": "A regex matching receivers to filter alerts by",
"name": "receiver",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "alertGroups",
"schema": {
"$ref": "#/definitions/alertGroups"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/api/v2/silence/{SilenceId}": {
"get": {
"description": "get silence",
"tags": [
"alertmanager"
],
"operationId": "RouteGetSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "delete silence",
"tags": [
"alertmanager"
],
"operationId": "RouteDeleteSilence",
"parameters": [
{
"type": "string",
"name": "SilenceId",
"in": "path",
"required": true
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/api/v2/silences": {
"get": {
"description": "get silences",
"tags": [
"alertmanager"
],
"operationId": "RouteGetSilences",
"parameters": [
{
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Filter",
"name": "filter",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "gettableSilences",
"schema": {
"$ref": "#/definitions/gettableSilences"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "create silence",
"tags": [
"alertmanager"
],
"operationId": "RouteCreateSilence",
"parameters": [
{
"name": "Silence",
"in": "body",
"schema": {
"$ref": "#/definitions/postableSilence"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "gettableSilence",
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/api/v2/status": {
"get": {
"description": "get alertmanager status and configuration",
"tags": [
"alertmanager"
],
"operationId": "RouteGetAMStatus",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "GettableStatus",
"schema": {
"$ref": "#/definitions/GettableStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/config/api/v1/alerts": {
"get": {
"description": "gets an Alerting config",
"tags": [
"alertmanager"
],
"operationId": "RouteGetAlertingConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "GettableUserConfig",
"schema": {
"$ref": "#/definitions/GettableUserConfig"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"description": "sets an Alerting config",
"tags": [
"alertmanager"
],
"operationId": "RoutePostAlertingConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableUserConfig"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"description": "deletes the Alerting config for a tenant",
"tags": [
"alertmanager"
],
"operationId": "RouteDeleteAlertingConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/alertmanager/{Recipient}/config/api/v1/receivers/test": {
"post": {
"tags": [
"alertmanager"
],
"summary": "Test Grafana managed receivers without saving them.",
"operationId": "RoutePostTestReceivers",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestReceiversConfigBodyParams"
}
},
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"207": {
"description": "MultiStatus",
"schema": {
"$ref": "#/definitions/MultiStatus"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
},
"403": {
"description": "PermissionDenied",
"schema": {
"$ref": "#/definitions/PermissionDenied"
}
},
"404": {
"description": "AlertManagerNotFound",
"schema": {
"$ref": "#/definitions/AlertManagerNotFound"
}
},
"408": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"409": {
"description": "AlertManagerNotReady",
"schema": {
"$ref": "#/definitions/AlertManagerNotReady"
}
}
}
}
},
"/api/prometheus/grafana/api/v1/alerts": {
"get": {
"description": "gets the current alerts",
"tags": [
"prometheus"
],
"operationId": "RouteGetGrafanaAlertStatuses",
"parameters": [
{
"type": "boolean",
"default": false,
"x-go-name": "IncludeInternalLabels",
"description": "Include Grafana specific labels as part of the response.",
"name": "includeInternalLabels",
"in": "query"
}
],
"responses": {
"200": {
"description": "AlertResponse",
"schema": {
"$ref": "#/definitions/AlertResponse"
}
}
}
}
},
"/api/prometheus/grafana/api/v1/rules": {
"get": {
"description": "gets the evaluation statuses of all rules",
"tags": [
"prometheus"
],
"operationId": "RouteGetGrafanaRuleStatuses",
"parameters": [
{
"type": "boolean",
"default": false,
"x-go-name": "IncludeInternalLabels",
"description": "Include Grafana specific labels as part of the response.",
"name": "includeInternalLabels",
"in": "query"
},
{
"type": "string",
"description": "Filter the list of rules to those that belong to the specified dashboard UID.",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"description": "Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified.",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"200": {
"description": "RuleResponse",
"schema": {
"$ref": "#/definitions/RuleResponse"
}
}
}
}
},
"/api/prometheus/{Recipient}/api/v1/alerts": {
"get": {
"description": "gets the current alerts",
"tags": [
"prometheus"
],
"operationId": "RouteGetAlertStatuses",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "AlertResponse",
"schema": {
"$ref": "#/definitions/AlertResponse"
}
}
}
}
},
"/api/prometheus/{Recipient}/api/v1/rules": {
"get": {
"description": "gets the evaluation statuses of all rules",
"tags": [
"prometheus"
],
"operationId": "RouteGetRuleStatuses",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "RuleResponse",
"schema": {
"$ref": "#/definitions/RuleResponse"
}
}
}
}
},
"/api/provisioning/contact-points": {
"get": {
"tags": [
"provisioning"
],
"summary": "Get all the contact points.",
"operationId": "RouteGetContactpoints",
"responses": {
"200": {
"description": "Route",
"schema": {
"$ref": "#/definitions/Route"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"put": {
"consumes": [
"application/json"
],
"tags": [
"provisioning"
],
"summary": "Update an existing contact point.",
"operationId": "RoutePutContactpoints",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/EmbeddedContactPoint"
}
}
],
"responses": {
"202": {
"$ref": "#/responses/Accepted"
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"tags": [
"provisioning"
],
"summary": "Create a contact point.",
"operationId": "RoutePostContactpoints",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/EmbeddedContactPoint"
}
}
],
"responses": {
"202": {
"$ref": "#/responses/Accepted"
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/provisioning/contact-points/{ID}": {
"delete": {
"consumes": [
"application/json"
],
"tags": [
"provisioning"
],
"summary": "Delete a contact point.",
"operationId": "RouteDeleteContactpoints",
"responses": {
"202": {
"$ref": "#/responses/Accepted"
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/provisioning/policies": {
"get": {
"tags": [
"provisioning"
],
"summary": "Get the notification policy tree.",
"operationId": "RouteGetPolicyTree",
"responses": {
"200": {
"description": "Route",
"schema": {
"$ref": "#/definitions/Route"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"tags": [
"provisioning"
],
"summary": "Sets the notification policy tree.",
"operationId": "RoutePostPolicyTree",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/Route"
}
}
],
"responses": {
"202": {
"$ref": "#/responses/Accepted"
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
},
"/api/ruler/grafana/api/v1/rules": {
"get": {
"description": "List rule groups",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
}
},
"/api/ruler/grafana/api/v1/rules/{Namespace}": {
"get": {
"description": "Get rule groups by namespace",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetNamespaceGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
},
"post": {
"description": "Creates or updates a rule group",
"consumes": [
"application/json",
"application/yaml"
],
"tags": [
"ruler"
],
"operationId": "RoutePostNameGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableRuleGroupConfig"
}
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
},
"delete": {
"description": "Delete namespace",
"tags": [
"ruler"
],
"operationId": "RouteDeleteNamespaceGrafanaRulesConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/api/ruler/grafana/api/v1/rules/{Namespace}/{Groupname}": {
"get": {
"description": "Get rule group",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetGrafanaRuleGroupConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "RuleGroupConfigResponse",
"schema": {
"$ref": "#/definitions/RuleGroupConfigResponse"
}
}
}
},
"delete": {
"description": "Delete rule group",
"tags": [
"ruler"
],
"operationId": "RouteDeleteGrafanaRuleGroupConfig",
"parameters": [
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/api/ruler/{Recipient}/api/v1/rules": {
"get": {
"description": "List rule groups",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "DashboardUID",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"name": "PanelID",
"in": "query"
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
}
},
"/api/ruler/{Recipient}/api/v1/rules/{Namespace}": {
"get": {
"description": "Get rule groups by namespace",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetNamespaceRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "NamespaceConfigResponse",
"schema": {
"$ref": "#/definitions/NamespaceConfigResponse"
}
}
}
},
"post": {
"description": "Creates or updates a rule group",
"consumes": [
"application/json",
"application/yaml"
],
"tags": [
"ruler"
],
"operationId": "RoutePostNameRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableRuleGroupConfig"
}
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
},
"delete": {
"description": "Delete namespace",
"tags": [
"ruler"
],
"operationId": "RouteDeleteNamespaceRulesConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/api/ruler/{Recipient}/api/v1/rules/{Namespace}/{Groupname}": {
"get": {
"description": "Get rule group",
"produces": [
"application/json"
],
"tags": [
"ruler"
],
"operationId": "RouteGetRulegGroupConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "RuleGroupConfigResponse",
"schema": {
"$ref": "#/definitions/RuleGroupConfigResponse"
}
}
}
},
"delete": {
"description": "Delete rule group",
"tags": [
"ruler"
],
"operationId": "RouteDeleteRuleGroupConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Namespace",
"in": "path",
"required": true
},
{
"type": "string",
"name": "Groupname",
"in": "path",
"required": true
}
],
"responses": {
"202": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
}
}
}
},
"/api/v1/eval": {
"post": {
"description": "Test rule",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"testing"
],
"operationId": "RouteEvalQueries",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/EvalQueriesPayload"
}
}
],
"responses": {
"200": {
"description": "EvalQueriesResponse",
"schema": {
"$ref": "#/definitions/EvalQueriesResponse"
}
}
}
}
},
"/api/v1/ngalert/admin_config": {
"get": {
"produces": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "Get the NGalert configuration of the user's organization, returns 404 if no configuration is present.",
"operationId": "RouteGetNGalertConfig",
"responses": {
"200": {
"description": "GettableNGalertConfig",
"schema": {
"$ref": "#/definitions/GettableNGalertConfig"
}
},
"404": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
},
"500": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
}
}
},
"post": {
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "Creates or updates the NGalert configuration of the user's organization. If no value is sent for alertmanagersChoice, it defaults to \"all\".",
"operationId": "RoutePostNGalertConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/PostableNGalertConfig"
}
}
],
"responses": {
"201": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
},
"delete": {
"consumes": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "Deletes the NGalert configuration of the user's organization.",
"operationId": "RouteDeleteNGalertConfig",
"responses": {
"200": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"500": {
"description": "Failure",
"schema": {
"$ref": "#/definitions/Failure"
}
}
}
}
},
"/api/v1/ngalert/alertmanagers": {
"get": {
"produces": [
"application/json"
],
"tags": [
"configuration"
],
"summary": "Get the discovered and dropped Alertmanagers of the user's organization based on the specified configuration.",
"operationId": "RouteGetAlertmanagers",
"responses": {
"200": {
"description": "GettableAlertmanagers",
"schema": {
"$ref": "#/definitions/GettableAlertmanagers"
}
}
}
}
},
"/api/v1/rule/test/grafana": {
"post": {
"description": "Test a rule against Grafana ruler",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"testing"
],
"operationId": "RouteTestRuleGrafanaConfig",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestRulePayload"
}
}
],
"responses": {
"200": {
"description": "TestRuleResponse",
"schema": {
"$ref": "#/definitions/TestRuleResponse"
}
}
}
}
},
"/api/v1/rule/test/{Recipient}": {
"post": {
"description": "Test a rule against external data source ruler",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"tags": [
"testing"
],
"operationId": "RouteTestRuleConfig",
"parameters": [
{
"type": "integer",
"format": "int64",
"description": "Recipient should be the numeric datasource id",
"name": "Recipient",
"in": "path",
"required": true
},
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/TestRulePayload"
}
}
],
"responses": {
"200": {
"description": "TestRuleResponse",
"schema": {
"$ref": "#/definitions/TestRuleResponse"
}
}
}
}
}
},
"definitions": {
"Ack": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Alert": {
"type": "object",
"title": "Alert has info for an alert.",
"required": [
"labels",
"annotations",
"state",
"value"
],
"properties": {
"activeAt": {
"type": "string",
"format": "date-time",
"x-go-name": "ActiveAt"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"state": {
"type": "string",
"x-go-name": "State"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertDiscovery": {
"type": "object",
"title": "AlertDiscovery has info for all active alerts.",
"required": [
"alerts"
],
"properties": {
"alerts": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
},
"x-go-name": "Alerts"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertInstancesResponse": {
"type": "object",
"properties": {
"instances": {
"description": "Instances is an array of arrow encoded dataframes\neach frame has a single row, and a column for each instance (alert identified by unique labels) with a boolean value (firing/not firing)",
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
},
"x-go-name": "Instances"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertManager": {
"type": "object",
"title": "AlertManager models a configured Alert Manager.",
"properties": {
"url": {
"type": "string",
"x-go-name": "URL"
}
},
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"AlertManagerNotFound": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertManagerNotReady": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertManagersResult": {
"type": "object",
"title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.",
"properties": {
"activeAlertManagers": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertManager"
},
"x-go-name": "Active"
},
"droppedAlertManagers": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertManager"
},
"x-go-name": "Dropped"
}
},
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"AlertQuery": {
"type": "object",
"title": "AlertQuery represents a single query associated with an alert definition.",
"properties": {
"datasourceUid": {
"description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.",
"type": "string",
"x-go-name": "DatasourceUID"
},
"model": {
"description": "JSON is the raw JSON query and includes the above properties as well as custom properties.",
"type": "object",
"x-go-name": "Model"
},
"queryType": {
"description": "QueryType is an optional identifier for the type of query.\nIt can be used to distinguish different types of queries.",
"type": "string",
"x-go-name": "QueryType"
},
"refId": {
"description": "RefID is the unique identifier of the query, set by the frontend call.",
"type": "string",
"x-go-name": "RefID"
},
"relativeTimeRange": {
"$ref": "#/definitions/RelativeTimeRange"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"AlertResponse": {
"type": "object",
"required": [
"status"
],
"properties": {
"data": {
"$ref": "#/definitions/AlertDiscovery"
},
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"AlertingRule": {
"description": "adapted from cortex",
"type": "object",
"required": [
"name",
"query",
"health",
"type",
"state",
"annotations",
"alerts"
],
"properties": {
"alerts": {
"type": "array",
"items": {
"$ref": "#/definitions/Alert"
},
"x-go-name": "Alerts"
},
"annotations": {
"$ref": "#/definitions/overrideLabels"
},
"duration": {
"type": "number",
"format": "double",
"x-go-name": "Duration"
},
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"health": {
"type": "string",
"x-go-name": "Health"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"lastError": {
"type": "string",
"x-go-name": "LastError"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"query": {
"type": "string",
"x-go-name": "Query"
},
"state": {
"description": "State can be \"pending\", \"firing\", \"inactive\".",
"type": "string",
"x-go-name": "State"
},
"type": {
"$ref": "#/definitions/RuleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"ApiRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Authorization": {
"type": "object",
"title": "Authorization contains HTTP authorization credentials.",
"properties": {
"credentials": {
"$ref": "#/definitions/Secret"
},
"credentials_file": {
"type": "string",
"x-go-name": "CredentialsFile"
},
"type": {
"type": "string",
"x-go-name": "Type"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"BasicAuth": {
"type": "object",
"title": "BasicAuth contains basic HTTP authentication credentials.",
"properties": {
"password": {
"$ref": "#/definitions/Secret"
},
"password_file": {
"type": "string",
"x-go-name": "PasswordFile"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"Config": {
"type": "object",
"title": "Config is the top-level configuration for Alertmanager's config files.",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"CreateDashboardSnapshotCommand": {
"type": "object",
"required": [
"dashboard"
],
"properties": {
"Result": {
"$ref": "#/definitions/DashboardSnapshot"
},
"dashboard": {
"$ref": "#/definitions/Json"
},
"deleteKey": {
"description": "Unique key used to delete the snapshot. It is different from the `key` so that only the creator can delete the snapshot. Required if `external` is `true`.",
"type": "string",
"x-go-name": "DeleteKey"
},
"expires": {
"description": "When the snapshot should expire in seconds in seconds. Default is never to expire.",
"type": "integer",
"format": "int64",
"default": 0,
"x-go-name": "Expires"
},
"external": {
"description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.",
"type": "boolean",
"default": false,
"x-go-name": "External"
},
"key": {
"description": "Define the unique key. Required if `external` is `true`.",
"type": "string",
"x-go-name": "Key"
},
"name": {
"description": "Snapshot name",
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DashboardSnapshot": {
"description": "DashboardSnapshot model",
"type": "object",
"properties": {
"Created": {
"type": "string",
"format": "date-time"
},
"Dashboard": {
"$ref": "#/definitions/Json"
},
"DashboardEncrypted": {
"type": "array",
"items": {
"type": "integer",
"format": "uint8"
}
},
"DeleteKey": {
"type": "string"
},
"Expires": {
"type": "string",
"format": "date-time"
},
"External": {
"type": "boolean"
},
"ExternalDeleteUrl": {
"type": "string"
},
"ExternalUrl": {
"type": "string"
},
"Id": {
"type": "integer",
"format": "int64"
},
"Key": {
"type": "string"
},
"Name": {
"type": "string"
},
"OrgId": {
"type": "integer",
"format": "int64"
},
"Updated": {
"type": "string",
"format": "date-time"
},
"UserId": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"DateTime": {
"description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.",
"type": "string",
"format": "date-time",
"x-go-package": "github.com/go-openapi/strfmt"
},
"DayOfMonthRange": {
"type": "object",
"title": "A DayOfMonthRange is an inclusive range that may have negative Beginning/End values that represent distance from the End of the month Beginning at -1.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"DiscoveryBase": {
"type": "object",
"required": [
"status"
],
"properties": {
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"DsPermissionType": {
"description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1",
"type": "integer",
"format": "int64",
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Duration": {
"type": "integer",
"format": "int64",
"title": "Duration is a type used for marshalling durations.",
"$ref": "#/definitions/Duration"
},
"EmailConfig": {
"type": "object",
"title": "EmailConfig configures notifications via mail.",
"properties": {
"auth_identity": {
"type": "string",
"x-go-name": "AuthIdentity"
},
"auth_password": {
"$ref": "#/definitions/Secret"
},
"auth_secret": {
"$ref": "#/definitions/Secret"
},
"auth_username": {
"type": "string",
"x-go-name": "AuthUsername"
},
"from": {
"type": "string",
"x-go-name": "From"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Headers"
},
"hello": {
"type": "string",
"x-go-name": "Hello"
},
"html": {
"type": "string",
"x-go-name": "HTML"
},
"require_tls": {
"type": "boolean",
"x-go-name": "RequireTLS"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"smarthost": {
"$ref": "#/definitions/HostPort"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
},
"to": {
"description": "Email address to notify.",
"type": "string",
"x-go-name": "To"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"EmbeddedContactPoint": {
"description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.",
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"provanance": {
"type": "string",
"x-go-name": "Provenance"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"ErrorType": {
"type": "string",
"title": "ErrorType models the different API error types.",
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"EvalAlertConditionCommand": {
"description": "EvalAlertConditionCommand is the command for evaluating a condition",
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"now": {
"type": "string",
"format": "date-time",
"x-go-name": "Now"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"EvalQueriesPayload": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"now": {
"type": "string",
"format": "date-time",
"x-go-name": "Now"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"EvalQueriesResponse": {
"$ref": "#/definitions/EvalQueriesResponse"
},
"ExtendedReceiver": {
"type": "object",
"properties": {
"email_configs": {
"$ref": "#/definitions/EmailConfig"
},
"grafana_managed_receiver": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"opsgenie_configs": {
"$ref": "#/definitions/OpsGenieConfig"
},
"pagerduty_configs": {
"$ref": "#/definitions/PagerdutyConfig"
},
"pushover_configs": {
"$ref": "#/definitions/PushoverConfig"
},
"slack_configs": {
"$ref": "#/definitions/SlackConfig"
},
"victorops_configs": {
"$ref": "#/definitions/VictorOpsConfig"
},
"webhook_configs": {
"$ref": "#/definitions/WebhookConfig"
},
"wechat_configs": {
"$ref": "#/definitions/WechatConfig"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Failure": {
"$ref": "#/definitions/ResponseDetails"
},
"GettableAlertmanagers": {
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/AlertManagersResult"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableApiAlertingConfig": {
"type": "object",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"receivers": {
"description": "Override with our superset receiver type",
"type": "array",
"items": {
"$ref": "#/definitions/GettableApiReceiver"
},
"x-go-name": "Receivers"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableApiReceiver": {
"type": "object",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableExtendedRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"grafana_alert": {
"$ref": "#/definitions/GettableGrafanaRule"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaReceiver": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureFields": {
"type": "object",
"additionalProperties": {
"type": "boolean"
},
"x-go-name": "SecureFields"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaReceivers": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableGrafanaRule": {
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"exec_err_state": {
"type": "string",
"enum": [
"OK",
"Alerting",
"Error"
],
"x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState",
"x-go-name": "ExecErrState"
},
"id": {
"type": "integer",
"format": "int64",
"x-go-name": "ID"
},
"intervalSeconds": {
"type": "integer",
"format": "int64",
"x-go-name": "IntervalSeconds"
},
"namespace_id": {
"type": "integer",
"format": "int64",
"x-go-name": "NamespaceID"
},
"namespace_uid": {
"type": "string",
"x-go-name": "NamespaceUID"
},
"no_data_state": {
"type": "string",
"enum": [
"Alerting",
"NoData",
"OK"
],
"x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK",
"x-go-name": "NoDataState"
},
"orgId": {
"type": "integer",
"format": "int64",
"x-go-name": "OrgID"
},
"rule_group": {
"type": "string",
"x-go-name": "RuleGroup"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
},
"updated": {
"type": "string",
"format": "date-time",
"x-go-name": "Updated"
},
"version": {
"type": "integer",
"format": "int64",
"x-go-name": "Version"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableNGalertConfig": {
"type": "object",
"properties": {
"alertmanagers": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Alertmanagers"
},
"alertmanagersChoice": {
"type": "string",
"enum": [
"all",
"internal",
"external"
],
"x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers",
"x-go-name": "AlertmanagersChoice"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableRuleGroupConfig": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableExtendedRuleNode"
},
"x-go-name": "Rules"
},
"source_tenants": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "SourceTenants"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableStatus": {
"type": "object",
"required": [
"cluster",
"config",
"uptime",
"versionInfo"
],
"properties": {
"cluster": {
"$ref": "#/definitions/clusterStatus"
},
"config": {
"$ref": "#/definitions/PostableApiAlertingConfig"
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time",
"x-go-name": "Uptime"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GettableUserConfig": {
"type": "object",
"properties": {
"alertmanager_config": {
"$ref": "#/definitions/GettableApiAlertingConfig"
},
"template_files": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TemplateFiles"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"GlobalConfig": {
"description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.",
"type": "object",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"opsgenie_api_key": {
"$ref": "#/definitions/Secret"
},
"opsgenie_api_key_file": {
"type": "string",
"x-go-name": "OpsGenieAPIKeyFile"
},
"opsgenie_api_url": {
"$ref": "#/definitions/URL"
},
"pagerduty_url": {
"$ref": "#/definitions/URL"
},
"resolve_timeout": {
"$ref": "#/definitions/Duration"
},
"slack_api_url": {
"$ref": "#/definitions/SecretURL"
},
"slack_api_url_file": {
"type": "string",
"x-go-name": "SlackAPIURLFile"
},
"smtp_auth_identity": {
"type": "string",
"x-go-name": "SMTPAuthIdentity"
},
"smtp_auth_password": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_secret": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_username": {
"type": "string",
"x-go-name": "SMTPAuthUsername"
},
"smtp_from": {
"type": "string",
"x-go-name": "SMTPFrom"
},
"smtp_hello": {
"type": "string",
"x-go-name": "SMTPHello"
},
"smtp_require_tls": {
"type": "boolean",
"x-go-name": "SMTPRequireTLS"
},
"smtp_smarthost": {
"$ref": "#/definitions/HostPort"
},
"victorops_api_key": {
"$ref": "#/definitions/Secret"
},
"victorops_api_url": {
"$ref": "#/definitions/URL"
},
"wechat_api_corp_id": {
"type": "string",
"x-go-name": "WeChatAPICorpID"
},
"wechat_api_secret": {
"$ref": "#/definitions/Secret"
},
"wechat_api_url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"HTTPClientConfig": {
"type": "object",
"title": "HTTPClientConfig configures an HTTP client.",
"properties": {
"authorization": {
"$ref": "#/definitions/Authorization"
},
"basic_auth": {
"$ref": "#/definitions/BasicAuth"
},
"bearer_token": {
"$ref": "#/definitions/Secret"
},
"bearer_token_file": {
"description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.",
"type": "string",
"x-go-name": "BearerTokenFile"
},
"follow_redirects": {
"description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean",
"x-go-name": "FollowRedirects"
},
"oauth2": {
"$ref": "#/definitions/OAuth2"
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"HostPort": {
"type": "object",
"title": "HostPort represents a \"host:port\" network address.",
"properties": {
"Host": {
"type": "string"
},
"Port": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"InclusiveRange": {
"type": "object",
"title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"InhibitRule": {
"description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.",
"type": "object",
"properties": {
"equal": {
"$ref": "#/definitions/LabelNames"
},
"source_match": {
"description": "SourceMatch defines a set of labels that have to equal the given\nvalue for source alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SourceMatch"
},
"source_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"source_matchers": {
"$ref": "#/definitions/Matchers"
},
"target_match": {
"description": "TargetMatch defines a set of labels that have to equal the given\nvalue for target alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TargetMatch"
},
"target_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"target_matchers": {
"$ref": "#/definitions/Matchers"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Json": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/components/simplejson"
},
"Label": {
"type": "object",
"title": "Label is a key/value pair of strings.",
"properties": {
"Name": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/prometheus/pkg/labels"
},
"LabelName": {
"description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.",
"type": "string",
"x-go-package": "github.com/prometheus/common/model"
},
"LabelNames": {
"type": "array",
"title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.",
"items": {
"$ref": "#/definitions/LabelName"
},
"x-go-package": "github.com/prometheus/common/model"
},
"LabelSet": {
"description": "A LabelSet is a collection of LabelName and LabelValue pairs. The LabelSet\nmay be fully-qualified down to the point where it may resolve to a single\nMetric in the data store or not. All operations that occur within the realm\nof a LabelSet can emit a vector of Metric entities to which the LabelSet may\nmatch.",
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/LabelValue"
},
"x-go-package": "github.com/prometheus/common/model"
},
"LabelValue": {
"type": "string",
"title": "A LabelValue is an associated value for a LabelName.",
"x-go-package": "github.com/prometheus/common/model"
},
"Labels": {
"description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.",
"type": "array",
"items": {
"$ref": "#/definitions/Label"
},
"x-go-package": "github.com/prometheus/prometheus/pkg/labels"
},
"MatchRegexps": {
"type": "object",
"title": "MatchRegexps represents a map of Regexp.",
"additionalProperties": {
"$ref": "#/definitions/Regexp"
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"MatchType": {
"type": "integer",
"format": "int64",
"title": "MatchType is an enum for label matching types.",
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matcher": {
"type": "object",
"title": "Matcher models the matching of a label.",
"properties": {
"Name": {
"type": "string"
},
"Type": {
"$ref": "#/definitions/MatchType"
},
"Value": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matchers": {
"description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.",
"type": "array",
"items": {
"$ref": "#/definitions/Matcher"
},
"$ref": "#/definitions/Matchers"
},
"MonthRange": {
"type": "object",
"title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"MultiStatus": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"MuteTimeInterval": {
"type": "object",
"title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.",
"properties": {
"name": {
"type": "string",
"x-go-name": "Name"
},
"time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/TimeInterval"
},
"x-go-name": "TimeIntervals"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"NamespaceConfigResponse": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableRuleGroupConfig"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"NotifierConfig": {
"type": "object",
"title": "NotifierConfig contains base options common across all notifier configurations.",
"properties": {
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OAuth2": {
"type": "object",
"title": "OAuth2 is the oauth2 client configuration.",
"properties": {
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
},
"client_id": {
"type": "string",
"x-go-name": "ClientID"
},
"client_secret": {
"$ref": "#/definitions/Secret"
},
"client_secret_file": {
"type": "string",
"x-go-name": "ClientSecretFile"
},
"endpoint_params": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "EndpointParams"
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Scopes"
},
"token_url": {
"type": "string",
"x-go-name": "TokenURL"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"ObjectMatchers": {
"description": "ObjectMatchers is Matchers with a different Unmarshal and Marshal methods that accept matchers as objects\nthat have already been parsed.",
"$ref": "#/definitions/Matchers"
},
"OpsGenieConfig": {
"type": "object",
"title": "OpsGenieConfig configures notifications via OpsGenie.",
"properties": {
"actions": {
"type": "string",
"x-go-name": "Actions"
},
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"type": "string",
"x-go-name": "APIKeyFile"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"entity": {
"type": "string",
"x-go-name": "Entity"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"note": {
"type": "string",
"x-go-name": "Note"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"responders": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfigResponder"
},
"x-go-name": "Responders"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"source": {
"type": "string",
"x-go-name": "Source"
},
"tags": {
"type": "string",
"x-go-name": "Tags"
},
"update_alerts": {
"type": "boolean",
"x-go-name": "UpdateAlerts"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OpsGenieConfigResponder": {
"type": "object",
"properties": {
"id": {
"description": "One of those 3 should be filled.",
"type": "string",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"type": {
"description": "team, user, escalation, schedule etc.",
"type": "string",
"x-go-name": "Type"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyConfig": {
"type": "object",
"title": "PagerdutyConfig configures notifications via PagerDuty.",
"properties": {
"class": {
"type": "string",
"x-go-name": "Class"
},
"client": {
"type": "string",
"x-go-name": "Client"
},
"client_url": {
"type": "string",
"x-go-name": "ClientURL"
},
"component": {
"type": "string",
"x-go-name": "Component"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyImage"
},
"x-go-name": "Images"
},
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyLink"
},
"x-go-name": "Links"
},
"routing_key": {
"$ref": "#/definitions/Secret"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"service_key": {
"$ref": "#/definitions/Secret"
},
"severity": {
"type": "string",
"x-go-name": "Severity"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyImage": {
"description": "PagerdutyImage is an image",
"type": "object",
"properties": {
"alt": {
"type": "string",
"x-go-name": "Alt"
},
"href": {
"type": "string",
"x-go-name": "Href"
},
"src": {
"type": "string",
"x-go-name": "Src"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyLink": {
"description": "PagerdutyLink is a link",
"type": "object",
"properties": {
"href": {
"type": "string",
"x-go-name": "Href"
},
"text": {
"type": "string",
"x-go-name": "Text"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PermissionDenied": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Point": {
"type": "object",
"title": "Point represents a single data point for a given timestamp.",
"properties": {
"T": {
"type": "integer",
"format": "int64"
},
"V": {
"type": "number",
"format": "double"
}
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"PostableApiAlertingConfig": {
"type": "object",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"mute_time_intervals": {
"type": "array",
"items": {
"$ref": "#/definitions/MuteTimeInterval"
},
"x-go-name": "MuteTimeIntervals"
},
"receivers": {
"description": "Override with our superset receiver type",
"type": "array",
"items": {
"$ref": "#/definitions/PostableApiReceiver"
},
"x-go-name": "Receivers"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableApiReceiver": {
"type": "object",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableExtendedRuleNode": {
"type": "object",
"properties": {
"alert": {
"type": "string",
"x-go-name": "Alert"
},
"annotations": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Annotations"
},
"expr": {
"type": "string",
"x-go-name": "Expr"
},
"for": {
"$ref": "#/definitions/Duration"
},
"grafana_alert": {
"$ref": "#/definitions/PostableGrafanaRule"
},
"labels": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Labels"
},
"record": {
"type": "string",
"x-go-name": "Record"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaReceiver": {
"type": "object",
"properties": {
"disableResolveMessage": {
"type": "boolean",
"x-go-name": "DisableResolveMessage"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"secureSettings": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SecureSettings"
},
"settings": {
"$ref": "#/definitions/Json"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaReceivers": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableGrafanaReceiver"
},
"x-go-name": "GrafanaManagedReceivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableGrafanaRule": {
"type": "object",
"properties": {
"condition": {
"type": "string",
"x-go-name": "Condition"
},
"data": {
"type": "array",
"items": {
"$ref": "#/definitions/AlertQuery"
},
"x-go-name": "Data"
},
"exec_err_state": {
"type": "string",
"enum": [
"OK",
"Alerting",
"Error"
],
"x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState",
"x-go-name": "ExecErrState"
},
"no_data_state": {
"type": "string",
"enum": [
"Alerting",
"NoData",
"OK"
],
"x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK",
"x-go-name": "NoDataState"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableNGalertConfig": {
"type": "object",
"properties": {
"alertmanagers": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Alertmanagers"
},
"alertmanagersChoice": {
"type": "string",
"enum": [
"all",
"internal",
"external"
],
"x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers",
"x-go-name": "AlertmanagersChoice"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableRuleGroupConfig": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableExtendedRuleNode"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PostableUserConfig": {
"type": "object",
"properties": {
"alertmanager_config": {
"$ref": "#/definitions/PostableApiAlertingConfig"
},
"template_files": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TemplateFiles"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"PushoverConfig": {
"type": "object",
"properties": {
"expire": {
"$ref": "#/definitions/duration"
},
"html": {
"type": "boolean",
"x-go-name": "HTML"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"retry": {
"$ref": "#/definitions/duration"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"sound": {
"type": "string",
"x-go-name": "Sound"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"token": {
"$ref": "#/definitions/Secret"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"url_title": {
"type": "string",
"x-go-name": "URLTitle"
},
"user_key": {
"$ref": "#/definitions/Secret"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Receiver": {
"type": "object",
"title": "Receiver configuration provides configuration on how to contact a receiver.",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"sns_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SNSConfig"
},
"x-go-name": "SNSConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Regexp": {
"description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.",
"type": "object",
"title": "Regexp is the representation of a compiled regular expression.",
"x-go-package": "regexp"
},
"RelativeTimeRange": {
"description": "RelativeTimeRange is the per query start and end time\nfor requests.",
"type": "object",
"properties": {
"from": {
"$ref": "#/definitions/Duration"
},
"to": {
"$ref": "#/definitions/Duration"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models"
},
"ResponseDetails": {
"type": "object",
"properties": {
"msg": {
"type": "string",
"x-go-name": "Msg"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Route": {
"description": "A Route is a node that contains definitions of how to handle alerts. This is modified\nfrom the upstream alertmanager in that it adds the ObjectMatchers property.",
"type": "object",
"properties": {
"continue": {
"type": "boolean",
"x-go-name": "Continue"
},
"group_by": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "GroupByStr"
},
"group_interval": {
"$ref": "#/definitions/Duration"
},
"group_wait": {
"$ref": "#/definitions/Duration"
},
"match": {
"description": "Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Match"
},
"match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"matchers": {
"$ref": "#/definitions/Matchers"
},
"mute_time_intervals": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "MuteTimeIntervals"
},
"object_matchers": {
"$ref": "#/definitions/ObjectMatchers"
},
"receiver": {
"type": "string",
"x-go-name": "Receiver"
},
"repeat_interval": {
"$ref": "#/definitions/Duration"
},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/Route"
},
"x-go-name": "Routes"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Rule": {
"description": "adapted from cortex",
"type": "object",
"required": [
"name",
"query",
"health",
"type"
],
"properties": {
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"health": {
"type": "string",
"x-go-name": "Health"
},
"labels": {
"$ref": "#/definitions/overrideLabels"
},
"lastError": {
"type": "string",
"x-go-name": "LastError"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"query": {
"type": "string",
"x-go-name": "Query"
},
"type": {
"$ref": "#/definitions/RuleType"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleDiscovery": {
"type": "object",
"required": [
"groups"
],
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/definitions/RuleGroup"
},
"x-go-name": "RuleGroups"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleGroup": {
"type": "object",
"required": [
"name",
"file",
"rules",
"interval"
],
"properties": {
"evaluationTime": {
"type": "number",
"format": "double",
"x-go-name": "EvaluationTime"
},
"file": {
"type": "string",
"x-go-name": "File"
},
"interval": {
"type": "number",
"format": "double",
"x-go-name": "Interval"
},
"lastEvaluation": {
"type": "string",
"format": "date-time",
"x-go-name": "LastEvaluation"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"description": "In order to preserve rule ordering, while exposing type (alerting or recording)\nspecific properties, both alerting and recording rules are exposed in the\nsame array.",
"type": "array",
"items": {
"$ref": "#/definitions/AlertingRule"
},
"x-go-name": "Rules"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleGroupConfigResponse": {
"type": "object",
"properties": {
"interval": {
"$ref": "#/definitions/Duration"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"rules": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableExtendedRuleNode"
},
"x-go-name": "Rules"
},
"source_tenants": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "SourceTenants"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleResponse": {
"type": "object",
"required": [
"status"
],
"properties": {
"data": {
"$ref": "#/definitions/RuleDiscovery"
},
"error": {
"type": "string",
"x-go-name": "Error"
},
"errorType": {
"$ref": "#/definitions/ErrorType"
},
"status": {
"type": "string",
"x-go-name": "Status"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"RuleType": {
"type": "string",
"title": "RuleType models the type of a rule.",
"x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1"
},
"SNSConfig": {
"type": "object",
"properties": {
"api_url": {
"type": "string",
"x-go-name": "APIUrl"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Attributes"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"phone_number": {
"type": "string",
"x-go-name": "PhoneNumber"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"sigv4": {
"$ref": "#/definitions/SigV4Config"
},
"subject": {
"type": "string",
"x-go-name": "Subject"
},
"target_arn": {
"type": "string",
"x-go-name": "TargetARN"
},
"topic_arn": {
"type": "string",
"x-go-name": "TopicARN"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Sample": {
"type": "object",
"title": "Sample is a single sample belonging to a metric.",
"properties": {
"Metric": {
"$ref": "#/definitions/Labels"
},
"T": {
"type": "integer",
"format": "int64"
},
"V": {
"type": "number",
"format": "double"
}
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"Secret": {
"type": "string",
"title": "Secret special type for storing secrets.",
"x-go-package": "github.com/prometheus/common/config"
},
"SecretURL": {
"title": "SecretURL is a URL that must not be revealed on marshaling.",
"$ref": "#/definitions/URL"
},
"SigV4Config": {
"description": "SigV4Config is the configuration for signing remote write requests with\nAWS's SigV4 verification process. Empty values will be retrieved using the\nAWS default credentials chain.",
"type": "object",
"properties": {
"AccessKey": {
"type": "string"
},
"Profile": {
"type": "string"
},
"Region": {
"type": "string"
},
"RoleARN": {
"type": "string"
},
"SecretKey": {
"$ref": "#/definitions/Secret"
}
},
"x-go-package": "github.com/prometheus/common/sigv4"
},
"SlackAction": {
"description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.",
"type": "object",
"title": "SlackAction configures a single Slack action that is sent with each notification.",
"properties": {
"confirm": {
"$ref": "#/definitions/SlackConfirmationField"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"style": {
"type": "string",
"x-go-name": "Style"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfig": {
"type": "object",
"title": "SlackConfig configures notifications via Slack.",
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackAction"
},
"x-go-name": "Actions"
},
"api_url": {
"$ref": "#/definitions/SecretURL"
},
"api_url_file": {
"type": "string",
"x-go-name": "APIURLFile"
},
"callback_id": {
"type": "string",
"x-go-name": "CallbackID"
},
"channel": {
"description": "Slack channel override, (like #other-channel or @username).",
"type": "string",
"x-go-name": "Channel"
},
"color": {
"type": "string",
"x-go-name": "Color"
},
"fallback": {
"type": "string",
"x-go-name": "Fallback"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackField"
},
"x-go-name": "Fields"
},
"footer": {
"type": "string",
"x-go-name": "Footer"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"icon_emoji": {
"type": "string",
"x-go-name": "IconEmoji"
},
"icon_url": {
"type": "string",
"x-go-name": "IconURL"
},
"image_url": {
"type": "string",
"x-go-name": "ImageURL"
},
"link_names": {
"type": "boolean",
"x-go-name": "LinkNames"
},
"mrkdwn_in": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "MrkdwnIn"
},
"pretext": {
"type": "string",
"x-go-name": "Pretext"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"short_fields": {
"type": "boolean",
"x-go-name": "ShortFields"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"thumb_url": {
"type": "string",
"x-go-name": "ThumbURL"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"title_link": {
"type": "string",
"x-go-name": "TitleLink"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfirmationField": {
"description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.",
"type": "object",
"properties": {
"dismiss_text": {
"type": "string",
"x-go-name": "DismissText"
},
"ok_text": {
"type": "string",
"x-go-name": "OkText"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"title": {
"type": "string",
"x-go-name": "Title"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackField": {
"description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.",
"type": "object",
"title": "SlackField configures a single Slack field that is sent with each notification.",
"properties": {
"short": {
"type": "boolean",
"x-go-name": "Short"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SmtpNotEnabled": {
"$ref": "#/definitions/ResponseDetails"
},
"Success": {
"$ref": "#/definitions/ResponseDetails"
},
"TLSConfig": {
"type": "object",
"title": "TLSConfig configures the options for TLS connections.",
"properties": {
"ca_file": {
"description": "The CA cert to use for the targets.",
"type": "string",
"x-go-name": "CAFile"
},
"cert_file": {
"description": "The client cert file for the targets.",
"type": "string",
"x-go-name": "CertFile"
},
"insecure_skip_verify": {
"description": "Disable target certificate validation.",
"type": "boolean",
"x-go-name": "InsecureSkipVerify"
},
"key_file": {
"description": "The client key file for the targets.",
"type": "string",
"x-go-name": "KeyFile"
},
"server_name": {
"description": "Used to verify the hostname for the targets.",
"type": "string",
"x-go-name": "ServerName"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"TestReceiverConfigResult": {
"type": "object",
"properties": {
"error": {
"type": "string",
"x-go-name": "Error"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"status": {
"type": "string",
"x-go-name": "Status"
},
"uid": {
"type": "string",
"x-go-name": "UID"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiverResult": {
"type": "object",
"properties": {
"grafana_managed_receiver_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/TestReceiverConfigResult"
},
"x-go-name": "Configs"
},
"name": {
"type": "string",
"x-go-name": "Name"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversConfigAlertParams": {
"type": "object",
"properties": {
"annotations": {
"$ref": "#/definitions/LabelSet"
},
"labels": {
"$ref": "#/definitions/LabelSet"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversConfigBodyParams": {
"type": "object",
"properties": {
"alert": {
"$ref": "#/definitions/TestReceiversConfigAlertParams"
},
"receivers": {
"type": "array",
"items": {
"$ref": "#/definitions/PostableApiReceiver"
},
"x-go-name": "Receivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestReceiversResult": {
"type": "object",
"properties": {
"alert": {
"$ref": "#/definitions/TestReceiversConfigAlertParams"
},
"notified_at": {
"type": "string",
"format": "date-time",
"x-go-name": "NotifiedAt"
},
"receivers": {
"type": "array",
"items": {
"$ref": "#/definitions/TestReceiverResult"
},
"x-go-name": "Receivers"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestRulePayload": {
"type": "object",
"properties": {
"expr": {
"type": "string",
"x-go-name": "Expr",
"example": "(node_filesystem_avail_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} node_filesystem_size_bytes{fstype!=\"\",job=\"integrations/node_exporter\"} * 100 \u003c 5 and node_filesystem_readonly{fstype!=\"\",job=\"integrations/node_exporter\"} == 0)"
},
"grafana_condition": {
"$ref": "#/definitions/EvalAlertConditionCommand"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TestRuleResponse": {
"type": "object",
"properties": {
"alerts": {
"$ref": "#/definitions/Vector"
},
"grafana_alert_instances": {
"$ref": "#/definitions/AlertInstancesResponse"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"TimeInterval": {
"description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.",
"type": "object",
"properties": {
"days_of_month": {
"type": "array",
"items": {
"$ref": "#/definitions/DayOfMonthRange"
},
"x-go-name": "DaysOfMonth"
},
"months": {
"type": "array",
"items": {
"$ref": "#/definitions/MonthRange"
},
"x-go-name": "Months"
},
"times": {
"type": "array",
"items": {
"$ref": "#/definitions/TimeRange"
},
"x-go-name": "Times"
},
"weekdays": {
"type": "array",
"items": {
"$ref": "#/definitions/WeekdayRange"
},
"x-go-name": "Weekdays"
},
"years": {
"type": "array",
"items": {
"$ref": "#/definitions/YearRange"
},
"x-go-name": "Years"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"TimeRange": {
"description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.",
"type": "object",
"title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.",
"properties": {
"EndMinute": {
"type": "integer",
"format": "int64"
},
"StartMinute": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"URL": {
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
},
"Fragment": {
"type": "string"
},
"Host": {
"type": "string"
},
"Opaque": {
"type": "string"
},
"Path": {
"type": "string"
},
"RawFragment": {
"type": "string"
},
"RawPath": {
"type": "string"
},
"RawQuery": {
"type": "string"
},
"Scheme": {
"type": "string"
},
"User": {
"$ref": "#/definitions/Userinfo"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"Userinfo": {
"description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
"type": "object",
"x-go-package": "net/url"
},
"ValidationError": {
"type": "object",
"properties": {
"msg": {
"type": "string",
"x-go-name": "Msg"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"Vector": {
"description": "Vector is basically only an alias for model.Samples, but the\ncontract is that in a Vector, all Samples have the same timestamp.",
"type": "array",
"items": {
"$ref": "#/definitions/Sample"
},
"x-go-package": "github.com/prometheus/prometheus/promql"
},
"VictorOpsConfig": {
"type": "object",
"title": "VictorOpsConfig configures notifications via VictorOps.",
"properties": {
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_key_file": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"custom_fields": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "CustomFields"
},
"entity_display_name": {
"type": "string",
"x-go-name": "EntityDisplayName"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"monitoring_tool": {
"type": "string",
"x-go-name": "MonitoringTool"
},
"routing_key": {
"type": "string",
"x-go-name": "RoutingKey"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"state_message": {
"type": "string",
"x-go-name": "StateMessage"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WebhookConfig": {
"type": "object",
"title": "WebhookConfig configures notifications via a generic webhook.",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"max_alerts": {
"description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.",
"type": "integer",
"format": "uint64",
"x-go-name": "MaxAlerts"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WechatConfig": {
"type": "object",
"title": "WechatConfig configures notifications via Wechat.",
"properties": {
"agent_id": {
"type": "string",
"x-go-name": "AgentID"
},
"api_secret": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"corp_id": {
"type": "string",
"x-go-name": "CorpID"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"to_party": {
"type": "string",
"x-go-name": "ToParty"
},
"to_tag": {
"type": "string",
"x-go-name": "ToTag"
},
"to_user": {
"type": "string",
"x-go-name": "ToUser"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WeekdayRange": {
"type": "object",
"title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"YearRange": {
"type": "object",
"title": "A YearRange is a positive inclusive range.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/prometheus/alertmanager/timeinterval"
},
"alert": {
"description": "Alert alert",
"type": "object",
"required": [
"labels"
],
"properties": {
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
}
},
"x-go-name": "Alert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
"labels",
"receiver"
],
"properties": {
"alerts": {
"description": "alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"x-go-name": "Alerts"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"receiver": {
"$ref": "#/definitions/receiver"
}
},
"$ref": "#/definitions/alertGroup"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
},
"$ref": "#/definitions/alertGroups"
},
"alertStatus": {
"description": "AlertStatus alert status",
"type": "object",
"required": [
"inhibitedBy",
"silencedBy",
"state"
],
"properties": {
"inhibitedBy": {
"description": "inhibited by",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "InhibitedBy"
},
"silencedBy": {
"description": "silenced by",
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "SilencedBy"
},
"state": {
"description": "state",
"type": "string",
"enum": [
"[unprocessed active suppressed]"
],
"x-go-name": "State"
}
},
"x-go-name": "AlertStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertmanagerConfig": {
"description": "AlertmanagerConfig alertmanager config",
"type": "object",
"required": [
"original"
],
"properties": {
"original": {
"description": "original",
"type": "string",
"x-go-name": "Original"
}
},
"x-go-name": "AlertmanagerConfig",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"alertmanagerStatus": {
"description": "AlertmanagerStatus alertmanager status",
"type": "object",
"required": [
"cluster",
"config",
"uptime",
"versionInfo"
],
"properties": {
"cluster": {
"$ref": "#/definitions/clusterStatus"
},
"config": {
"$ref": "#/definitions/alertmanagerConfig"
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time",
"x-go-name": "Uptime"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
}
},
"x-go-name": "AlertmanagerStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"clusterStatus": {
"description": "ClusterStatus cluster status",
"type": "object",
"required": [
"status"
],
"properties": {
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
},
"peers": {
"description": "peers",
"type": "array",
"items": {
"$ref": "#/definitions/peerStatus"
},
"x-go-name": "Peers"
},
"status": {
"description": "status",
"type": "string",
"enum": [
"[ready settling disabled]"
],
"x-go-name": "Status"
}
},
"x-go-name": "ClusterStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"duration": {
"$ref": "#/definitions/Duration"
},
"gettableAlert": {
"type": "object",
"required": [
"labels",
"annotations",
"endsAt",
"fingerprint",
"receivers",
"startsAt",
"status",
"updatedAt"
],
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"fingerprint": {
"description": "fingerprint",
"type": "string",
"x-go-name": "Fingerprint"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"receivers": {
"description": "receivers",
"type": "array",
"items": {
"$ref": "#/definitions/receiver"
},
"x-go-name": "Receivers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
},
"status": {
"$ref": "#/definitions/alertStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time",
"x-go-name": "UpdatedAt"
}
},
"x-go-name": "GettableAlert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/gettableAlert"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"$ref": "#/definitions/gettableAlerts"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
"createdBy",
"endsAt",
"matchers",
"startsAt",
"id",
"status",
"updatedAt"
],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"id": {
"description": "id",
"type": "string",
"x-go-name": "ID"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
},
"status": {
"$ref": "#/definitions/silenceStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time",
"x-go-name": "UpdatedAt"
}
},
"$ref": "#/definitions/gettableSilence"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
},
"$ref": "#/definitions/gettableSilences"
},
"labelSet": {
"description": "LabelSet label set",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "LabelSet",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"matcher": {
"description": "Matcher matcher",
"type": "object",
"required": [
"isRegex",
"name",
"value"
],
"properties": {
"isEqual": {
"description": "is equal",
"type": "boolean",
"x-go-name": "IsEqual"
},
"isRegex": {
"description": "is regex",
"type": "boolean",
"x-go-name": "IsRegex"
},
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
},
"value": {
"description": "value",
"type": "string",
"x-go-name": "Value"
}
},
"x-go-name": "Matcher",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"matchers": {
"description": "Matchers matchers",
"type": "array",
"items": {
"$ref": "#/definitions/matcher"
},
"x-go-name": "Matchers",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"overrideLabels": {
"description": "The custom marshaling for labels.Labels ends up doing this anyways.",
"type": "object",
"title": "override the labels type with a map for generation.",
"additionalProperties": {
"type": "string"
},
"x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions"
},
"peerStatus": {
"description": "PeerStatus peer status",
"type": "object",
"required": [
"address",
"name"
],
"properties": {
"address": {
"description": "address",
"type": "string",
"x-go-name": "Address"
},
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
}
},
"x-go-name": "PeerStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableAlert": {
"description": "PostableAlert postable alert",
"type": "object",
"required": [
"labels"
],
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
},
"endsAt": {
"description": "ends at\nFormat: date-time",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri",
"x-go-name": "GeneratorURL"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"startsAt": {
"description": "starts at\nFormat: date-time",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
},
"x-go-name": "PostableAlert",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableAlerts": {
"description": "PostableAlerts postable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/postableAlert"
},
"x-go-name": "PostableAlerts",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"postableSilence": {
"type": "object",
"required": [
"comment",
"createdBy",
"endsAt",
"matchers",
"startsAt"
],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"id": {
"description": "id",
"type": "string",
"x-go-name": "ID"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
},
"x-go-name": "PostableSilence",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/postableSilence"
},
"receiver": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"description": "name",
"type": "string",
"x-go-name": "Name"
}
},
"x-go-name": "Receiver",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models",
"$ref": "#/definitions/receiver"
},
"silence": {
"description": "Silence silence",
"type": "object",
"required": [
"comment",
"createdBy",
"endsAt",
"matchers",
"startsAt"
],
"properties": {
"comment": {
"description": "comment",
"type": "string",
"x-go-name": "Comment"
},
"createdBy": {
"description": "created by",
"type": "string",
"x-go-name": "CreatedBy"
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time",
"x-go-name": "EndsAt"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time",
"x-go-name": "StartsAt"
}
},
"x-go-name": "Silence",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"silenceStatus": {
"description": "SilenceStatus silence status",
"type": "object",
"required": [
"state"
],
"properties": {
"state": {
"description": "state",
"type": "string",
"enum": [
"[expired active pending]"
],
"x-go-name": "State"
}
},
"x-go-name": "SilenceStatus",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
},
"versionInfo": {
"description": "VersionInfo version info",
"type": "object",
"required": [
"branch",
"buildDate",
"buildUser",
"goVersion",
"revision",
"version"
],
"properties": {
"branch": {
"description": "branch",
"type": "string",
"x-go-name": "Branch"
},
"buildDate": {
"description": "build date",
"type": "string",
"x-go-name": "BuildDate"
},
"buildUser": {
"description": "build user",
"type": "string",
"x-go-name": "BuildUser"
},
"goVersion": {
"description": "go version",
"type": "string",
"x-go-name": "GoVersion"
},
"revision": {
"description": "revision",
"type": "string",
"x-go-name": "Revision"
},
"version": {
"description": "version",
"type": "string",
"x-go-name": "Version"
}
},
"x-go-name": "VersionInfo",
"x-go-package": "github.com/prometheus/alertmanager/api/v2/models"
}
},
"securityDefinitions": {
"basic": {
"type": "basic"
}
}
}