diff --git a/Makefile b/Makefile index 367ca37ad87..262dc3e3458 100644 --- a/Makefile +++ b/Makefile @@ -42,7 +42,7 @@ $(NGALERT_SPEC_TARGET): $(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated and ngalert API specs go run pkg/api/docs/merge/merge_specs.go -o=$(MERGED_SPEC_TARGET) $(<) $(NGALERT_SPEC_TARGET) ---swagger-api-spec: $(API_DEFINITION_FILES) ## Generate API Swagger specification +--swagger-api-spec: $(API_DEFINITION_FILES) $(SWAGGER) ## Generate API Swagger specification SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w pkg/server -o public/api-spec.json \ -x "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" \ -x "github.com/prometheus/alertmanager" \ @@ -50,7 +50,7 @@ $(MERGED_SPEC_TARGET): $(SPEC_TARGET) $(NGALERT_SPEC_TARGET) ## Merge generated swagger-api-spec: gen-go --swagger-api-spec $(MERGED_SPEC_TARGET) validate-api-spec -validate-api-spec: $(MERGED_SPEC_TARGET) ## Validate API spec +validate-api-spec: $(MERGED_SPEC_TARGET) $(SWAGGER) ## Validate API spec $(SWAGGER) validate $(<) clean-api-spec: diff --git a/pkg/services/ngalert/api/tooling/Makefile b/pkg/services/ngalert/api/tooling/Makefile index 75e3fc09942..00984f11892 100644 --- a/pkg/services/ngalert/api/tooling/Makefile +++ b/pkg/services/ngalert/api/tooling/Makefile @@ -4,7 +4,6 @@ include ../../../../../.bingo/Variables.mk API_DIR = definitions GO_PKG_FILES = $(shell find $(API_DIR) -name *.go -print) -SWAGGER_TAG ?= latest PATH_DOWN = pkg/services/ngalert/api/tooling PATH_UP = ../../../../.. @@ -22,8 +21,8 @@ ifneq ($(OS),Windows_NT) endif endif -spec.json spec-stable.json: $(GO_PKG_FILES) - SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w $(API_DIR) -o spec.json && $(SWAGGER) generate spec -m --include-tag=stable -o spec-stable.json +spec.json spec-stable.json: $(GO_PKG_FILES) $(SWAGGER) + SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m -w $(API_DIR) -o spec.json && SWAGGER_GENERATE_EXTENSION=false $(SWAGGER) generate spec -m --include-tag=stable -o spec-stable.json post.json: spec.json go run cmd/clean-swagger/main.go -if $(<) -of $@ diff --git a/pkg/services/ngalert/api/tooling/api.json b/pkg/services/ngalert/api/tooling/api.json index 905ea488c07..e976a0da3fd 100644 --- a/pkg/services/ngalert/api/tooling/api.json +++ b/pkg/services/ngalert/api/tooling/api.json @@ -5,15 +5,13 @@ ], "definitions": { "Ack": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AddApiKeyCommand": { "description": "COMMANDS", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "role": { "enum": [ @@ -21,25 +19,20 @@ "Editor", "Admin" ], - "type": "string", - "x-go-enum-desc": "Viewer ROLE_VIEWER\nEditor ROLE_EDITOR\nAdmin ROLE_ADMIN", - "x-go-name": "Role" + "type": "string" }, "secondsToLive": { "format": "int64", - "type": "integer", - "x-go-name": "SecondsToLive" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "object" }, "Alert": { "properties": { "activeAt": { "format": "date-time", - "type": "string", - "x-go-name": "ActiveAt" + "type": "string" }, "annotations": { "$ref": "#/definitions/overrideLabels" @@ -48,12 +41,10 @@ "$ref": "#/definitions/overrideLabels" }, "state": { - "type": "string", - "x-go-name": "State" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "required": [ @@ -63,8 +54,7 @@ "value" ], "title": "Alert has info for an alert.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertDiscovery": { "properties": { @@ -72,16 +62,14 @@ "items": { "$ref": "#/definitions/Alert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" } }, "required": [ "alerts" ], "title": "AlertDiscovery has info for all active alerts.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertInstancesResponse": { "properties": { @@ -94,31 +82,25 @@ }, "type": "array" }, - "type": "array", - "x-go-name": "Instances" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManager": { "properties": { "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" } }, "title": "AlertManager models a configured Alert Manager.", - "type": "object", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "object" }, "AlertManagerNotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagerNotReady": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagersResult": { "properties": { @@ -126,50 +108,42 @@ "items": { "$ref": "#/definitions/AlertManager" }, - "type": "array", - "x-go-name": "Active" + "type": "array" }, "droppedAlertManagers": { "items": { "$ref": "#/definitions/AlertManager" }, - "type": "array", - "x-go-name": "Dropped" + "type": "array" } }, "title": "AlertManagersResult contains the result from querying the alertmanagers endpoint.", - "type": "object", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "object" }, "AlertQuery": { "properties": { "datasourceUid": { "description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.", - "type": "string", - "x-go-name": "DatasourceUID" + "type": "string" }, "model": { "description": "JSON is the raw JSON query and includes the above properties as well as custom properties.", - "type": "object", - "x-go-name": "Model" + "type": "object" }, "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" + "type": "string" }, "refId": { "description": "RefID is the unique identifier of the query, set by the frontend call.", - "type": "string", - "x-go-name": "RefID" + "type": "string" }, "relativeTimeRange": { "$ref": "#/definitions/RelativeTimeRange" } }, "title": "AlertQuery represents a single query associated with an alert definition.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "AlertResponse": { "properties": { @@ -177,22 +151,19 @@ "$ref": "#/definitions/AlertDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertRule": { "properties": { @@ -203,13 +174,11 @@ "example": { "runbook_url": "https://supercoolrunbook.com/page/13" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "condition": { "example": "A", - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "example": [ @@ -260,32 +229,26 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "execErrState": { - "description": "\nAlerting AlertingErrState\nError ErrorErrState\nOK OkErrState", "enum": [ "Alerting", "Error", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState\nOK OkErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "folderUID": { "example": "project_x", - "type": "string", - "x-go-name": "FolderUID" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" }, "id": { "format": "int64", - "type": "integer", - "x-go-name": "ID" + "type": "integer" }, "labels": { "additionalProperties": { @@ -294,24 +257,19 @@ "example": { "team": "sre-team-1" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "noDataState": { - "description": "\nAlerting Alerting\nNoData NoData\nOK OK", "enum": [ "Alerting", "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "orgID": { "format": "int64", - "type": "integer", - "x-go-name": "OrgID" + "type": "integer" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -320,25 +278,21 @@ "example": "eval_group_1", "maxLength": 190, "minLength": 1, - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { "example": "Always firing", "maxLength": 190, "minLength": 1, - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "format": "date-time", "readOnly": true, - "type": "string", - "x-go-name": "Updated" + "type": "string" } }, "required": [ @@ -352,19 +306,16 @@ "execErrState", "for" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertRuleGroup": { "properties": { "interval": { "format": "int64", - "type": "integer", - "x-go-name": "Interval" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertingRule": { "description": "adapted from cortex", @@ -373,50 +324,41 @@ "items": { "$ref": "#/definitions/Alert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" }, "annotations": { "$ref": "#/definitions/overrideLabels" }, "duration": { "format": "double", - "type": "number", - "x-go-name": "Duration" + "type": "number" }, "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "state": { "description": "State can be \"pending\", \"firing\", \"inactive\".", - "type": "string", - "x-go-name": "State" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" @@ -431,25 +373,21 @@ "annotations", "alerts" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ApiRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -458,16 +396,13 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Authorization": { "properties": { @@ -475,17 +410,14 @@ "$ref": "#/definitions/Secret" }, "credentials_file": { - "type": "string", - "x-go-name": "CredentialsFile" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" } }, "title": "Authorization contains HTTP authorization credentials.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "BasicAuth": { "properties": { @@ -493,17 +425,14 @@ "$ref": "#/definitions/Secret" }, "password_file": { - "type": "string", - "x-go-name": "PasswordFile" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, "title": "BasicAuth contains basic HTTP authentication credentials.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "Config": { "properties": { @@ -514,15 +443,13 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -531,128 +458,46 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, "title": "Config is the top-level configuration for Alertmanager's config files.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ContactPoints": { "items": { "$ref": "#/definitions/EmbeddedContactPoint" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" - }, - "CreateDashboardSnapshotCommand": { - "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": { - "default": 0, - "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", - "format": "int64", - "type": "integer", - "x-go-name": "Expires" - }, - "external": { - "default": false, - "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", - "type": "boolean", - "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" - } - }, - "required": [ - "dashboard" - ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "array" }, - "DashboardSnapshot": { - "description": "DashboardSnapshot model", + "DashboardAclUpdateItem": { "properties": { - "Created": { - "format": "date-time", - "type": "string" + "permission": { + "$ref": "#/definitions/PermissionType" }, - "Dashboard": { - "$ref": "#/definitions/Json" - }, - "DashboardEncrypted": { - "items": { - "format": "uint8", - "type": "integer" - }, - "type": "array" - }, - "DeleteKey": { - "type": "string" - }, - "Expires": { - "format": "date-time", - "type": "string" - }, - "External": { - "type": "boolean" - }, - "ExternalDeleteUrl": { - "type": "string" - }, - "ExternalUrl": { - "type": "string" - }, - "Id": { - "format": "int64", - "type": "integer" - }, - "Key": { - "type": "string" - }, - "Name": { + "role": { + "enum": [ + "Viewer", + "Editor", + "Admin" + ], "type": "string" }, - "OrgId": { + "teamId": { "format": "int64", "type": "integer" }, - "Updated": { - "format": "date-time", - "type": "string" - }, - "UserId": { + "userId": { "format": "int64", "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "object" }, "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.", "format": "date-time", - "type": "string", - "x-go-package": "github.com/go-openapi/strfmt" + "type": "string" }, "DayOfMonthRange": { "properties": { @@ -666,34 +511,29 @@ } }, "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.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "DiscoveryBase": { "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "DsPermissionType": { "description": "Datasource permission\nDescription:\n`0` - No Access\n`1` - Query\nEnum: 0,1", "format": "int64", - "type": "integer", - "x-go-package": "github.com/grafana/grafana/pkg/models" + "type": "integer" }, "Duration": { "format": "int64", @@ -703,8 +543,7 @@ "EmailConfig": { "properties": { "auth_identity": { - "type": "string", - "x-go-name": "AuthIdentity" + "type": "string" }, "auth_password": { "$ref": "#/definitions/Secret" @@ -713,74 +552,61 @@ "$ref": "#/definitions/Secret" }, "auth_username": { - "type": "string", - "x-go-name": "AuthUsername" + "type": "string" }, "from": { - "type": "string", - "x-go-name": "From" + "type": "string" }, "headers": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Headers" + "type": "object" }, "hello": { - "type": "string", - "x-go-name": "Hello" + "type": "string" }, "html": { - "type": "string", - "x-go-name": "HTML" + "type": "string" }, "require_tls": { - "type": "boolean", - "x-go-name": "RequireTLS" + "type": "boolean" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "smarthost": { "$ref": "#/definitions/HostPort" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "tls_config": { "$ref": "#/definitions/TLSConfig" }, "to": { "description": "Email address to notify.", - "type": "string", - "x-go-name": "To" + "type": "string" } }, "title": "EmailConfig configures notifications via mail.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", "properties": { "disableResolveMessage": { "example": false, - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { "description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.", "example": "webhook_1", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "readOnly": true, - "type": "string", - "x-go-name": "Provenance" + "type": "string" }, "settings": { "$ref": "#/definitions/Json" @@ -807,50 +633,42 @@ " wecom" ], "example": "webhook", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { "description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.", "example": "my_external_reference", - "type": "string", - "x-go-name": "UID" + "type": "string" } }, "required": [ "type", "settings" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ErrorType": { "title": "ErrorType models the different API error types.", - "type": "string", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "string" }, "EvalAlertConditionCommand": { "description": "EvalAlertConditionCommand is the command for evaluating a condition", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "now": { "format": "date-time", - "type": "string", - "x-go-name": "Now" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "EvalQueriesPayload": { "properties": { @@ -858,17 +676,14 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "now": { "format": "date-time", - "type": "string", - "x-go-name": "Now" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "EvalQueriesResponse": {}, "ExtendedReceiver": { @@ -901,8 +716,7 @@ "$ref": "#/definitions/WechatConfig" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Failure": { "$ref": "#/definitions/ResponseDetails" @@ -913,12 +727,10 @@ "$ref": "#/definitions/AlertManagersResult" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableApiAlertingConfig": { "properties": { @@ -929,30 +741,26 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "muteTimeProvenances": { "additionalProperties": { "$ref": "#/definitions/Provenance" }, - "type": "object", - "x-go-name": "MuteTimeProvenances" + "type": "object" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "receivers": { "description": "Override with our superset receiver type", "items": { "$ref": "#/definitions/GettableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -961,12 +769,10 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableApiReceiver": { "properties": { @@ -974,97 +780,82 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "grafana_managed_receiver_configs": { "items": { "$ref": "#/definitions/GettableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableExtendedRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -1076,26 +867,21 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaReceiver": { "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -1104,23 +890,19 @@ "additionalProperties": { "type": "boolean" }, - "type": "object", - "x-go-name": "SecureFields" + "type": "object" }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaReceivers": { "properties": { @@ -1128,25 +910,21 @@ "items": { "$ref": "#/definitions/GettableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableGrafanaRule": { "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "exec_err_state": { "enum": [ @@ -1154,28 +932,22 @@ "Alerting", "Error" ], - "type": "string", - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "id": { "format": "int64", - "type": "integer", - "x-go-name": "ID" + "type": "integer" }, "intervalSeconds": { "format": "int64", - "type": "integer", - "x-go-name": "IntervalSeconds" + "type": "integer" }, "namespace_id": { "format": "int64", - "type": "integer", - "x-go-name": "NamespaceID" + "type": "integer" }, "namespace_uid": { - "type": "string", - "x-go-name": "NamespaceUID" + "type": "string" }, "no_data_state": { "enum": [ @@ -1183,43 +955,34 @@ "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "orgId": { "format": "int64", - "type": "integer", - "x-go-name": "OrgID" + "type": "integer" }, "provenance": { "$ref": "#/definitions/Provenance" }, "rule_group": { - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "format": "date-time", - "type": "string", - "x-go-name": "Updated" + "type": "string" }, "version": { "format": "int64", - "type": "integer", - "x-go-name": "Version" + "type": "integer" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableNGalertConfig": { "properties": { @@ -1227,8 +990,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Alertmanagers" + "type": "array" }, "alertmanagersChoice": { "enum": [ @@ -1236,13 +998,10 @@ "internal", "external" ], - "type": "string", - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableRuleGroupConfig": { "properties": { @@ -1250,26 +1009,22 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/GettableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" }, "source_tenants": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "SourceTenants" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableStatus": { "properties": { @@ -1282,8 +1037,7 @@ "uptime": { "description": "uptime", "format": "date-time", - "type": "string", - "x-go-name": "Uptime" + "type": "string" }, "versionInfo": { "$ref": "#/definitions/versionInfo" @@ -1295,8 +1049,7 @@ "uptime", "versionInfo" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GettableUserConfig": { "properties": { @@ -1307,19 +1060,16 @@ "additionalProperties": { "$ref": "#/definitions/Provenance" }, - "type": "object", - "x-go-name": "TemplateFileProvenances" + "type": "object" }, "template_files": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "TemplateFiles" + "type": "object" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "GlobalConfig": { "description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.", @@ -1331,8 +1081,7 @@ "$ref": "#/definitions/Secret" }, "opsgenie_api_key_file": { - "type": "string", - "x-go-name": "OpsGenieAPIKeyFile" + "type": "string" }, "opsgenie_api_url": { "$ref": "#/definitions/URL" @@ -1347,12 +1096,10 @@ "$ref": "#/definitions/SecretURL" }, "slack_api_url_file": { - "type": "string", - "x-go-name": "SlackAPIURLFile" + "type": "string" }, "smtp_auth_identity": { - "type": "string", - "x-go-name": "SMTPAuthIdentity" + "type": "string" }, "smtp_auth_password": { "$ref": "#/definitions/Secret" @@ -1361,20 +1108,16 @@ "$ref": "#/definitions/Secret" }, "smtp_auth_username": { - "type": "string", - "x-go-name": "SMTPAuthUsername" + "type": "string" }, "smtp_from": { - "type": "string", - "x-go-name": "SMTPFrom" + "type": "string" }, "smtp_hello": { - "type": "string", - "x-go-name": "SMTPHello" + "type": "string" }, "smtp_require_tls": { - "type": "boolean", - "x-go-name": "SMTPRequireTLS" + "type": "boolean" }, "smtp_smarthost": { "$ref": "#/definitions/HostPort" @@ -1386,8 +1129,7 @@ "$ref": "#/definitions/URL" }, "wechat_api_corp_id": { - "type": "string", - "x-go-name": "WeChatAPICorpID" + "type": "string" }, "wechat_api_secret": { "$ref": "#/definitions/Secret" @@ -1396,8 +1138,7 @@ "$ref": "#/definitions/URL" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "HTTPClientConfig": { "properties": { @@ -1412,13 +1153,11 @@ }, "bearer_token_file": { "description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.", - "type": "string", - "x-go-name": "BearerTokenFile" + "type": "string" }, "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" + "type": "boolean" }, "oauth2": { "$ref": "#/definitions/OAuth2" @@ -1431,8 +1170,7 @@ } }, "title": "HTTPClientConfig configures an HTTP client.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "HostPort": { "properties": { @@ -1444,8 +1182,7 @@ } }, "title": "HostPort represents a \"host:port\" network address.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "InclusiveRange": { "properties": { @@ -1459,8 +1196,7 @@ } }, "title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "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.", @@ -1473,8 +1209,7 @@ "type": "string" }, "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", - "x-go-name": "SourceMatch" + "type": "object" }, "source_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -1487,8 +1222,7 @@ "type": "string" }, "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", - "x-go-name": "TargetMatch" + "type": "object" }, "target_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -1497,71 +1231,60 @@ "$ref": "#/definitions/Matchers" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Json": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/components/simplejson" + "type": "object" }, "Label": { "properties": { "Name": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "Label is a key/value pair of strings.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + "type": "object" }, "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" + "type": "string" }, "LabelNames": { "items": { "$ref": "#/definitions/LabelName" }, "title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.", - "type": "array", - "x-go-package": "github.com/prometheus/common/model" + "type": "array" }, "LabelSet": { "additionalProperties": { "$ref": "#/definitions/LabelValue" }, "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", - "x-go-package": "github.com/prometheus/common/model" + "type": "object" }, "LabelValue": { "title": "A LabelValue is an associated value for a LabelName.", - "type": "string", - "x-go-package": "github.com/prometheus/common/model" + "type": "string" }, "Labels": { "description": "Labels is a sorted set of labels. Order has to be guaranteed upon\ninstantiation.", "items": { "$ref": "#/definitions/Label" }, - "type": "array", - "x-go-package": "github.com/prometheus/prometheus/pkg/labels" + "type": "array" }, "MatchRegexps": { "additionalProperties": { "$ref": "#/definitions/Regexp" }, "title": "MatchRegexps represents a map of Regexp.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "MatchType": { "format": "int64", "title": "MatchType is an enum for label matching types.", - "type": "integer", - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + "type": "integer" }, "Matcher": { "properties": { @@ -1576,8 +1299,7 @@ } }, "title": "Matcher models the matching of a label.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/pkg/labels" + "type": "object" }, "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.", @@ -1589,36 +1311,72 @@ "MessageTemplate": { "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" }, "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MessageTemplateContent": { "properties": { "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MessageTemplates": { "items": { "$ref": "#/definitions/MessageTemplate" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "array" + }, + "MetricRequest": { + "properties": { + "debug": { + "type": "boolean" + }, + "from": { + "description": "From Start time in epoch timestamps in milliseconds or relative using Grafana time units.", + "example": "now-1h", + "type": "string" + }, + "queries": { + "description": "queries.refId – Specifies an identifier of the query. Is optional and default to “A”.\nqueries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId.\nqueries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100.\nqueries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000.", + "example": [ + { + "datasource": { + "uid": "PD8C576611E62080A" + }, + "format": "table", + "intervalMs": 86400000, + "maxDataPoints": 1092, + "rawSql": "SELECT 1 as valueOne, 2 as valueTwo", + "refId": "A" + } + ], + "items": { + "$ref": "#/definitions/Json" + }, + "type": "array" + }, + "to": { + "description": "To End time in epoch timestamps in milliseconds or relative using Grafana time units.", + "example": "now", + "type": "string" + } + }, + "required": [ + "from", + "to", + "queries" + ], + "type": "object" }, "MonthRange": { "properties": { @@ -1632,37 +1390,31 @@ } }, "title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "MultiStatus": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "MuteTimeInterval": { "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "time_intervals": { "items": { "$ref": "#/definitions/TimeInterval" }, - "type": "array", - "x-go-name": "TimeIntervals" + "type": "array" } }, "title": "MuteTimeInterval represents a named set of time intervals for which a route should be muted.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "MuteTimings": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "array" }, "NamespaceConfigResponse": { "additionalProperties": { @@ -1671,23 +1423,47 @@ }, "type": "array" }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" + }, + "NavLink": { + "properties": { + "id": { + "type": "string" + }, + "target": { + "type": "string" + }, + "text": { + "type": "string" + }, + "url": { + "type": "string" + } + }, + "type": "object" + }, + "NavbarPreference": { + "properties": { + "savedItems": { + "items": { + "$ref": "#/definitions/NavLink" + }, + "type": "array" + } + }, + "type": "object" }, "NotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "NotifierConfig": { "properties": { "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" } }, "title": "NotifierConfig contains base options common across all notifier configurations.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "OAuth2": { "properties": { @@ -1695,38 +1471,32 @@ "$ref": "#/definitions/TLSConfig" }, "client_id": { - "type": "string", - "x-go-name": "ClientID" + "type": "string" }, "client_secret": { "$ref": "#/definitions/Secret" }, "client_secret_file": { - "type": "string", - "x-go-name": "ClientSecretFile" + "type": "string" }, "endpoint_params": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "EndpointParams" + "type": "object" }, "scopes": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "Scopes" + "type": "array" }, "token_url": { - "type": "string", - "x-go-name": "TokenURL" + "type": "string" } }, "title": "OAuth2 is the oauth2 client configuration.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "ObjectMatchers": { "$ref": "#/definitions/Matchers", @@ -1735,133 +1505,107 @@ "OpsGenieConfig": { "properties": { "actions": { - "type": "string", - "x-go-name": "Actions" + "type": "string" }, "api_key": { "$ref": "#/definitions/Secret" }, "api_key_file": { - "type": "string", - "x-go-name": "APIKeyFile" + "type": "string" }, "api_url": { "$ref": "#/definitions/URL" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Details" + "type": "object" }, "entity": { - "type": "string", - "x-go-name": "Entity" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "note": { - "type": "string", - "x-go-name": "Note" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "responders": { "items": { "$ref": "#/definitions/OpsGenieConfigResponder" }, - "type": "array", - "x-go-name": "Responders" + "type": "array" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "source": { - "type": "string", - "x-go-name": "Source" + "type": "string" }, "tags": { - "type": "string", - "x-go-name": "Tags" + "type": "string" }, "update_alerts": { - "type": "boolean", - "x-go-name": "UpdateAlerts" + "type": "boolean" } }, "title": "OpsGenieConfig configures notifications via OpsGenie.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "OpsGenieConfigResponder": { "properties": { "id": { "description": "One of those 3 should be filled.", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "type": { "description": "team, user, escalation, schedule etc.", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyConfig": { "properties": { "class": { - "type": "string", - "x-go-name": "Class" + "type": "string" }, "client": { - "type": "string", - "x-go-name": "Client" + "type": "string" }, "client_url": { - "type": "string", - "x-go-name": "ClientURL" + "type": "string" }, "component": { - "type": "string", - "x-go-name": "Component" + "type": "string" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Details" + "type": "object" }, "group": { - "type": "string", - "x-go-name": "Group" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" @@ -1870,75 +1614,106 @@ "items": { "$ref": "#/definitions/PagerdutyImage" }, - "type": "array", - "x-go-name": "Images" + "type": "array" }, "links": { "items": { "$ref": "#/definitions/PagerdutyLink" }, - "type": "array", - "x-go-name": "Links" + "type": "array" }, "routing_key": { "$ref": "#/definitions/Secret" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "service_key": { "$ref": "#/definitions/Secret" }, "severity": { - "type": "string", - "x-go-name": "Severity" + "type": "string" }, "url": { "$ref": "#/definitions/URL" } }, "title": "PagerdutyConfig configures notifications via PagerDuty.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyImage": { "description": "PagerdutyImage is an image", "properties": { "alt": { - "type": "string", - "x-go-name": "Alt" + "type": "string" }, "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "src": { - "type": "string", - "x-go-name": "Src" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "PagerdutyLink": { "description": "PagerdutyLink is a link", "properties": { "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" + }, + "PatchPrefsCmd": { + "properties": { + "homeDashboardId": { + "default": 0, + "description": "The numerical :id of a favorited dashboard", + "format": "int64", + "type": "integer" + }, + "homeDashboardUID": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "navbar": { + "$ref": "#/definitions/NavbarPreference" + }, + "queryHistory": { + "$ref": "#/definitions/QueryHistoryPreference" + }, + "theme": { + "enum": [ + "light", + "dark" + ], + "type": "string" + }, + "timezone": { + "enum": [ + "utc", + "browser" + ], + "type": "string" + }, + "weekStart": { + "type": "string" + } + }, + "type": "object" }, "PermissionDenied": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" + }, + "PermissionType": { + "format": "int64", + "type": "integer" }, "Point": { "properties": { @@ -1952,8 +1727,7 @@ } }, "title": "Point represents a single data point for a given timestamp.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "object" }, "PostableApiAlertingConfig": { "properties": { @@ -1964,23 +1738,20 @@ "items": { "$ref": "#/definitions/InhibitRule" }, - "type": "array", - "x-go-name": "InhibitRules" + "type": "array" }, "mute_time_intervals": { "items": { "$ref": "#/definitions/MuteTimeInterval" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "receivers": { "description": "Override with our superset receiver type", "items": { "$ref": "#/definitions/PostableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "route": { "$ref": "#/definitions/Route" @@ -1989,12 +1760,10 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Templates" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableApiReceiver": { "properties": { @@ -2002,97 +1771,82 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "grafana_managed_receiver_configs": { "items": { "$ref": "#/definitions/PostableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableExtendedRuleNode": { "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Annotations" + "type": "object" }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -2104,48 +1858,39 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Labels" + "type": "object" }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaReceiver": { "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "secureSettings": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "SecureSettings" + "type": "object" }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaReceivers": { "properties": { @@ -2153,25 +1898,21 @@ "items": { "$ref": "#/definitions/PostableGrafanaReceiver" }, - "type": "array", - "x-go-name": "GrafanaManagedReceivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableGrafanaRule": { "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "items": { "$ref": "#/definitions/AlertQuery" }, - "type": "array", - "x-go-name": "Data" + "type": "array" }, "exec_err_state": { "enum": [ @@ -2179,9 +1920,7 @@ "Alerting", "Error" ], - "type": "string", - "x-go-enum-desc": "OK OkErrState\nAlerting AlertingErrState\nError ErrorErrState", - "x-go-name": "ExecErrState" + "type": "string" }, "no_data_state": { "enum": [ @@ -2189,21 +1928,16 @@ "NoData", "OK" ], - "type": "string", - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableNGalertConfig": { "properties": { @@ -2211,8 +1945,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "Alertmanagers" + "type": "array" }, "alertmanagersChoice": { "enum": [ @@ -2220,13 +1953,10 @@ "internal", "external" ], - "type": "string", - "x-go-enum-desc": "all AllAlertmanagers\ninternal InternalAlertmanager\nexternal ExternalAlertmanagers", - "x-go-name": "AlertmanagersChoice" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableRuleGroupConfig": { "properties": { @@ -2234,19 +1964,16 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/PostableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PostableUserConfig": { "properties": { @@ -2257,16 +1984,13 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "TemplateFiles" + "type": "object" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Provenance": { - "type": "string", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "string" }, "PushoverConfig": { "properties": { @@ -2274,52 +1998,51 @@ "$ref": "#/definitions/duration" }, "html": { - "type": "boolean", - "x-go-name": "HTML" + "type": "boolean" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "retry": { "$ref": "#/definitions/duration" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sound": { - "type": "string", - "x-go-name": "Sound" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "token": { "$ref": "#/definitions/Secret" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "url_title": { - "type": "string", - "x-go-name": "URLTitle" + "type": "string" }, "user_key": { "$ref": "#/definitions/Secret" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" + }, + "QueryHistoryPreference": { + "properties": { + "homeTab": { + "type": "string" + } + }, + "type": "object" }, "Receiver": { "properties": { @@ -2327,80 +2050,68 @@ "items": { "$ref": "#/definitions/EmailConfig" }, - "type": "array", - "x-go-name": "EmailConfigs" + "type": "array" }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "opsgenie_configs": { "items": { "$ref": "#/definitions/OpsGenieConfig" }, - "type": "array", - "x-go-name": "OpsGenieConfigs" + "type": "array" }, "pagerduty_configs": { "items": { "$ref": "#/definitions/PagerdutyConfig" }, - "type": "array", - "x-go-name": "PagerdutyConfigs" + "type": "array" }, "pushover_configs": { "items": { "$ref": "#/definitions/PushoverConfig" }, - "type": "array", - "x-go-name": "PushoverConfigs" + "type": "array" }, "slack_configs": { "items": { "$ref": "#/definitions/SlackConfig" }, - "type": "array", - "x-go-name": "SlackConfigs" + "type": "array" }, "sns_configs": { "items": { "$ref": "#/definitions/SNSConfig" }, - "type": "array", - "x-go-name": "SNSConfigs" + "type": "array" }, "victorops_configs": { "items": { "$ref": "#/definitions/VictorOpsConfig" }, - "type": "array", - "x-go-name": "VictorOpsConfigs" + "type": "array" }, "webhook_configs": { "items": { "$ref": "#/definitions/WebhookConfig" }, - "type": "array", - "x-go-name": "WebhookConfigs" + "type": "array" }, "wechat_configs": { "items": { "$ref": "#/definitions/WechatConfig" }, - "type": "array", - "x-go-name": "WechatConfigs" + "type": "array" } }, "title": "Receiver configuration provides configuration on how to contact a receiver.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Regexp": { "description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.", "title": "Regexp is the representation of a compiled regular expression.", - "type": "object", - "x-go-package": "regexp" + "type": "object" }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", @@ -2412,32 +2123,27 @@ "$ref": "#/definitions/Duration" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "object" }, "ResponseDetails": { "properties": { "msg": { - "type": "string", - "x-go-name": "Msg" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "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.", "properties": { "continue": { - "type": "boolean", - "x-go-name": "Continue" + "type": "boolean" }, "group_by": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "GroupByStr" + "type": "array" }, "group_interval": { "$ref": "#/definitions/Duration" @@ -2450,8 +2156,7 @@ "type": "string" }, "description": "Deprecated. Remove before v1.0 release.", - "type": "object", - "x-go-name": "Match" + "type": "object" }, "match_re": { "$ref": "#/definitions/MatchRegexps" @@ -2463,8 +2168,7 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "MuteTimeIntervals" + "type": "array" }, "object_matchers": { "$ref": "#/definitions/ObjectMatchers" @@ -2473,8 +2177,7 @@ "$ref": "#/definitions/Provenance" }, "receiver": { - "type": "string", - "x-go-name": "Receiver" + "type": "string" }, "repeat_interval": { "$ref": "#/definitions/Duration" @@ -2483,44 +2186,36 @@ "items": { "$ref": "#/definitions/Route" }, - "type": "array", - "x-go-name": "Routes" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Rule": { "description": "adapted from cortex", "properties": { "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" @@ -2532,8 +2227,7 @@ "health", "type" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleDiscovery": { "properties": { @@ -2541,48 +2235,40 @@ "items": { "$ref": "#/definitions/RuleGroup" }, - "type": "array", - "x-go-name": "RuleGroups" + "type": "array" } }, "required": [ "groups" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleGroup": { "properties": { "evaluationTime": { "format": "double", - "type": "number", - "x-go-name": "EvaluationTime" + "type": "number" }, "file": { - "type": "string", - "x-go-name": "File" + "type": "string" }, "interval": { "format": "double", - "type": "number", - "x-go-name": "Interval" + "type": "number" }, "lastEvaluation": { "format": "date-time", - "type": "string", - "x-go-name": "LastEvaluation" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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.", "items": { "$ref": "#/definitions/AlertingRule" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" } }, "required": [ @@ -2591,8 +2277,7 @@ "rules", "interval" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleGroupConfigResponse": { "properties": { @@ -2600,26 +2285,22 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "rules": { "items": { "$ref": "#/definitions/GettableExtendedRuleNode" }, - "type": "array", - "x-go-name": "Rules" + "type": "array" }, "source_tenants": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "SourceTenants" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleResponse": { "properties": { @@ -2627,74 +2308,61 @@ "$ref": "#/definitions/RuleDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "RuleType": { "title": "RuleType models the type of a rule.", - "type": "string", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "type": "string" }, "SNSConfig": { "properties": { "api_url": { - "type": "string", - "x-go-name": "APIUrl" + "type": "string" }, "attributes": { "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "Attributes" + "type": "object" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "phone_number": { - "type": "string", - "x-go-name": "PhoneNumber" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sigv4": { "$ref": "#/definitions/SigV4Config" }, "subject": { - "type": "string", - "x-go-name": "Subject" + "type": "string" }, "target_arn": { - "type": "string", - "x-go-name": "TargetARN" + "type": "string" }, "topic_arn": { - "type": "string", - "x-go-name": "TopicARN" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "Sample": { "properties": { @@ -2711,13 +2379,11 @@ } }, "title": "Sample is a single sample belonging to a metric.", - "type": "object", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "object" }, "Secret": { "title": "Secret special type for storing secrets.", - "type": "string", - "x-go-package": "github.com/prometheus/common/config" + "type": "string" }, "SecretURL": { "$ref": "#/definitions/URL", @@ -2742,8 +2408,7 @@ "$ref": "#/definitions/Secret" } }, - "type": "object", - "x-go-package": "github.com/prometheus/common/sigv4" + "type": "object" }, "SlackAction": { "description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.", @@ -2752,33 +2417,26 @@ "$ref": "#/definitions/SlackConfirmationField" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "style": { - "type": "string", - "x-go-name": "Style" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "SlackAction configures a single Slack action that is sent with each notification.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SlackConfig": { "properties": { @@ -2786,149 +2444,118 @@ "items": { "$ref": "#/definitions/SlackAction" }, - "type": "array", - "x-go-name": "Actions" + "type": "array" }, "api_url": { "$ref": "#/definitions/SecretURL" }, "api_url_file": { - "type": "string", - "x-go-name": "APIURLFile" + "type": "string" }, "callback_id": { - "type": "string", - "x-go-name": "CallbackID" + "type": "string" }, "channel": { "description": "Slack channel override, (like #other-channel or @username).", - "type": "string", - "x-go-name": "Channel" + "type": "string" }, "color": { - "type": "string", - "x-go-name": "Color" + "type": "string" }, "fallback": { - "type": "string", - "x-go-name": "Fallback" + "type": "string" }, "fields": { "items": { "$ref": "#/definitions/SlackField" }, - "type": "array", - "x-go-name": "Fields" + "type": "array" }, "footer": { - "type": "string", - "x-go-name": "Footer" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "icon_emoji": { - "type": "string", - "x-go-name": "IconEmoji" + "type": "string" }, "icon_url": { - "type": "string", - "x-go-name": "IconURL" + "type": "string" }, "image_url": { - "type": "string", - "x-go-name": "ImageURL" + "type": "string" }, "link_names": { - "type": "boolean", - "x-go-name": "LinkNames" + "type": "boolean" }, "mrkdwn_in": { "items": { "type": "string" }, - "type": "array", - "x-go-name": "MrkdwnIn" + "type": "array" }, "pretext": { - "type": "string", - "x-go-name": "Pretext" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "short_fields": { - "type": "boolean", - "x-go-name": "ShortFields" + "type": "boolean" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "thumb_url": { - "type": "string", - "x-go-name": "ThumbURL" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "title_link": { - "type": "string", - "x-go-name": "TitleLink" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } }, "title": "SlackConfig configures notifications via Slack.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "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.", "properties": { "dismiss_text": { - "type": "string", - "x-go-name": "DismissText" + "type": "string" }, "ok_text": { - "type": "string", - "x-go-name": "OkText" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "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.", "properties": { "short": { - "type": "boolean", - "x-go-name": "Short" + "type": "boolean" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "title": "SlackField configures a single Slack field that is sent with each notification.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "SmtpNotEnabled": { "$ref": "#/definitions/ResponseDetails" @@ -2940,55 +2567,44 @@ "properties": { "ca_file": { "description": "The CA cert to use for the targets.", - "type": "string", - "x-go-name": "CAFile" + "type": "string" }, "cert_file": { "description": "The client cert file for the targets.", - "type": "string", - "x-go-name": "CertFile" + "type": "string" }, "insecure_skip_verify": { "description": "Disable target certificate validation.", - "type": "boolean", - "x-go-name": "InsecureSkipVerify" + "type": "boolean" }, "key_file": { "description": "The client key file for the targets.", - "type": "string", - "x-go-name": "KeyFile" + "type": "string" }, "server_name": { "description": "Used to verify the hostname for the targets.", - "type": "string", - "x-go-name": "ServerName" + "type": "string" } }, "title": "TLSConfig configures the options for TLS connections.", - "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "type": "object" }, "TestReceiverConfigResult": { "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiverResult": { "properties": { @@ -2996,16 +2612,13 @@ "items": { "$ref": "#/definitions/TestReceiverConfigResult" }, - "type": "array", - "x-go-name": "Configs" + "type": "array" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversConfigAlertParams": { "properties": { @@ -3016,8 +2629,7 @@ "$ref": "#/definitions/LabelSet" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversConfigBodyParams": { "properties": { @@ -3028,12 +2640,10 @@ "items": { "$ref": "#/definitions/PostableApiReceiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestReceiversResult": { "properties": { @@ -3042,33 +2652,28 @@ }, "notified_at": { "format": "date-time", - "type": "string", - "x-go-name": "NotifiedAt" + "type": "string" }, "receivers": { "items": { "$ref": "#/definitions/TestReceiverResult" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestRulePayload": { "properties": { "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)", - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "grafana_condition": { "$ref": "#/definitions/EvalAlertConditionCommand" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TestRuleResponse": { "properties": { @@ -3079,8 +2684,7 @@ "$ref": "#/definitions/AlertInstancesResponse" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "TimeInterval": { "description": "TimeInterval describes intervals of time. ContainsTime will tell you if a golang time is contained\nwithin the interval.", @@ -3089,40 +2693,34 @@ "items": { "$ref": "#/definitions/DayOfMonthRange" }, - "type": "array", - "x-go-name": "DaysOfMonth" + "type": "array" }, "months": { "items": { "$ref": "#/definitions/MonthRange" }, - "type": "array", - "x-go-name": "Months" + "type": "array" }, "times": { "items": { "$ref": "#/definitions/TimeRange" }, - "type": "array", - "x-go-name": "Times" + "type": "array" }, "weekdays": { "items": { "$ref": "#/definitions/WeekdayRange" }, - "type": "array", - "x-go-name": "Weekdays" + "type": "array" }, "years": { "items": { "$ref": "#/definitions/YearRange" }, - "type": "array", - "x-go-name": "Years" + "type": "array" } }, - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "TimeRange": { "description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.", @@ -3137,11 +2735,9 @@ } }, "title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "properties": { "ForceQuery": { "type": "boolean" @@ -3174,33 +2770,79 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "A URL represents a parsed URL (technically, a URI reference).", - "type": "object", - "x-go-package": "net/url" + "title": "URL is a custom URL type that allows validation at configuration load time.", + "type": "object" + }, + "UpdateDashboardAclCommand": { + "properties": { + "items": { + "items": { + "$ref": "#/definitions/DashboardAclUpdateItem" + }, + "type": "array" + } + }, + "type": "object" + }, + "UpdatePrefsCmd": { + "properties": { + "homeDashboardId": { + "default": 0, + "description": "The numerical :id of a favorited dashboard", + "format": "int64", + "type": "integer" + }, + "homeDashboardUID": { + "type": "string" + }, + "locale": { + "type": "string" + }, + "navbar": { + "$ref": "#/definitions/NavbarPreference" + }, + "queryHistory": { + "$ref": "#/definitions/QueryHistoryPreference" + }, + "theme": { + "enum": [ + "light", + "dark" + ], + "type": "string" + }, + "timezone": { + "enum": [ + "utc", + "browser" + ], + "type": "string" + }, + "weekStart": { + "type": "string" + } + }, + "type": "object" }, "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" + "type": "object" }, "ValidationError": { "properties": { "msg": { "example": "error message", - "type": "string", - "x-go-name": "Msg" + "type": "string" } }, - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "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.", "items": { "$ref": "#/definitions/Sample" }, - "type": "array", - "x-go-package": "github.com/prometheus/prometheus/promql" + "type": "array" }, "VictorOpsConfig": { "properties": { @@ -3217,40 +2859,32 @@ "additionalProperties": { "type": "string" }, - "type": "object", - "x-go-name": "CustomFields" + "type": "object" }, "entity_display_name": { - "type": "string", - "x-go-name": "EntityDisplayName" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "monitoring_tool": { - "type": "string", - "x-go-name": "MonitoringTool" + "type": "string" }, "routing_key": { - "type": "string", - "x-go-name": "RoutingKey" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "state_message": { - "type": "string", - "x-go-name": "StateMessage" + "type": "string" } }, "title": "VictorOpsConfig configures notifications via VictorOps.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WebhookConfig": { "properties": { @@ -3260,26 +2894,22 @@ "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.", "format": "uint64", - "type": "integer", - "x-go-name": "MaxAlerts" + "type": "integer" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "url": { "$ref": "#/definitions/URL" } }, "title": "WebhookConfig configures notifications via a generic webhook.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WechatConfig": { "properties": { "agent_id": { - "type": "string", - "x-go-name": "AgentID" + "type": "string" }, "api_secret": { "$ref": "#/definitions/Secret" @@ -3288,40 +2918,32 @@ "$ref": "#/definitions/URL" }, "corp_id": { - "type": "string", - "x-go-name": "CorpID" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "to_party": { - "type": "string", - "x-go-name": "ToParty" + "type": "string" }, "to_tag": { - "type": "string", - "x-go-name": "ToTag" + "type": "string" }, "to_user": { - "type": "string", - "x-go-name": "ToUser" + "type": "string" } }, "title": "WechatConfig configures notifications via Wechat.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/config" + "type": "object" }, "WeekdayRange": { "properties": { @@ -3335,8 +2957,7 @@ } }, "title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "YearRange": { "properties": { @@ -3350,8 +2971,7 @@ } }, "title": "A YearRange is a positive inclusive range.", - "type": "object", - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + "type": "object" }, "alert": { "description": "Alert alert", @@ -3359,8 +2979,7 @@ "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3369,9 +2988,7 @@ "required": [ "labels" ], - "type": "object", - "x-go-name": "Alert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertGroup": { "description": "AlertGroup alert group", @@ -3381,8 +2998,7 @@ "items": { "$ref": "#/definitions/gettableAlert" }, - "type": "array", - "x-go-name": "Alerts" + "type": "array" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3399,12 +3015,11 @@ "type": "object" }, "alertGroups": { + "description": "AlertGroups alert groups", "items": { "$ref": "#/definitions/alertGroup" }, - "type": "array", - "x-go-name": "AlertGroups", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "alertStatus": { "description": "AlertStatus alert status", @@ -3414,24 +3029,21 @@ "items": { "type": "string" }, - "type": "array", - "x-go-name": "InhibitedBy" + "type": "array" }, "silencedBy": { "description": "silenced by", "items": { "type": "string" }, - "type": "array", - "x-go-name": "SilencedBy" + "type": "array" }, "state": { "description": "state", "enum": [ "[unprocessed active suppressed]" ], - "type": "string", - "x-go-name": "State" + "type": "string" } }, "required": [ @@ -3439,25 +3051,20 @@ "silencedBy", "state" ], - "type": "object", - "x-go-name": "AlertStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", "properties": { "original": { "description": "original", - "type": "string", - "x-go-name": "Original" + "type": "string" } }, "required": [ "original" ], - "type": "object", - "x-go-name": "AlertmanagerConfig", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", @@ -3471,8 +3078,7 @@ "uptime": { "description": "uptime", "format": "date-time", - "type": "string", - "x-go-name": "Uptime" + "type": "string" }, "versionInfo": { "$ref": "#/definitions/versionInfo" @@ -3484,47 +3090,39 @@ "uptime", "versionInfo" ], - "type": "object", - "x-go-name": "AlertmanagerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "clusterStatus": { "description": "ClusterStatus cluster status", "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "peers": { "description": "peers", "items": { "$ref": "#/definitions/peerStatus" }, - "type": "array", - "x-go-name": "Peers" + "type": "array" }, "status": { "description": "status", "enum": [ "[ready settling disabled]" ], - "type": "string", - "x-go-name": "Status" + "type": "string" } }, "required": [ "status" ], - "type": "object", - "x-go-name": "ClusterStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "duration": { "$ref": "#/definitions/Duration" }, "gettableAlert": { - "description": "GettableAlert gettable alert", "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -3532,19 +3130,16 @@ "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "fingerprint": { "description": "fingerprint", - "type": "string", - "x-go-name": "Fingerprint" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3554,14 +3149,12 @@ "items": { "$ref": "#/definitions/receiver" }, - "type": "array", - "x-go-name": "Receivers" + "type": "array" }, "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" }, "status": { "$ref": "#/definitions/alertStatus" @@ -3569,8 +3162,7 @@ "updatedAt": { "description": "updated at", "format": "date-time", - "type": "string", - "x-go-name": "UpdatedAt" + "type": "string" } }, "required": [ @@ -3586,7 +3178,6 @@ "type": "object" }, "gettableAlerts": { - "description": "GettableAlerts gettable alerts", "items": { "$ref": "#/definitions/gettableAlert" }, @@ -3597,24 +3188,20 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3622,8 +3209,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" }, "status": { "$ref": "#/definitions/silenceStatus" @@ -3631,8 +3217,7 @@ "updatedAt": { "description": "updated at", "format": "date-time", - "type": "string", - "x-go-name": "UpdatedAt" + "type": "string" } }, "required": [ @@ -3659,32 +3244,26 @@ "type": "string" }, "description": "LabelSet label set", - "type": "object", - "x-go-name": "LabelSet", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "matcher": { "description": "Matcher matcher", "properties": { "isEqual": { "description": "is equal", - "type": "boolean", - "x-go-name": "IsEqual" + "type": "boolean" }, "isRegex": { "description": "is regex", - "type": "boolean", - "x-go-name": "IsRegex" + "type": "boolean" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "value": { "description": "value", - "type": "string", - "x-go-name": "Value" + "type": "string" } }, "required": [ @@ -3692,18 +3271,14 @@ "name", "value" ], - "type": "object", - "x-go-name": "Matcher", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "matchers": { "description": "Matchers matchers", "items": { "$ref": "#/definitions/matcher" }, - "type": "array", - "x-go-name": "Matchers", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "overrideLabels": { "additionalProperties": { @@ -3711,30 +3286,25 @@ }, "description": "The custom marshaling for labels.Labels ends up doing this anyways.", "title": "override the labels type with a map for generation.", - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "peerStatus": { "description": "PeerStatus peer status", "properties": { "address": { "description": "address", - "type": "string", - "x-go-name": "Address" + "type": "string" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "required": [ "address", "name" ], - "type": "object", - "x-go-name": "PeerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "postableAlert": { "description": "PostableAlert postable alert", @@ -3745,14 +3315,12 @@ "endsAt": { "description": "ends at\nFormat: date-time", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "format": "uri", - "type": "string", - "x-go-name": "GeneratorURL" + "type": "string" }, "labels": { "$ref": "#/definitions/labelSet" @@ -3760,49 +3328,40 @@ "startsAt": { "description": "starts at\nFormat: date-time", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ "labels" ], - "type": "object", - "x-go-name": "PostableAlert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "postableAlerts": { "description": "PostableAlerts postable alerts", "items": { "$ref": "#/definitions/postableAlert" }, - "type": "array", - "x-go-name": "PostableAlerts", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "array" }, "postableSilence": { "description": "PostableSilence postable silence", "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3810,8 +3369,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ @@ -3824,12 +3382,10 @@ "type": "object" }, "receiver": { - "description": "Receiver receiver", "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } }, "required": [ @@ -3842,19 +3398,16 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "format": "date-time", - "type": "string", - "x-go-name": "EndsAt" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -3862,8 +3415,7 @@ "startsAt": { "description": "starts at", "format": "date-time", - "type": "string", - "x-go-name": "StartsAt" + "type": "string" } }, "required": [ @@ -3873,9 +3425,7 @@ "matchers", "startsAt" ], - "type": "object", - "x-go-name": "Silence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "silenceStatus": { "description": "SilenceStatus silence status", @@ -3885,49 +3435,40 @@ "enum": [ "[expired active pending]" ], - "type": "string", - "x-go-name": "State" + "type": "string" } }, "required": [ "state" ], - "type": "object", - "x-go-name": "SilenceStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "versionInfo": { "description": "VersionInfo version info", "properties": { "branch": { "description": "branch", - "type": "string", - "x-go-name": "Branch" + "type": "string" }, "buildDate": { "description": "build date", - "type": "string", - "x-go-name": "BuildDate" + "type": "string" }, "buildUser": { "description": "build user", - "type": "string", - "x-go-name": "BuildUser" + "type": "string" }, "goVersion": { "description": "go version", - "type": "string", - "x-go-name": "GoVersion" + "type": "string" }, "revision": { "description": "revision", - "type": "string", - "x-go-name": "Revision" + "type": "string" }, "version": { "description": "version", - "type": "string", - "x-go-name": "Version" + "type": "string" } }, "required": [ @@ -3938,9 +3479,7 @@ "revision", "version" ], - "type": "object", - "x-go-name": "VersionInfo", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" } }, "info": { @@ -4296,8 +3835,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -4318,8 +3856,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -4349,8 +3886,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" }, { "in": "body", @@ -4460,8 +3996,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -4482,8 +4017,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" } ], "responses": { @@ -4513,8 +4047,7 @@ "in": "path", "name": "name", "required": true, - "type": "string", - "x-go-name": "Name" + "type": "string" }, { "in": "body", diff --git a/pkg/services/ngalert/api/tooling/post.json b/pkg/services/ngalert/api/tooling/post.json index c5e91a33700..5f1dc277dda 100644 --- a/pkg/services/ngalert/api/tooling/post.json +++ b/pkg/services/ngalert/api/tooling/post.json @@ -470,101 +470,6 @@ }, "type": "array" }, - "CreateDashboardSnapshotCommand": { - "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" - }, - "expires": { - "default": 0, - "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", - "format": "int64", - "type": "integer" - }, - "external": { - "default": false, - "description": "these are passed when storing an external snapshot ref\nSave the snapshot on an external server rather than locally.", - "type": "boolean" - }, - "key": { - "description": "Define the unique key. Required if `external` is `true`.", - "type": "string" - }, - "name": { - "description": "Snapshot name", - "type": "string" - } - }, - "required": [ - "dashboard" - ], - "type": "object" - }, - "DashboardSnapshot": { - "description": "DashboardSnapshot model", - "properties": { - "Created": { - "format": "date-time", - "type": "string" - }, - "Dashboard": { - "$ref": "#/definitions/Json" - }, - "DashboardEncrypted": { - "items": { - "format": "uint8", - "type": "integer" - }, - "type": "array" - }, - "DeleteKey": { - "type": "string" - }, - "Expires": { - "format": "date-time", - "type": "string" - }, - "External": { - "type": "boolean" - }, - "ExternalDeleteUrl": { - "type": "string" - }, - "ExternalUrl": { - "type": "string" - }, - "Id": { - "format": "int64", - "type": "integer" - }, - "Key": { - "type": "string" - }, - "Name": { - "type": "string" - }, - "OrgId": { - "format": "int64", - "type": "integer" - }, - "Updated": { - "format": "date-time", - "type": "string" - }, - "UserId": { - "format": "int64", - "type": "integer" - } - }, - "type": "object" - }, "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.", "format": "date-time", @@ -2687,7 +2592,6 @@ "type": "object" }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "properties": { "ForceQuery": { "type": "boolean" @@ -2720,7 +2624,7 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "A URL represents a parsed URL (technically, a URI reference).", + "title": "URL is a custom URL type that allows validation at configuration load time.", "type": "object" }, "Userinfo": { @@ -2890,7 +2794,6 @@ "type": "object" }, "alertGroup": { - "description": "AlertGroup alert group", "properties": { "alerts": { "description": "alerts", @@ -2914,6 +2817,7 @@ "type": "object" }, "alertGroups": { + "description": "AlertGroups alert groups", "items": { "$ref": "#/definitions/alertGroup" }, @@ -3021,6 +2925,7 @@ "$ref": "#/definitions/Duration" }, "gettableAlert": { + "description": "GettableAlert gettable alert", "properties": { "annotations": { "$ref": "#/definitions/labelSet" @@ -3076,6 +2981,7 @@ "type": "object" }, "gettableAlerts": { + "description": "GettableAlerts gettable alerts", "items": { "$ref": "#/definitions/gettableAlert" }, @@ -3277,7 +3183,6 @@ "type": "object" }, "receiver": { - "description": "Receiver receiver", "properties": { "name": { "description": "name", diff --git a/pkg/services/ngalert/api/tooling/spec.json b/pkg/services/ngalert/api/tooling/spec.json index 6979b23d525..61d42c493db 100644 --- a/pkg/services/ngalert/api/tooling/spec.json +++ b/pkg/services/ngalert/api/tooling/spec.json @@ -2791,101 +2791,6 @@ "$ref": "#/definitions/EmbeddedContactPoint" } }, - "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" - }, - "expires": { - "description": "When the snapshot should expire in seconds in seconds. Default is never to expire.", - "type": "integer", - "format": "int64", - "default": 0 - }, - "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 - }, - "key": { - "description": "Define the unique key. Required if `external` is `true`.", - "type": "string" - }, - "name": { - "description": "Snapshot name", - "type": "string" - } - } - }, - "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" - } - } - }, "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", @@ -5012,9 +4917,8 @@ } }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "type": "object", - "title": "A URL represents a parsed URL (technically, a URI reference).", + "title": "URL is a custom URL type that allows validation at configuration load time.", "properties": { "ForceQuery": { "type": "boolean" @@ -5215,7 +5119,6 @@ } }, "alertGroup": { - "description": "AlertGroup alert group", "type": "object", "required": [ "alerts", @@ -5240,6 +5143,7 @@ "$ref": "#/definitions/alertGroup" }, "alertGroups": { + "description": "AlertGroups alert groups", "type": "array", "items": { "$ref": "#/definitions/alertGroup" @@ -5348,6 +5252,7 @@ "$ref": "#/definitions/Duration" }, "gettableAlert": { + "description": "GettableAlert gettable alert", "type": "object", "required": [ "labels", @@ -5404,6 +5309,7 @@ "$ref": "#/definitions/gettableAlert" }, "gettableAlerts": { + "description": "GettableAlerts gettable alerts", "type": "array", "items": { "$ref": "#/definitions/gettableAlert" @@ -5609,7 +5515,6 @@ "$ref": "#/definitions/postableSilence" }, "receiver": { - "description": "Receiver receiver", "type": "object", "required": [ "name" diff --git a/public/api-merged.json b/public/api-merged.json index 2501d8d4e11..b3a8c4cd583 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -8502,7 +8502,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -8529,7 +8528,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -8565,7 +8563,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Mute timing name", "name": "name", "in": "path", @@ -8650,7 +8647,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -8677,7 +8673,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -8713,7 +8708,6 @@ "parameters": [ { "type": "string", - "x-go-name": "Name", "description": "Template Name", "name": "name", "in": "path", @@ -8730,8 +8724,7 @@ }, "definitions": { "Ack": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "ActiveSyncStatusDTO": { "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", @@ -8774,22 +8767,17 @@ "type": "object", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "role": { "type": "string", - "enum": ["Viewer", "Editor", "Admin"], - "x-go-enum-desc": "Viewer ROLE_VIEWER\nEditor ROLE_EDITOR\nAdmin ROLE_ADMIN", - "x-go-name": "Role" + "enum": ["Viewer", "Editor", "Admin"] }, "secondsToLive": { "type": "integer", - "format": "int64", - "x-go-name": "SecondsToLive" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "AddBuiltInRoleCommand": { "type": "object", @@ -9096,8 +9084,7 @@ "properties": { "activeAt": { "type": "string", - "format": "date-time", - "x-go-name": "ActiveAt" + "format": "date-time" }, "annotations": { "$ref": "#/definitions/overrideLabels" @@ -9106,15 +9093,12 @@ "$ref": "#/definitions/overrideLabels" }, "state": { - "type": "string", - "x-go-name": "State" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertDiscovery": { "type": "object", @@ -9125,11 +9109,9 @@ "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", @@ -9143,11 +9125,9 @@ "type": "integer", "format": "uint8" } - }, - "x-go-name": "Instances" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertListItemDTO": { "type": "object", @@ -9200,19 +9180,15 @@ "title": "AlertManager models a configured Alert Manager.", "properties": { "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" } - }, - "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" + "type": "object" }, "AlertManagerNotReady": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "AlertManagersResult": { "type": "object", @@ -9222,18 +9198,15 @@ "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" + } }, "AlertNotification": { "type": "object", @@ -9309,29 +9282,24 @@ "properties": { "datasourceUid": { "description": "Grafana data source unique identifier; it should be '-100' for a Server Side Expression operation.", - "type": "string", - "x-go-name": "DatasourceUID" + "type": "string" }, "model": { "description": "JSON is the raw JSON query and includes the above properties as well as custom properties.", - "type": "object", - "x-go-name": "Model" + "type": "object" }, "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" + "type": "string" }, "refId": { "description": "RefID is the unique identifier of the query, set by the frontend call.", - "type": "string", - "x-go-name": "RefID" + "type": "string" }, "relativeTimeRange": { "$ref": "#/definitions/RelativeTimeRange" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "AlertResponse": { "type": "object", @@ -9341,18 +9309,15 @@ "$ref": "#/definitions/AlertDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertRule": { "type": "object", @@ -9373,14 +9338,12 @@ "additionalProperties": { "type": "string" }, - "x-go-name": "Annotations", "example": { "runbook_url": "https://supercoolrunbook.com/page/13" } }, "condition": { "type": "string", - "x-go-name": "Condition", "example": "A" }, "data": { @@ -9388,7 +9351,6 @@ "items": { "$ref": "#/definitions/AlertQuery" }, - "x-go-name": "Data", "example": [ { "datasourceUid": "-100", @@ -9433,15 +9395,11 @@ ] }, "execErrState": { - "description": "\nAlerting AlertingErrState\nError ErrorErrState\nOK OkErrState", "type": "string", - "enum": ["Alerting", "Error", "OK"], - "x-go-enum-desc": "Alerting AlertingErrState\nError ErrorErrState\nOK OkErrState", - "x-go-name": "ExecErrState" + "enum": ["Alerting", "Error", "OK"] }, "folderUID": { "type": "string", - "x-go-name": "FolderUID", "example": "project_x" }, "for": { @@ -9449,30 +9407,24 @@ }, "id": { "type": "integer", - "format": "int64", - "x-go-name": "ID" + "format": "int64" }, "labels": { "type": "object", "additionalProperties": { "type": "string" }, - "x-go-name": "Labels", "example": { "team": "sre-team-1" } }, "noDataState": { - "description": "\nAlerting Alerting\nNoData NoData\nOK OK", "type": "string", - "enum": ["Alerting", "NoData", "OK"], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "enum": ["Alerting", "NoData", "OK"] }, "orgID": { "type": "integer", - "format": "int64", - "x-go-name": "OrgID" + "format": "int64" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -9481,39 +9433,32 @@ "type": "string", "maxLength": 190, "minLength": 1, - "x-go-name": "RuleGroup", "example": "eval_group_1" }, "title": { "type": "string", "maxLength": 190, "minLength": 1, - "x-go-name": "Title", "example": "Always firing" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "type": "string", "format": "date-time", - "x-go-name": "Updated", "readOnly": true } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertRuleGroup": { "type": "object", "properties": { "interval": { "type": "integer", - "format": "int64", - "x-go-name": "Interval" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AlertStateInfoDTO": { "type": "object", @@ -9606,56 +9551,46 @@ "type": "array", "items": { "$ref": "#/definitions/Alert" - }, - "x-go-name": "Alerts" + } }, "annotations": { "$ref": "#/definitions/overrideLabels" }, "duration": { "type": "number", - "format": "double", - "x-go-name": "Duration" + "format": "double" }, "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "state": { "description": "State can be \"pending\", \"firing\", \"inactive\".", - "type": "string", - "x-go-name": "State" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "AnnotationActions": { "type": "object", @@ -9709,19 +9644,16 @@ "type": "object", "properties": { "alert": { - "type": "string", - "x-go-name": "Alert" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -9730,15 +9662,12 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Authorization": { "type": "object", @@ -9748,15 +9677,12 @@ "$ref": "#/definitions/Secret" }, "credentials_file": { - "type": "string", - "x-go-name": "CredentialsFile" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "BasicAuth": { "type": "object", @@ -9766,15 +9692,12 @@ "$ref": "#/definitions/Secret" }, "password_file": { - "type": "string", - "x-go-name": "PasswordFile" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "BrandingOptionsDTO": { "type": "object", @@ -9839,15 +9762,13 @@ "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" @@ -9856,11 +9777,9 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "Templates" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ConfigDTO": { "description": "ConfigDTO is model representation in transfer", @@ -9925,7 +9844,7 @@ "$ref": "#/definitions/ScheduleDTO" }, "state": { - "type": "string" + "$ref": "#/definitions/State" }, "templateVars": { "type": "object" @@ -9944,8 +9863,7 @@ "type": "array", "items": { "$ref": "#/definitions/EmbeddedContactPoint" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "CreateAlertNotificationCommand": { "type": "object", @@ -9994,34 +9912,28 @@ }, "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" + "type": "string" }, "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" + "default": 0 }, "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" + "default": false }, "key": { "description": "Define the unique key. Required if `external` is `true`.", - "type": "string", - "x-go-name": "Key" + "type": "string" }, "name": { "description": "Snapshot name", - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "CreateFolderCommand": { "type": "object", @@ -10408,9 +10320,6 @@ "isHome": { "type": "boolean" }, - "isPublic": { - "type": "boolean" - }, "isSnapshot": { "type": "boolean" }, @@ -10527,8 +10436,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/models" + } }, "DashboardSnapshotDTO": { "description": "DashboardSnapshotDTO without dashboard map", @@ -10822,8 +10730,7 @@ "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" + "format": "date-time" }, "DayOfMonthRange": { "type": "object", @@ -10837,8 +10744,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "DeleteTokenCommand": { "type": "object", @@ -10853,18 +10759,15 @@ "required": ["status"], "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "DsAccess": { "type": "string" @@ -10872,8 +10775,7 @@ "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" + "format": "int64" }, "Duration": { "type": "integer", @@ -10885,8 +10787,7 @@ "title": "EmailConfig configures notifications via mail.", "properties": { "auth_identity": { - "type": "string", - "x-go-name": "AuthIdentity" + "type": "string" }, "auth_password": { "$ref": "#/definitions/Secret" @@ -10895,53 +10796,43 @@ "$ref": "#/definitions/Secret" }, "auth_username": { - "type": "string", - "x-go-name": "AuthUsername" + "type": "string" }, "from": { - "type": "string", - "x-go-name": "From" + "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Headers" + } }, "hello": { - "type": "string", - "x-go-name": "Hello" + "type": "string" }, "html": { - "type": "string", - "x-go-name": "HTML" + "type": "string" }, "require_tls": { - "type": "boolean", - "x-go-name": "RequireTLS" + "type": "boolean" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "smarthost": { "$ref": "#/definitions/HostPort" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "tls_config": { "$ref": "#/definitions/TLSConfig" }, "to": { "description": "Email address to notify.", - "type": "string", - "x-go-name": "To" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "EmbeddedContactPoint": { "description": "EmbeddedContactPoint is the contact point type that is used\nby grafanas embedded alertmanager implementation.", @@ -10950,18 +10841,15 @@ "properties": { "disableResolveMessage": { "type": "boolean", - "x-go-name": "DisableResolveMessage", "example": false }, "name": { "description": "Name is used as grouping key in the UI. Contact points with the\nsame name will be grouped in the UI.", "type": "string", - "x-go-name": "Name", "example": "webhook_1" }, "provenance": { "type": "string", - "x-go-name": "Provenance", "readOnly": true }, "settings": { @@ -10989,17 +10877,14 @@ " webhook", " wecom" ], - "x-go-name": "Type", "example": "webhook" }, "uid": { "description": "UID is the unique identifier of the contact point. The UID can be\nset by the user.", "type": "string", - "x-go-name": "UID", "example": "my_external_reference" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ErrorResponseBody": { "type": "object", @@ -11021,31 +10906,26 @@ }, "ErrorType": { "type": "string", - "title": "ErrorType models the different API error types.", - "x-go-package": "github.com/prometheus/client_golang/api/prometheus/v1" + "title": "ErrorType models the different API error types." }, "EvalAlertConditionCommand": { "description": "EvalAlertConditionCommand is the command for evaluating a condition", "type": "object", "properties": { "condition": { - "type": "string", - "x-go-name": "Condition" + "type": "string" }, "data": { "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "now": { "type": "string", - "format": "date-time", - "x-go-name": "Now" + "format": "date-time" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "EvalMatch": { "type": "object", @@ -11071,16 +10951,13 @@ "type": "array", "items": { "$ref": "#/definitions/AlertQuery" - }, - "x-go-name": "Data" + } }, "now": { "type": "string", - "format": "date-time", - "x-go-name": "Now" + "format": "date-time" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "EvalQueriesResponse": {}, "ExtendedReceiver": { @@ -11113,8 +10990,7 @@ "wechat_configs": { "$ref": "#/definitions/WechatConfig" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "FailedUser": { "description": "FailedUser holds the information of an user that failed", @@ -11257,6 +11133,9 @@ "Folder": { "type": "object", "properties": { + "accessControl": { + "$ref": "#/definitions/Metadata" + }, "canAdmin": { "type": "boolean" }, @@ -11308,6 +11187,9 @@ "FolderSearchHit": { "type": "object", "properties": { + "accessControl": { + "$ref": "#/definitions/Metadata" + }, "id": { "type": "integer", "format": "int64" @@ -11444,11 +11326,9 @@ "$ref": "#/definitions/AlertManagersResult" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableApiAlertingConfig": { "type": "object", @@ -11460,30 +11340,26 @@ "type": "array", "items": { "$ref": "#/definitions/InhibitRule" - }, - "x-go-name": "InhibitRules" + } }, "muteTimeProvenances": { "type": "object", "additionalProperties": { "$ref": "#/definitions/Provenance" - }, - "x-go-name": "MuteTimeProvenances" + } }, "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" @@ -11492,11 +11368,9 @@ "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", @@ -11505,97 +11379,82 @@ "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" + "type": "string" }, "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" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -11607,26 +11466,21 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableGrafanaReceiver": { "type": "object", "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" @@ -11635,22 +11489,18 @@ "type": "object", "additionalProperties": { "type": "boolean" - }, - "x-go-name": "SecureFields" + } }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableGrafanaReceivers": { "type": "object", @@ -11659,89 +11509,70 @@ "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" + "type": "string" }, "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" + "enum": ["OK", "Alerting", "Error"] }, "id": { "type": "integer", - "format": "int64", - "x-go-name": "ID" + "format": "int64" }, "intervalSeconds": { "type": "integer", - "format": "int64", - "x-go-name": "IntervalSeconds" + "format": "int64" }, "namespace_id": { "type": "integer", - "format": "int64", - "x-go-name": "NamespaceID" + "format": "int64" }, "namespace_uid": { - "type": "string", - "x-go-name": "NamespaceUID" + "type": "string" }, "no_data_state": { "type": "string", - "enum": ["Alerting", "NoData", "OK"], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "enum": ["Alerting", "NoData", "OK"] }, "orgId": { "type": "integer", - "format": "int64", - "x-go-name": "OrgID" + "format": "int64" }, "provenance": { "$ref": "#/definitions/Provenance" }, "rule_group": { - "type": "string", - "x-go-name": "RuleGroup" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" }, "updated": { "type": "string", - "format": "date-time", - "x-go-name": "Updated" + "format": "date-time" }, "version": { "type": "integer", - "format": "int64", - "x-go-name": "Version" + "format": "int64" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableNGalertConfig": { "type": "object", @@ -11750,17 +11581,13 @@ "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" + "enum": ["all", "internal", "external"] } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableRuleGroupConfig": { "type": "object", @@ -11769,25 +11596,21 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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", @@ -11802,14 +11625,12 @@ "uptime": { "description": "uptime", "type": "string", - "format": "date-time", - "x-go-name": "Uptime" + "format": "date-time" }, "versionInfo": { "$ref": "#/definitions/versionInfo" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "GettableUserConfig": { "type": "object", @@ -11821,18 +11642,15 @@ "type": "object", "additionalProperties": { "$ref": "#/definitions/Provenance" - }, - "x-go-name": "TemplateFileProvenances" + } }, "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.", @@ -11845,8 +11663,7 @@ "$ref": "#/definitions/Secret" }, "opsgenie_api_key_file": { - "type": "string", - "x-go-name": "OpsGenieAPIKeyFile" + "type": "string" }, "opsgenie_api_url": { "$ref": "#/definitions/URL" @@ -11861,12 +11678,10 @@ "$ref": "#/definitions/SecretURL" }, "slack_api_url_file": { - "type": "string", - "x-go-name": "SlackAPIURLFile" + "type": "string" }, "smtp_auth_identity": { - "type": "string", - "x-go-name": "SMTPAuthIdentity" + "type": "string" }, "smtp_auth_password": { "$ref": "#/definitions/Secret" @@ -11875,20 +11690,16 @@ "$ref": "#/definitions/Secret" }, "smtp_auth_username": { - "type": "string", - "x-go-name": "SMTPAuthUsername" + "type": "string" }, "smtp_from": { - "type": "string", - "x-go-name": "SMTPFrom" + "type": "string" }, "smtp_hello": { - "type": "string", - "x-go-name": "SMTPHello" + "type": "string" }, "smtp_require_tls": { - "type": "boolean", - "x-go-name": "SMTPRequireTLS" + "type": "boolean" }, "smtp_smarthost": { "$ref": "#/definitions/HostPort" @@ -11900,8 +11711,7 @@ "$ref": "#/definitions/URL" }, "wechat_api_corp_id": { - "type": "string", - "x-go-name": "WeChatAPICorpID" + "type": "string" }, "wechat_api_secret": { "$ref": "#/definitions/Secret" @@ -11909,8 +11719,7 @@ "wechat_api_url": { "$ref": "#/definitions/URL" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "HTTPClientConfig": { "type": "object", @@ -11927,13 +11736,11 @@ }, "bearer_token_file": { "description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.", - "type": "string", - "x-go-name": "BearerTokenFile" + "type": "string" }, "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" + "type": "boolean" }, "oauth2": { "$ref": "#/definitions/OAuth2" @@ -11944,8 +11751,7 @@ "tls_config": { "$ref": "#/definitions/TLSConfig" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "Hit": { "type": "object", @@ -12022,8 +11828,7 @@ "Port": { "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "ImportDashboardInput": { "type": "object", @@ -12138,8 +11943,7 @@ "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.", @@ -12153,8 +11957,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "SourceMatch" + } }, "source_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -12167,8 +11970,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "TargetMatch" + } }, "target_match_re": { "$ref": "#/definitions/MatchRegexps" @@ -12176,8 +11978,7 @@ "target_matchers": { "$ref": "#/definitions/Matchers" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "InspectType": { "type": "integer", @@ -12259,53 +12060,45 @@ } }, "Json": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/components/simplejson" + "type": "object" }, "Label": { "type": "object", "title": "Label is a key/value pair of strings.", "properties": { "Name": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "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" + "type": "string" }, "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" + "title": "A LabelValue is an associated value for a LabelName." }, "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" + } }, "LibraryElementConnectionDTO": { "type": "object", @@ -12508,14 +12301,12 @@ "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" + "title": "MatchType is an enum for label matching types." }, "Matcher": { "type": "object", @@ -12530,8 +12321,7 @@ "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.", @@ -12544,35 +12334,29 @@ "type": "object", "properties": { "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "provenance": { "$ref": "#/definitions/Provenance" }, "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "MessageTemplateContent": { "type": "object", "properties": { "template": { - "type": "string", - "x-go-name": "Template" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "MessageTemplates": { "type": "array", "items": { "$ref": "#/definitions/MessageTemplate" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Metadata": { "description": "Metadata contains user accesses for a given resource\nEx: map[string]bool{\"create\":true, \"delete\": true}", @@ -12644,37 +12428,31 @@ "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" + "type": "object" }, "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" + "type": "string" }, "time_intervals": { "type": "array", "items": { "$ref": "#/definitions/TimeInterval" - }, - "x-go-name": "TimeIntervals" + } } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "MuteTimings": { "type": "array", "items": { "$ref": "#/definitions/MuteTimeInterval" - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "NamespaceConfigResponse": { "type": "object", @@ -12683,8 +12461,7 @@ "items": { "$ref": "#/definitions/GettableRuleGroupConfig" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "NavLink": { "type": "object", @@ -12730,8 +12507,7 @@ } }, "NotFound": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "Notice": { "type": "object", @@ -12796,11 +12572,9 @@ "title": "NotifierConfig contains base options common across all notifier configurations.", "properties": { "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "OAuth2": { "type": "object", @@ -12810,36 +12584,30 @@ "$ref": "#/definitions/TLSConfig" }, "client_id": { - "type": "string", - "x-go-name": "ClientID" + "type": "string" }, "client_secret": { "$ref": "#/definitions/Secret" }, "client_secret_file": { - "type": "string", - "x-go-name": "ClientSecretFile" + "type": "string" }, "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" + "type": "string" } - }, - "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.", @@ -12850,98 +12618,79 @@ "title": "OpsGenieConfig configures notifications via OpsGenie.", "properties": { "actions": { - "type": "string", - "x-go-name": "Actions" + "type": "string" }, "api_key": { "$ref": "#/definitions/Secret" }, "api_key_file": { - "type": "string", - "x-go-name": "APIKeyFile" + "type": "string" }, "api_url": { "$ref": "#/definitions/URL" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Details" + } }, "entity": { - "type": "string", - "x-go-name": "Entity" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "note": { - "type": "string", - "x-go-name": "Note" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "responders": { "type": "array", "items": { "$ref": "#/definitions/OpsGenieConfigResponder" - }, - "x-go-name": "Responders" + } }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "source": { - "type": "string", - "x-go-name": "Source" + "type": "string" }, "tags": { - "type": "string", - "x-go-name": "Tags" + "type": "string" }, "update_alerts": { - "type": "boolean", - "x-go-name": "UpdateAlerts" + "type": "boolean" } - }, - "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" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "type": { "description": "team, user, escalation, schedule etc.", - "type": "string", - "x-go-name": "Type" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "OrgDTO": { "type": "object", @@ -13016,35 +12765,28 @@ "title": "PagerdutyConfig configures notifications via PagerDuty.", "properties": { "class": { - "type": "string", - "x-go-name": "Class" + "type": "string" }, "client": { - "type": "string", - "x-go-name": "Client" + "type": "string" }, "client_url": { - "type": "string", - "x-go-name": "ClientURL" + "type": "string" }, "component": { - "type": "string", - "x-go-name": "Component" + "type": "string" }, "description": { - "type": "string", - "x-go-name": "Description" + "type": "string" }, "details": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Details" + } }, "group": { - "type": "string", - "x-go-name": "Group" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" @@ -13053,69 +12795,57 @@ "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" + "type": "boolean" }, "service_key": { "$ref": "#/definitions/Secret" }, "severity": { - "type": "string", - "x-go-name": "Severity" + "type": "string" }, "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" + "type": "string" }, "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "src": { - "type": "string", - "x-go-name": "Src" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PagerdutyLink": { "description": "PagerdutyLink is a link", "type": "object", "properties": { "href": { - "type": "string", - "x-go-name": "Href" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "PatchAnnotationsCmd": { "type": "object", @@ -13265,8 +12995,7 @@ } }, "PermissionDenied": { - "type": "object", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "type": "object" }, "PermissionType": { "type": "integer", @@ -13284,8 +13013,7 @@ "type": "number", "format": "double" } - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "PostAnnotationsCmd": { "type": "object", @@ -13351,23 +13079,20 @@ "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" @@ -13376,11 +13101,9 @@ "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", @@ -13389,97 +13112,82 @@ "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" + "type": "string" }, "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" + "type": "string" }, "annotations": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Annotations" + } }, "expr": { - "type": "string", - "x-go-name": "Expr" + "type": "string" }, "for": { "$ref": "#/definitions/Duration" @@ -13491,47 +13199,38 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Labels" + } }, "record": { - "type": "string", - "x-go-name": "Record" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableGrafanaReceiver": { "type": "object", "properties": { "disableResolveMessage": { - "type": "boolean", - "x-go-name": "DisableResolveMessage" + "type": "boolean" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "secureSettings": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "SecureSettings" + } }, "settings": { "$ref": "#/definitions/Json" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableGrafanaReceivers": { "type": "object", @@ -13540,48 +13239,37 @@ "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" + "type": "string" }, "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" + "enum": ["OK", "Alerting", "Error"] }, "no_data_state": { "type": "string", - "enum": ["Alerting", "NoData", "OK"], - "x-go-enum-desc": "Alerting Alerting\nNoData NoData\nOK OK", - "x-go-name": "NoDataState" + "enum": ["Alerting", "NoData", "OK"] }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableNGalertConfig": { "type": "object", @@ -13590,17 +13278,13 @@ "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" + "enum": ["all", "internal", "external"] } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "PostableRuleGroupConfig": { "type": "object", @@ -13609,18 +13293,15 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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", @@ -13632,11 +13313,9 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "TemplateFiles" + } } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Prefs": { "type": "object", @@ -13683,8 +13362,7 @@ } }, "Provenance": { - "type": "string", - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + "type": "string" }, "PushoverConfig": { "type": "object", @@ -13693,51 +13371,42 @@ "$ref": "#/definitions/duration" }, "html": { - "type": "boolean", - "x-go-name": "HTML" + "type": "boolean" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "priority": { - "type": "string", - "x-go-name": "Priority" + "type": "string" }, "retry": { "$ref": "#/definitions/duration" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sound": { - "type": "string", - "x-go-name": "Sound" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "token": { "$ref": "#/definitions/Secret" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "url_title": { - "type": "string", - "x-go-name": "URLTitle" + "type": "string" }, "user_key": { "$ref": "#/definitions/Secret" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "QueryDataResponse": { "description": "It is the return type of a QueryData call.", @@ -13968,72 +13637,61 @@ "type": "array", "items": { "$ref": "#/definitions/EmailConfig" - }, - "x-go-name": "EmailConfigs" + } }, "name": { "description": "A unique identifier for this receiver.", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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" + } }, "RecordingRuleJSON": { "description": "RecordingRuleJSON is the external representation of a recording rule", @@ -14085,8 +13743,7 @@ "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" + "title": "Regexp is the representation of a compiled regular expression." }, "RelativeTimeRange": { "description": "RelativeTimeRange is the per query start and end time\nfor requests.", @@ -14098,8 +13755,7 @@ "to": { "$ref": "#/definitions/Duration" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" + } }, "ReportEmailDTO": { "type": "object", @@ -14140,11 +13796,9 @@ "type": "object", "properties": { "msg": { - "type": "string", - "x-go-name": "Msg" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Responses": { "description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataRespones' frames based on these RefIDs.", @@ -14221,15 +13875,13 @@ "type": "object", "properties": { "continue": { - "type": "boolean", - "x-go-name": "Continue" + "type": "boolean" }, "group_by": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "GroupByStr" + } }, "group_interval": { "$ref": "#/definitions/Duration" @@ -14242,8 +13894,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Match" + } }, "match_re": { "$ref": "#/definitions/MatchRegexps" @@ -14255,8 +13906,7 @@ "type": "array", "items": { "type": "string" - }, - "x-go-name": "MuteTimeIntervals" + } }, "object_matchers": { "$ref": "#/definitions/ObjectMatchers" @@ -14265,8 +13915,7 @@ "$ref": "#/definitions/Provenance" }, "receiver": { - "type": "string", - "x-go-name": "Receiver" + "type": "string" }, "repeat_interval": { "$ref": "#/definitions/Duration" @@ -14275,11 +13924,9 @@ "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", @@ -14288,38 +13935,31 @@ "properties": { "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "health": { - "type": "string", - "x-go-name": "Health" + "type": "string" }, "labels": { "$ref": "#/definitions/overrideLabels" }, "lastError": { - "type": "string", - "x-go-name": "LastError" + "type": "string" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "query": { - "type": "string", - "x-go-name": "Query" + "type": "string" }, "type": { "$ref": "#/definitions/RuleType" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "RuleDiscovery": { "type": "object", @@ -14329,11 +13969,9 @@ "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", @@ -14341,37 +13979,30 @@ "properties": { "evaluationTime": { "type": "number", - "format": "double", - "x-go-name": "EvaluationTime" + "format": "double" }, "file": { - "type": "string", - "x-go-name": "File" + "type": "string" }, "interval": { "type": "number", - "format": "double", - "x-go-name": "Interval" + "format": "double" }, "lastEvaluation": { "type": "string", - "format": "date-time", - "x-go-name": "LastEvaluation" + "format": "date-time" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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", @@ -14380,25 +14011,21 @@ "$ref": "#/definitions/Duration" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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", @@ -14408,70 +14035,57 @@ "$ref": "#/definitions/RuleDiscovery" }, "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "errorType": { "$ref": "#/definitions/ErrorType" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" } - }, - "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" + "title": "RuleType models the type of a rule." }, "SNSConfig": { "type": "object", "properties": { "api_url": { - "type": "string", - "x-go-name": "APIUrl" + "type": "string" }, "attributes": { "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "Attributes" + } }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "phone_number": { - "type": "string", - "x-go-name": "PhoneNumber" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "sigv4": { "$ref": "#/definitions/SigV4Config" }, "subject": { - "type": "string", - "x-go-name": "Subject" + "type": "string" }, "target_arn": { - "type": "string", - "x-go-name": "TargetARN" + "type": "string" }, "topic_arn": { - "type": "string", - "x-go-name": "TopicARN" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "Sample": { "type": "object", @@ -14488,8 +14102,7 @@ "type": "number", "format": "double" } - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "SaveDashboardCommand": { "type": "object", @@ -14614,8 +14227,7 @@ }, "Secret": { "type": "string", - "title": "Secret special type for storing secrets.", - "x-go-package": "github.com/prometheus/common/config" + "title": "Secret special type for storing secrets." }, "SecretURL": { "title": "SecretURL is a URL that must not be revealed on marshaling.", @@ -14686,8 +14298,7 @@ "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.", @@ -14698,31 +14309,24 @@ "$ref": "#/definitions/SlackConfirmationField" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "style": { - "type": "string", - "x-go-name": "Style" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "type": { - "type": "string", - "x-go-name": "Type" + "type": "string" }, "url": { - "type": "string", - "x-go-name": "URL" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SlackConfig": { "type": "object", @@ -14732,127 +14336,100 @@ "type": "array", "items": { "$ref": "#/definitions/SlackAction" - }, - "x-go-name": "Actions" + } }, "api_url": { "$ref": "#/definitions/SecretURL" }, "api_url_file": { - "type": "string", - "x-go-name": "APIURLFile" + "type": "string" }, "callback_id": { - "type": "string", - "x-go-name": "CallbackID" + "type": "string" }, "channel": { "description": "Slack channel override, (like #other-channel or @username).", - "type": "string", - "x-go-name": "Channel" + "type": "string" }, "color": { - "type": "string", - "x-go-name": "Color" + "type": "string" }, "fallback": { - "type": "string", - "x-go-name": "Fallback" + "type": "string" }, "fields": { "type": "array", "items": { "$ref": "#/definitions/SlackField" - }, - "x-go-name": "Fields" + } }, "footer": { - "type": "string", - "x-go-name": "Footer" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "icon_emoji": { - "type": "string", - "x-go-name": "IconEmoji" + "type": "string" }, "icon_url": { - "type": "string", - "x-go-name": "IconURL" + "type": "string" }, "image_url": { - "type": "string", - "x-go-name": "ImageURL" + "type": "string" }, "link_names": { - "type": "boolean", - "x-go-name": "LinkNames" + "type": "boolean" }, "mrkdwn_in": { "type": "array", "items": { "type": "string" - }, - "x-go-name": "MrkdwnIn" + } }, "pretext": { - "type": "string", - "x-go-name": "Pretext" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "short_fields": { - "type": "boolean", - "x-go-name": "ShortFields" + "type": "boolean" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "thumb_url": { - "type": "string", - "x-go-name": "ThumbURL" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "title_link": { - "type": "string", - "x-go-name": "TitleLink" + "type": "string" }, "username": { - "type": "string", - "x-go-name": "Username" + "type": "string" } - }, - "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" + "type": "string" }, "ok_text": { - "type": "string", - "x-go-name": "OkText" + "type": "string" }, "text": { - "type": "string", - "x-go-name": "Text" + "type": "string" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" } - }, - "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.", @@ -14860,23 +14437,22 @@ "title": "SlackField configures a single Slack field that is sent with each notification.", "properties": { "short": { - "type": "boolean", - "x-go-name": "Short" + "type": "boolean" }, "title": { - "type": "string", - "x-go-name": "Title" + "type": "string" }, "value": { - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "SmtpNotEnabled": { "$ref": "#/definitions/ResponseDetails" }, + "State": { + "type": "string" + }, "Status": { "type": "object", "properties": { @@ -14935,31 +14511,25 @@ "properties": { "ca_file": { "description": "The CA cert to use for the targets.", - "type": "string", - "x-go-name": "CAFile" + "type": "string" }, "cert_file": { "description": "The client cert file for the targets.", - "type": "string", - "x-go-name": "CertFile" + "type": "string" }, "insecure_skip_verify": { "description": "Disable target certificate validation.", - "type": "boolean", - "x-go-name": "InsecureSkipVerify" + "type": "boolean" }, "key_file": { "description": "The client key file for the targets.", - "type": "string", - "x-go-name": "KeyFile" + "type": "string" }, "server_name": { "description": "Used to verify the hostname for the targets.", - "type": "string", - "x-go-name": "ServerName" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/common/config" + } }, "TagsDTO": { "type": "object", @@ -15133,23 +14703,18 @@ "type": "object", "properties": { "error": { - "type": "string", - "x-go-name": "Error" + "type": "string" }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" }, "status": { - "type": "string", - "x-go-name": "Status" + "type": "string" }, "uid": { - "type": "string", - "x-go-name": "UID" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiverResult": { "type": "object", @@ -15158,15 +14723,12 @@ "type": "array", "items": { "$ref": "#/definitions/TestReceiverConfigResult" - }, - "x-go-name": "Configs" + } }, "name": { - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiversConfigAlertParams": { "type": "object", @@ -15177,8 +14739,7 @@ "labels": { "$ref": "#/definitions/LabelSet" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "TestReceiversConfigBodyParams": { "type": "object", @@ -15190,11 +14751,9 @@ "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", @@ -15204,32 +14763,27 @@ }, "notified_at": { "type": "string", - "format": "date-time", - "x-go-name": "NotifiedAt" + "format": "date-time" }, "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", @@ -15240,8 +14794,7 @@ "grafana_alert_instances": { "$ref": "#/definitions/AlertInstancesResponse" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "Threshold": { "description": "Threshold a single step on the threshold list", @@ -15286,39 +14839,33 @@ "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.", @@ -15333,8 +14880,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "TimeRangeDTO": { "type": "object", @@ -15464,9 +15010,8 @@ "type": "string" }, "URL": { - "description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.", "type": "object", - "title": "A URL represents a parsed URL (technically, a URI reference).", + "title": "URL is a custom URL type that allows validation at configuration load time.", "properties": { "ForceQuery": { "type": "boolean" @@ -15498,8 +15043,7 @@ "User": { "$ref": "#/definitions/Userinfo" } - }, - "x-go-package": "net/url" + } }, "UpdateAlertNotificationCommand": { "type": "object", @@ -16067,19 +15611,16 @@ }, "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" + "type": "object" }, "ValidationError": { "type": "object", "properties": { "msg": { "type": "string", - "x-go-name": "Msg", "example": "error message" } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + } }, "ValueMapping": { "description": "ValueMapping allows mapping input values to text and color", @@ -16096,8 +15637,7 @@ "type": "array", "items": { "$ref": "#/definitions/Sample" - }, - "x-go-package": "github.com/prometheus/prometheus/promql" + } }, "VictorOpsConfig": { "type": "object", @@ -16116,38 +15656,30 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "CustomFields" + } }, "entity_display_name": { - "type": "string", - "x-go-name": "EntityDisplayName" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "monitoring_tool": { - "type": "string", - "x-go-name": "MonitoringTool" + "type": "string" }, "routing_key": { - "type": "string", - "x-go-name": "RoutingKey" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "state_message": { - "type": "string", - "x-go-name": "StateMessage" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "VisType": { "type": "string", @@ -16163,26 +15695,22 @@ "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" + "format": "uint64" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "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" + "type": "string" }, "api_secret": { "$ref": "#/definitions/Secret" @@ -16191,38 +15719,30 @@ "$ref": "#/definitions/URL" }, "corp_id": { - "type": "string", - "x-go-name": "CorpID" + "type": "string" }, "http_config": { "$ref": "#/definitions/HTTPClientConfig" }, "message": { - "type": "string", - "x-go-name": "Message" + "type": "string" }, "message_type": { - "type": "string", - "x-go-name": "MessageType" + "type": "string" }, "send_resolved": { - "type": "boolean", - "x-go-name": "VSendResolved" + "type": "boolean" }, "to_party": { - "type": "string", - "x-go-name": "ToParty" + "type": "string" }, "to_tag": { - "type": "string", - "x-go-name": "ToTag" + "type": "string" }, "to_user": { - "type": "string", - "x-go-name": "ToUser" + "type": "string" } - }, - "x-go-package": "github.com/prometheus/alertmanager/config" + } }, "WeekdayRange": { "type": "object", @@ -16236,8 +15756,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "YearRange": { "type": "object", @@ -16251,8 +15770,7 @@ "type": "integer", "format": "int64" } - }, - "x-go-package": "github.com/prometheus/alertmanager/timeinterval" + } }, "alert": { "description": "Alert alert", @@ -16262,15 +15780,12 @@ "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" } - }, - "x-go-name": "Alert", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertGroup": { "description": "AlertGroup alert group", @@ -16282,8 +15797,7 @@ "type": "array", "items": { "$ref": "#/definitions/gettableAlert" - }, - "x-go-name": "Alerts" + } }, "labels": { "$ref": "#/definitions/labelSet" @@ -16294,12 +15808,11 @@ } }, "alertGroups": { + "description": "AlertGroups alert groups", "type": "array", "items": { "$ref": "#/definitions/alertGroup" - }, - "x-go-name": "AlertGroups", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertStatus": { "description": "AlertStatus alert status", @@ -16311,26 +15824,21 @@ "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" + "enum": ["[unprocessed active suppressed]"] } - }, - "x-go-name": "AlertStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertmanagerConfig": { "description": "AlertmanagerConfig alertmanager config", @@ -16339,12 +15847,9 @@ "properties": { "original": { "description": "original", - "type": "string", - "x-go-name": "Original" + "type": "string" } - }, - "x-go-name": "AlertmanagerConfig", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertmanagerStatus": { "description": "AlertmanagerStatus alertmanager status", @@ -16360,15 +15865,12 @@ "uptime": { "description": "uptime", "type": "string", - "format": "date-time", - "x-go-name": "Uptime" + "format": "date-time" }, "versionInfo": { "$ref": "#/definitions/versionInfo" } - }, - "x-go-name": "AlertmanagerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "clusterStatus": { "description": "ClusterStatus cluster status", @@ -16377,32 +15879,26 @@ "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "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" + "enum": ["[ready settling disabled]"] } - }, - "x-go-name": "ClusterStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "duration": { "$ref": "#/definitions/Duration" }, "gettableAlert": { - "description": "GettableAlert gettable alert", "type": "object", "required": ["labels", "annotations", "endsAt", "fingerprint", "receivers", "startsAt", "status", "updatedAt"], "properties": { @@ -16412,19 +15908,16 @@ "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "fingerprint": { "description": "fingerprint", - "type": "string", - "x-go-name": "Fingerprint" + "type": "string" }, "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" @@ -16434,14 +15927,12 @@ "type": "array", "items": { "$ref": "#/definitions/receiver" - }, - "x-go-name": "Receivers" + } }, "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" }, "status": { "$ref": "#/definitions/alertStatus" @@ -16449,13 +15940,11 @@ "updatedAt": { "description": "updated at", "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" + "format": "date-time" } } }, "gettableAlerts": { - "description": "GettableAlerts gettable alerts", "type": "array", "items": { "$ref": "#/definitions/gettableAlert" @@ -16468,24 +15957,20 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -16493,8 +15978,7 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" }, "status": { "$ref": "#/definitions/silenceStatus" @@ -16502,8 +15986,7 @@ "updatedAt": { "description": "updated at", "type": "string", - "format": "date-time", - "x-go-name": "UpdatedAt" + "format": "date-time" } } }, @@ -16519,9 +16002,7 @@ "type": "object", "additionalProperties": { "type": "string" - }, - "x-go-name": "LabelSet", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "matcher": { "description": "Matcher matcher", @@ -16530,36 +16011,28 @@ "properties": { "isEqual": { "description": "is equal", - "type": "boolean", - "x-go-name": "IsEqual" + "type": "boolean" }, "isRegex": { "description": "is regex", - "type": "boolean", - "x-go-name": "IsRegex" + "type": "boolean" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" }, "value": { "description": "value", - "type": "string", - "x-go-name": "Value" + "type": "string" } - }, - "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.", @@ -16567,8 +16040,7 @@ "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", @@ -16577,17 +16049,13 @@ "properties": { "address": { "description": "address", - "type": "string", - "x-go-name": "Address" + "type": "string" }, "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } - }, - "x-go-name": "PeerStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "postableAlert": { "description": "PostableAlert postable alert", @@ -16600,14 +16068,12 @@ "endsAt": { "description": "ends at\nFormat: date-time", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "generatorURL": { "description": "generator URL\nFormat: uri", "type": "string", - "format": "uri", - "x-go-name": "GeneratorURL" + "format": "uri" }, "labels": { "$ref": "#/definitions/labelSet" @@ -16615,21 +16081,16 @@ "startsAt": { "description": "starts at\nFormat: date-time", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } - }, - "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": { "description": "PostableSilence postable silence", @@ -16638,24 +16099,20 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "id": { "description": "id", - "type": "string", - "x-go-name": "ID" + "type": "string" }, "matchers": { "$ref": "#/definitions/matchers" @@ -16663,20 +16120,17 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } } }, "receiver": { - "description": "Receiver receiver", "type": "object", "required": ["name"], "properties": { "name": { "description": "name", - "type": "string", - "x-go-name": "Name" + "type": "string" } } }, @@ -16687,19 +16141,16 @@ "properties": { "comment": { "description": "comment", - "type": "string", - "x-go-name": "Comment" + "type": "string" }, "createdBy": { "description": "created by", - "type": "string", - "x-go-name": "CreatedBy" + "type": "string" }, "endsAt": { "description": "ends at", "type": "string", - "format": "date-time", - "x-go-name": "EndsAt" + "format": "date-time" }, "matchers": { "$ref": "#/definitions/matchers" @@ -16707,12 +16158,9 @@ "startsAt": { "description": "starts at", "type": "string", - "format": "date-time", - "x-go-name": "StartsAt" + "format": "date-time" } - }, - "x-go-name": "Silence", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "silenceStatus": { "description": "SilenceStatus silence status", @@ -16722,12 +16170,9 @@ "state": { "description": "state", "type": "string", - "enum": ["[expired active pending]"], - "x-go-name": "State" + "enum": ["[expired active pending]"] } - }, - "x-go-name": "SilenceStatus", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "versionInfo": { "description": "VersionInfo version info", @@ -16736,37 +16181,29 @@ "properties": { "branch": { "description": "branch", - "type": "string", - "x-go-name": "Branch" + "type": "string" }, "buildDate": { "description": "build date", - "type": "string", - "x-go-name": "BuildDate" + "type": "string" }, "buildUser": { "description": "build user", - "type": "string", - "x-go-name": "BuildUser" + "type": "string" }, "goVersion": { "description": "go version", - "type": "string", - "x-go-name": "GoVersion" + "type": "string" }, "revision": { "description": "revision", - "type": "string", - "x-go-name": "Revision" + "type": "string" }, "version": { "description": "version", - "type": "string", - "x-go-name": "Version" + "type": "string" } - }, - "x-go-name": "VersionInfo", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } } }, "responses": { diff --git a/public/api-spec.json b/public/api-spec.json index c739778b4f4..6166c6c37ab 100644 --- a/public/api-spec.json +++ b/public/api-spec.json @@ -8980,7 +8980,7 @@ "$ref": "#/definitions/ScheduleDTO" }, "state": { - "type": "string" + "$ref": "#/definitions/State" }, "templateVars": { "type": "object" @@ -9450,9 +9450,6 @@ "isHome": { "type": "boolean" }, - "isPublic": { - "type": "boolean" - }, "isSnapshot": { "type": "boolean" }, @@ -10054,6 +10051,9 @@ "Folder": { "type": "object", "properties": { + "accessControl": { + "$ref": "#/definitions/Metadata" + }, "canAdmin": { "type": "boolean" }, @@ -10105,6 +10105,9 @@ "FolderSearchHit": { "type": "object", "properties": { + "accessControl": { + "$ref": "#/definitions/Metadata" + }, "id": { "type": "integer", "format": "int64" @@ -11701,6 +11704,9 @@ } } }, + "State": { + "type": "string" + }, "Status": { "type": "object", "properties": {