Files
grafana/spec.json
T

1338 lines
36 KiB
JSON

{
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"schemes": [
"http",
"https"
],
"swagger": "2.0",
"info": {
"title": "Documentation of the API.",
"version": "1.0.0"
},
"basePath": "/api/v1",
"paths": {
"/api/dashboards/db": {
"post": {
"description": "creates a dashboard with alerts",
"schemes": [
"http",
"https"
],
"operationId": "RoutePostGrDashboards",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/SaveDashboardCommand"
}
}
],
"responses": {
"200": {
"description": "Ok",
"schema": {
"$ref": "#/definitions/Ok"
}
},
"400": {
"description": "BadRequest",
"schema": {
"$ref": "#/definitions/BadRequest"
}
},
"401": {
"description": "Unauthorized",
"schema": {
"$ref": "#/definitions/Unauthorized"
}
},
"403": {
"description": "QuotaExceeded",
"schema": {
"$ref": "#/definitions/QuotaExceeded"
}
},
"412": {
"description": "PreconditionFailed",
"schema": {
"$ref": "#/definitions/PreconditionFailed"
}
},
"500": {
"description": "Err",
"schema": {
"$ref": "#/definitions/Err"
}
}
}
}
},
"/api/v1/alerts": {
"post": {
"description": "sets an Alertmanager config",
"schemes": [
"http",
"https"
],
"tags": [
"alertmanager"
],
"operationId": "RoutePostAM",
"parameters": [
{
"name": "Body",
"in": "body",
"schema": {
"$ref": "#/definitions/Config"
}
}
],
"responses": {
"204": {
"description": "Ack",
"schema": {
"$ref": "#/definitions/Ack"
}
},
"400": {
"description": "ValidationError",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
}
}
}
},
"definitions": {
"Ack": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"BadRequest": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"BasicAuth": {
"type": "object",
"title": "BasicAuth contains basic HTTP authentication credentials.",
"properties": {
"Password": {
"$ref": "#/definitions/Secret"
},
"PasswordFile": {
"type": "string"
},
"Username": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"Config": {
"type": "object",
"title": "Config is the top-level configuration for Alertmanager's config files.",
"properties": {
"global": {
"$ref": "#/definitions/GlobalConfig"
},
"inhibit_rules": {
"type": "array",
"items": {
"$ref": "#/definitions/InhibitRule"
},
"x-go-name": "InhibitRules"
},
"receivers": {
"type": "array",
"items": {
"$ref": "#/definitions/Receiver"
},
"x-go-name": "Receivers"
},
"route": {
"$ref": "#/definitions/Route"
},
"templates": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "Templates"
}
},
"$ref": "#/definitions/Config"
},
"Dashboard": {
"description": "Dashboard model",
"type": "object",
"properties": {
"Created": {
"type": "string",
"format": "date-time"
},
"CreatedBy": {
"type": "integer",
"format": "int64"
},
"Data": {
"$ref": "#/definitions/Json"
},
"FolderId": {
"type": "integer",
"format": "int64"
},
"GnetId": {
"type": "integer",
"format": "int64"
},
"HasAcl": {
"type": "boolean"
},
"Id": {
"type": "integer",
"format": "int64"
},
"IsFolder": {
"type": "boolean"
},
"OrgId": {
"type": "integer",
"format": "int64"
},
"PluginId": {
"type": "string"
},
"Slug": {
"type": "string"
},
"Title": {
"type": "string"
},
"Uid": {
"type": "string"
},
"Updated": {
"type": "string",
"format": "date-time"
},
"UpdatedBy": {
"type": "integer",
"format": "int64"
},
"Version": {
"type": "integer",
"format": "int64"
}
},
"x-go-package": "github.com/grafana/grafana/pkg/models"
},
"Duration": {
"description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"type": "integer",
"format": "int64",
"$ref": "#/definitions/Duration"
},
"EmailConfig": {
"type": "object",
"title": "EmailConfig configures notifications via mail.",
"properties": {
"auth_identity": {
"type": "string",
"x-go-name": "AuthIdentity"
},
"auth_password": {
"$ref": "#/definitions/Secret"
},
"auth_secret": {
"$ref": "#/definitions/Secret"
},
"auth_username": {
"type": "string",
"x-go-name": "AuthUsername"
},
"from": {
"type": "string",
"x-go-name": "From"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Headers"
},
"hello": {
"type": "string",
"x-go-name": "Hello"
},
"html": {
"type": "string",
"x-go-name": "HTML"
},
"require_tls": {
"type": "boolean",
"x-go-name": "RequireTLS"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"smarthost": {
"$ref": "#/definitions/HostPort"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"tls_config": {
"$ref": "#/definitions/TLSConfig"
},
"to": {
"description": "Email address to notify.",
"type": "string",
"x-go-name": "To"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Err": {
"type": "object",
"properties": {
"Error": {
"type": "string"
},
"Message": {
"type": "string"
}
},
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"GlobalConfig": {
"description": "GlobalConfig defines configuration parameters that are valid globally\nunless overwritten.",
"type": "object",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"opsgenie_api_key": {
"$ref": "#/definitions/Secret"
},
"opsgenie_api_url": {
"$ref": "#/definitions/URL"
},
"pagerduty_url": {
"$ref": "#/definitions/URL"
},
"resolve_timeout": {
"$ref": "#/definitions/Duration"
},
"slack_api_url": {
"$ref": "#/definitions/SecretURL"
},
"smtp_auth_identity": {
"type": "string",
"x-go-name": "SMTPAuthIdentity"
},
"smtp_auth_password": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_secret": {
"$ref": "#/definitions/Secret"
},
"smtp_auth_username": {
"type": "string",
"x-go-name": "SMTPAuthUsername"
},
"smtp_from": {
"type": "string",
"x-go-name": "SMTPFrom"
},
"smtp_hello": {
"type": "string",
"x-go-name": "SMTPHello"
},
"smtp_require_tls": {
"type": "boolean",
"x-go-name": "SMTPRequireTLS"
},
"smtp_smarthost": {
"$ref": "#/definitions/HostPort"
},
"victorops_api_key": {
"$ref": "#/definitions/Secret"
},
"victorops_api_url": {
"$ref": "#/definitions/URL"
},
"wechat_api_corp_id": {
"type": "string",
"x-go-name": "WeChatAPICorpID"
},
"wechat_api_secret": {
"$ref": "#/definitions/Secret"
},
"wechat_api_url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"HTTPClientConfig": {
"type": "object",
"title": "HTTPClientConfig configures an HTTP client.",
"properties": {
"BasicAuth": {
"$ref": "#/definitions/BasicAuth"
},
"BearerToken": {
"$ref": "#/definitions/Secret"
},
"BearerTokenFile": {
"description": "The bearer token file for the targets.",
"type": "string"
},
"ProxyURL": {
"$ref": "#/definitions/URL"
},
"TLSConfig": {
"$ref": "#/definitions/TLSConfig"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"HostPort": {
"type": "object",
"title": "HostPort represents a \"host:port\" network address.",
"properties": {
"Host": {
"type": "string"
},
"Port": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"InhibitRule": {
"description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.",
"type": "object",
"properties": {
"equal": {
"$ref": "#/definitions/LabelNames"
},
"source_match": {
"description": "SourceMatch defines a set of labels that have to equal the given\nvalue for source alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "SourceMatch"
},
"source_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"source_matchers": {
"$ref": "#/definitions/Matchers"
},
"target_match": {
"description": "TargetMatch defines a set of labels that have to equal the given\nvalue for target alerts. Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "TargetMatch"
},
"target_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"target_matchers": {
"$ref": "#/definitions/Matchers"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Json": {
"type": "object",
"x-go-package": "github.com/grafana/grafana/pkg/components/simplejson"
},
"LabelName": {
"description": "A LabelName is a key for a LabelSet or Metric. It has a value associated\ntherewith.",
"type": "string",
"x-go-package": "github.com/prometheus/common/model"
},
"LabelNames": {
"type": "array",
"title": "LabelNames is a sortable LabelName slice. In implements sort.Interface.",
"items": {
"$ref": "#/definitions/LabelName"
},
"x-go-package": "github.com/prometheus/common/model"
},
"MatchRegexps": {
"type": "object",
"title": "MatchRegexps represents a map of Regexp.",
"additionalProperties": {
"$ref": "#/definitions/Regexp"
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"MatchType": {
"type": "integer",
"format": "int64",
"title": "MatchType is an enum for label matching types.",
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matcher": {
"type": "object",
"title": "Matcher models the matching of a label.",
"properties": {
"Name": {
"type": "string"
},
"Type": {
"$ref": "#/definitions/MatchType"
},
"Value": {
"type": "string"
}
},
"x-go-package": "github.com/prometheus/alertmanager/pkg/labels"
},
"Matchers": {
"description": "Matchers is a slice of Matchers that is sortable, implements Stringer, and\nprovides a Matches method to match a LabelSet against all Matchers in the\nslice. Note that some users of Matchers might require it to be sorted.",
"type": "array",
"items": {
"$ref": "#/definitions/Matcher"
},
"$ref": "#/definitions/Matchers"
},
"NotifierConfig": {
"type": "object",
"title": "NotifierConfig contains base options common across all notifier configurations.",
"properties": {
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Ok": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"OpsGenieConfig": {
"type": "object",
"title": "OpsGenieConfig configures notifications via OpsGenie.",
"properties": {
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"note": {
"type": "string",
"x-go-name": "Note"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"responders": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfigResponder"
},
"x-go-name": "Responders"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"source": {
"type": "string",
"x-go-name": "Source"
},
"tags": {
"type": "string",
"x-go-name": "Tags"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"OpsGenieConfigResponder": {
"type": "object",
"properties": {
"id": {
"description": "One of those 3 should be filled.",
"type": "string",
"x-go-name": "ID"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"type": {
"description": "team, user, escalation, schedule etc.",
"type": "string",
"x-go-name": "Type"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyConfig": {
"type": "object",
"title": "PagerdutyConfig configures notifications via PagerDuty.",
"properties": {
"class": {
"type": "string",
"x-go-name": "Class"
},
"client": {
"type": "string",
"x-go-name": "Client"
},
"client_url": {
"type": "string",
"x-go-name": "ClientURL"
},
"component": {
"type": "string",
"x-go-name": "Component"
},
"description": {
"type": "string",
"x-go-name": "Description"
},
"details": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Details"
},
"group": {
"type": "string",
"x-go-name": "Group"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"images": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyImage"
},
"x-go-name": "Images"
},
"links": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyLink"
},
"x-go-name": "Links"
},
"routing_key": {
"$ref": "#/definitions/Secret"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"service_key": {
"$ref": "#/definitions/Secret"
},
"severity": {
"type": "string",
"x-go-name": "Severity"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyImage": {
"description": "PagerdutyImage is an image",
"type": "object",
"properties": {
"alt": {
"type": "string",
"x-go-name": "Alt"
},
"href": {
"type": "string",
"x-go-name": "Href"
},
"src": {
"type": "string",
"x-go-name": "Src"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PagerdutyLink": {
"description": "PagerdutyLink is a link",
"type": "object",
"properties": {
"href": {
"type": "string",
"x-go-name": "Href"
},
"text": {
"type": "string",
"x-go-name": "Text"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"PreconditionFailed": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"PushoverConfig": {
"type": "object",
"properties": {
"expire": {
"$ref": "#/definitions/duration"
},
"html": {
"type": "boolean",
"x-go-name": "HTML"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"priority": {
"type": "string",
"x-go-name": "Priority"
},
"retry": {
"$ref": "#/definitions/duration"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"sound": {
"type": "string",
"x-go-name": "Sound"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"token": {
"$ref": "#/definitions/Secret"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"url_title": {
"type": "string",
"x-go-name": "URLTitle"
},
"user_key": {
"$ref": "#/definitions/Secret"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"QuotaExceeded": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"Receiver": {
"type": "object",
"title": "Receiver configuration provides configuration on how to contact a receiver.",
"properties": {
"email_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/EmailConfig"
},
"x-go-name": "EmailConfigs"
},
"name": {
"description": "A unique identifier for this receiver.",
"type": "string",
"x-go-name": "Name"
},
"opsgenie_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/OpsGenieConfig"
},
"x-go-name": "OpsGenieConfigs"
},
"pagerduty_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PagerdutyConfig"
},
"x-go-name": "PagerdutyConfigs"
},
"pushover_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/PushoverConfig"
},
"x-go-name": "PushoverConfigs"
},
"slack_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackConfig"
},
"x-go-name": "SlackConfigs"
},
"victorops_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/VictorOpsConfig"
},
"x-go-name": "VictorOpsConfigs"
},
"webhook_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WebhookConfig"
},
"x-go-name": "WebhookConfigs"
},
"wechat_configs": {
"type": "array",
"items": {
"$ref": "#/definitions/WechatConfig"
},
"x-go-name": "WechatConfigs"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"Regexp": {
"description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.",
"type": "object",
"title": "Regexp is the representation of a compiled regular expression.",
"x-go-package": "regexp"
},
"Route": {
"type": "object",
"title": "A Route is a node that contains definitions of how to handle alerts.",
"properties": {
"continue": {
"type": "boolean",
"x-go-name": "Continue"
},
"group_by": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "GroupByStr"
},
"group_interval": {
"$ref": "#/definitions/Duration"
},
"group_wait": {
"$ref": "#/definitions/Duration"
},
"match": {
"description": "Deprecated. Remove before v1.0 release.",
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "Match"
},
"match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"matchers": {
"$ref": "#/definitions/Matchers"
},
"receiver": {
"type": "string",
"x-go-name": "Receiver"
},
"repeat_interval": {
"$ref": "#/definitions/Duration"
},
"routes": {
"type": "array",
"items": {
"$ref": "#/definitions/Route"
},
"x-go-name": "Routes"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SaveDashboardCommand": {
"type": "object",
"properties": {
"Result": {
"$ref": "#/definitions/Dashboard"
},
"UpdatedAt": {
"type": "string",
"format": "date-time"
},
"dashboard": {
"$ref": "#/definitions/Json"
},
"folderId": {
"type": "integer",
"format": "int64",
"x-go-name": "FolderId"
},
"isFolder": {
"type": "boolean",
"x-go-name": "IsFolder"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"overwrite": {
"type": "boolean",
"x-go-name": "Overwrite"
},
"userId": {
"type": "integer",
"format": "int64",
"x-go-name": "UserId"
}
},
"$ref": "#/definitions/SaveDashboardCommand"
},
"Secret": {
"type": "string",
"title": "Secret special type for storing secrets.",
"x-go-package": "github.com/prometheus/common/config"
},
"SecretURL": {
"title": "SecretURL is a URL that must not be revealed on marshaling.",
"$ref": "#/definitions/URL"
},
"SlackAction": {
"description": "See https://api.slack.com/docs/message-attachments#action_fields and https://api.slack.com/docs/message-buttons\nfor more information.",
"type": "object",
"title": "SlackAction configures a single Slack action that is sent with each notification.",
"properties": {
"confirm": {
"$ref": "#/definitions/SlackConfirmationField"
},
"name": {
"type": "string",
"x-go-name": "Name"
},
"style": {
"type": "string",
"x-go-name": "Style"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"type": {
"type": "string",
"x-go-name": "Type"
},
"url": {
"type": "string",
"x-go-name": "URL"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfig": {
"type": "object",
"title": "SlackConfig configures notifications via Slack.",
"properties": {
"actions": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackAction"
},
"x-go-name": "Actions"
},
"api_url": {
"$ref": "#/definitions/SecretURL"
},
"callback_id": {
"type": "string",
"x-go-name": "CallbackID"
},
"channel": {
"description": "Slack channel override, (like #other-channel or @username).",
"type": "string",
"x-go-name": "Channel"
},
"color": {
"type": "string",
"x-go-name": "Color"
},
"fallback": {
"type": "string",
"x-go-name": "Fallback"
},
"fields": {
"type": "array",
"items": {
"$ref": "#/definitions/SlackField"
},
"x-go-name": "Fields"
},
"footer": {
"type": "string",
"x-go-name": "Footer"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"icon_emoji": {
"type": "string",
"x-go-name": "IconEmoji"
},
"icon_url": {
"type": "string",
"x-go-name": "IconURL"
},
"image_url": {
"type": "string",
"x-go-name": "ImageURL"
},
"link_names": {
"type": "boolean",
"x-go-name": "LinkNames"
},
"mrkdwn_in": {
"type": "array",
"items": {
"type": "string"
},
"x-go-name": "MrkdwnIn"
},
"pretext": {
"type": "string",
"x-go-name": "Pretext"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"short_fields": {
"type": "boolean",
"x-go-name": "ShortFields"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"thumb_url": {
"type": "string",
"x-go-name": "ThumbURL"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"title_link": {
"type": "string",
"x-go-name": "TitleLink"
},
"username": {
"type": "string",
"x-go-name": "Username"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackConfirmationField": {
"description": "SlackConfirmationField protect users from destructive actions or particularly distinguished decisions\nby asking them to confirm their button click one more time.\nSee https://api.slack.com/docs/interactive-message-field-guide#confirmation_fields for more information.",
"type": "object",
"properties": {
"dismiss_text": {
"type": "string",
"x-go-name": "DismissText"
},
"ok_text": {
"type": "string",
"x-go-name": "OkText"
},
"text": {
"type": "string",
"x-go-name": "Text"
},
"title": {
"type": "string",
"x-go-name": "Title"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"SlackField": {
"description": "Each field must contain a title, value, and optionally, a boolean value to indicate if the field\nis short enough to be displayed next to other fields designated as short.\nSee https://api.slack.com/docs/message-attachments#fields for more information.",
"type": "object",
"title": "SlackField configures a single Slack field that is sent with each notification.",
"properties": {
"short": {
"type": "boolean",
"x-go-name": "Short"
},
"title": {
"type": "string",
"x-go-name": "Title"
},
"value": {
"type": "string",
"x-go-name": "Value"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"TLSConfig": {
"type": "object",
"title": "TLSConfig configures the options for TLS connections.",
"properties": {
"CAFile": {
"description": "The CA cert to use for the targets.",
"type": "string"
},
"CertFile": {
"description": "The client cert file for the targets.",
"type": "string"
},
"InsecureSkipVerify": {
"description": "Disable target certificate validation.",
"type": "boolean"
},
"KeyFile": {
"description": "The client key file for the targets.",
"type": "string"
},
"ServerName": {
"description": "Used to verify the hostname for the targets.",
"type": "string"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"URL": {
"type": "object",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
},
"Fragment": {
"type": "string"
},
"Host": {
"type": "string"
},
"Opaque": {
"type": "string"
},
"Path": {
"type": "string"
},
"RawFragment": {
"type": "string"
},
"RawPath": {
"type": "string"
},
"RawQuery": {
"type": "string"
},
"Scheme": {
"type": "string"
},
"User": {
"$ref": "#/definitions/Userinfo"
}
},
"x-go-package": "github.com/prometheus/common/config"
},
"Unauthorized": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"Userinfo": {
"description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.",
"type": "object",
"x-go-package": "net/url"
},
"ValidationError": {
"type": "object",
"x-go-package": "github.com/grafana/alerting-api/pkg/models"
},
"VictorOpsConfig": {
"type": "object",
"title": "VictorOpsConfig configures notifications via VictorOps.",
"properties": {
"api_key": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"custom_fields": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"x-go-name": "CustomFields"
},
"entity_display_name": {
"type": "string",
"x-go-name": "EntityDisplayName"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"monitoring_tool": {
"type": "string",
"x-go-name": "MonitoringTool"
},
"routing_key": {
"type": "string",
"x-go-name": "RoutingKey"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"state_message": {
"type": "string",
"x-go-name": "StateMessage"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WebhookConfig": {
"type": "object",
"title": "WebhookConfig configures notifications via a generic webhook.",
"properties": {
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"max_alerts": {
"description": "MaxAlerts is the maximum number of alerts to be sent per webhook message.\nAlerts exceeding this threshold will be truncated. Setting this to 0\nallows an unlimited number of alerts.",
"type": "integer",
"format": "uint64",
"x-go-name": "MaxAlerts"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"url": {
"$ref": "#/definitions/URL"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"WechatConfig": {
"type": "object",
"title": "WechatConfig configures notifications via Wechat.",
"properties": {
"agent_id": {
"type": "string",
"x-go-name": "AgentID"
},
"api_secret": {
"$ref": "#/definitions/Secret"
},
"api_url": {
"$ref": "#/definitions/URL"
},
"corp_id": {
"type": "string",
"x-go-name": "CorpID"
},
"http_config": {
"$ref": "#/definitions/HTTPClientConfig"
},
"message": {
"type": "string",
"x-go-name": "Message"
},
"message_type": {
"type": "string",
"x-go-name": "MessageType"
},
"send_resolved": {
"type": "boolean",
"x-go-name": "VSendResolved"
},
"to_party": {
"type": "string",
"x-go-name": "ToParty"
},
"to_tag": {
"type": "string",
"x-go-name": "ToTag"
},
"to_user": {
"type": "string",
"x-go-name": "ToUser"
}
},
"x-go-package": "github.com/prometheus/alertmanager/config"
},
"duration": {
"$ref": "#/definitions/Duration"
}
},
"securityDefinitions": {
"basic": {
"type": "basic"
}
}
}