Compare commits

...
Author SHA1 Message Date
hanzo-devandgithub-actions[bot] 25ab4cde78 chore: update alerting swagger spec 2026-07-06 01:02:31 +00:00
3 changed files with 537 additions and 71 deletions
+2 -23
View File
@@ -1789,7 +1789,6 @@
"type": "integer"
},
"last_applied": {
"format": "date-time",
"type": "string"
},
"template_file_provenances": {
@@ -1884,7 +1883,6 @@
},
"uptime": {
"description": "uptime",
"format": "date-time",
"type": "string"
},
"versionInfo": {
@@ -2204,7 +2202,6 @@
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
"format": "date-time",
"type": "string"
},
"lastNotifyAttemptDuration": {
@@ -4944,6 +4941,7 @@
"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\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use the [URL.EscapedPath] method, which preserves\nthe original encoding of Path. The Fragment field is also stored in decoded form,\nuse [URL.EscapedFragment] to retrieve the original encoding.\n\nThe [URL.String] method uses the [URL.EscapedPath] method to obtain the path.",
"properties": {
"ForceQuery": {
"description": "ForceQuery indicates whether the original URL contained a query ('?') character.\nWhen set, the String method will include a trailing '?', even when RawQuery is empty.",
@@ -4984,7 +4982,7 @@
"$ref": "#/definitions/Userinfo"
}
},
"title": "URL is a custom URL type that allows validation at configuration load time.",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"type": "object"
},
"UpdateNamespaceRulesRequest": {
@@ -5208,7 +5206,6 @@
"properties": {
"generatorURL": {
"description": "generator URL\nFormat: uri",
"format": "uri",
"type": "string"
},
"labels": {
@@ -5308,7 +5305,6 @@
},
"uptime": {
"description": "uptime",
"format": "date-time",
"type": "string"
},
"versionInfo": {
@@ -5358,7 +5354,6 @@
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"fingerprint": {
@@ -5367,7 +5362,6 @@
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"format": "uri",
"type": "string"
},
"labels": {
@@ -5382,7 +5376,6 @@
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
},
"status": {
@@ -5390,7 +5383,6 @@
},
"updatedAt": {
"description": "updated at",
"format": "date-time",
"type": "string"
}
},
@@ -5437,7 +5429,6 @@
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"id": {
@@ -5452,7 +5443,6 @@
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
},
"status": {
@@ -5460,7 +5450,6 @@
},
"updatedAt": {
"description": "updated at",
"format": "date-time",
"type": "string"
}
},
@@ -5495,7 +5484,6 @@
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"id": {
@@ -5507,7 +5495,6 @@
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
},
"status": {
@@ -5515,7 +5502,6 @@
},
"updatedAt": {
"description": "updated at",
"format": "date-time",
"type": "string"
}
},
@@ -5615,12 +5601,10 @@
},
"endsAt": {
"description": "ends at\nFormat: date-time",
"format": "date-time",
"type": "string"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"format": "uri",
"type": "string"
},
"labels": {
@@ -5628,7 +5612,6 @@
},
"startsAt": {
"description": "starts at\nFormat: date-time",
"format": "date-time",
"type": "string"
}
},
@@ -5657,7 +5640,6 @@
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"id": {
@@ -5669,7 +5651,6 @@
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
}
},
@@ -5708,7 +5689,6 @@
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"matchers": {
@@ -5716,7 +5696,6 @@
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
}
},
+513 -4
View File
@@ -1,5 +1,5 @@
{
"basePath": "/api",
"basePath": "/api/v2/",
"consumes": [
"application/json"
],
@@ -2149,6 +2149,52 @@
},
"type": "object"
},
"InhibitionRule": {
"description": "It embeds the upstream Alertmanager InhibitRule and adds Grafana-specific fields.",
"properties": {
"equal": {
"description": "A set of labels that must be equal between the source and target alert\nfor them to be a match.",
"items": {
"type": "string"
},
"type": "array"
},
"name": {
"type": "string"
},
"provenance": {
"$ref": "#/definitions/Provenance"
},
"source_match": {
"additionalProperties": {
"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"
},
"source_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"source_matchers": {
"$ref": "#/definitions/Matchers"
},
"target_match": {
"additionalProperties": {
"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"
},
"target_match_re": {
"$ref": "#/definitions/MatchRegexps"
},
"target_matchers": {
"$ref": "#/definitions/Matchers"
}
},
"title": "InhibitionRule is the domain model for inhibition rules with metadata.",
"type": "object"
},
"InspectType": {
"format": "int64",
"title": "InspectType is a type for the Inspect property of a Notice.",
@@ -2352,6 +2398,19 @@
},
"type": "object"
},
"ManagedInhibitionRules": {
"additionalProperties": {
"$ref": "#/definitions/InhibitionRule"
},
"type": "object"
},
"ManagedRoutes": {
"additionalProperties": {
"$ref": "#/definitions/Route"
},
"description": "ManagedRoutes this type exists purely to ensure unmarshalling upstream Routes will call Validate and populate\nGroupBy and GroupByAll. Eventually, we will want this to be a separate type and make the conversion to\ndefinitions.Route explicit.",
"type": "object"
},
"MatchRegexps": {
"additionalProperties": {
"type": "string"
@@ -2849,6 +2908,16 @@
"PermissionDenied": {
"type": "object"
},
"PostSilencesOKBody": {
"description": "PostSilencesOKBody post silences o k body",
"properties": {
"silenceID": {
"description": "silence ID",
"type": "string"
}
},
"type": "object"
},
"PostableApiAlertingConfig": {
"description": "nolint:revive",
"properties": {
@@ -3220,6 +3289,12 @@
},
"type": "array"
},
"managed_inhibition_rules": {
"$ref": "#/definitions/ManagedInhibitionRules"
},
"managed_routes": {
"$ref": "#/definitions/ManagedRoutes"
},
"template_files": {
"additionalProperties": {
"type": "string"
@@ -4871,6 +4946,7 @@
"URL": {
"properties": {
"ForceQuery": {
"description": "ForceQuery indicates whether the original URL contained a query ('?') character.\nWhen set, the String method will include a trailing '?', even when RawQuery is empty.",
"type": "boolean"
},
"Fragment": {
@@ -4880,6 +4956,7 @@
"type": "string"
},
"OmitHost": {
"description": "OmitHost indicates the URL has an empty host (authority).\nWhen set, the String method will not include the host when it is empty.",
"type": "boolean"
},
"Opaque": {
@@ -4889,12 +4966,15 @@
"type": "string"
},
"RawFragment": {
"description": "RawFragment is an optional field containing an encoded fragment hint.\nSee the EscapedFragment method for more details.\n\nIn general, code should call EscapedFragment instead of reading RawFragment.",
"type": "string"
},
"RawPath": {
"description": "RawPath is an optional field containing an encoded path hint.\nSee the EscapedPath method for more details.\n\nIn general, code should call EscapedPath instead of reading RawPath.",
"type": "string"
},
"RawQuery": {
"description": "RawQuery contains the encoded query values, without the initial '?'.\nUse URL.Query to decode the query.",
"type": "string"
},
"Scheme": {
@@ -5704,10 +5784,15 @@
"type": "object"
}
},
"host": "localhost",
"info": {
"description": "Package definitions includes the types required for generating or consuming an OpenAPI\nspec for the Grafana Alerting API.",
"title": "Grafana Alerting API.",
"version": "1.1.0"
"description": "API of the Prometheus Alertmanager (https://github.com/prometheus/alertmanager)\nSchemes:\nhttp",
"license": {
"name": "Apache 2.0",
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
},
"title": "Alertmanager API",
"version": "0.0.1"
},
"paths": {
"/alertmanager/grafana/api/v2/alerts": {
@@ -6763,6 +6848,127 @@
]
}
},
"/alerts": {
"get": {
"description": "Get a list of alerts",
"operationId": "getAlerts",
"parameters": [
{
"default": true,
"description": "Show active alerts",
"in": "query",
"name": "Active",
"type": "boolean"
},
{
"collectionFormat": "multi",
"description": "A list of matchers to filter alerts by",
"in": "query",
"items": {
"type": "string"
},
"name": "Filter",
"type": "array"
},
{
"default": true,
"description": "Show inhibited alerts",
"in": "query",
"name": "Inhibited",
"type": "boolean"
},
{
"description": "A regex matching receivers to filter alerts by",
"in": "query",
"name": "Receiver",
"type": "string"
},
{
"default": true,
"description": "Show silenced alerts",
"in": "query",
"name": "Silenced",
"type": "boolean"
},
{
"default": true,
"description": "Show unprocessed alerts",
"in": "query",
"name": "Unprocessed",
"type": "boolean"
}
],
"tags": [
"alert"
]
},
"post": {
"description": "Create new Alerts",
"operationId": "postAlerts",
"parameters": [
{
"description": "The alerts to create",
"in": "body",
"name": "Alerts",
"required": true,
"schema": {
"$ref": "#/definitions/postableAlerts"
}
}
],
"tags": [
"alert"
]
}
},
"/alerts/groups": {
"get": {
"description": "Get a list of alert groups",
"operationId": "getAlertGroups",
"parameters": [
{
"default": true,
"description": "Show active alerts",
"in": "query",
"name": "Active",
"type": "boolean"
},
{
"collectionFormat": "multi",
"description": "A list of matchers to filter alerts by",
"in": "query",
"items": {
"type": "string"
},
"name": "Filter",
"type": "array"
},
{
"default": true,
"description": "Show inhibited alerts",
"in": "query",
"name": "Inhibited",
"type": "boolean"
},
{
"description": "A regex matching receivers to filter alerts by",
"in": "query",
"name": "Receiver",
"type": "string"
},
{
"default": true,
"description": "Show silenced alerts",
"in": "query",
"name": "Silenced",
"type": "boolean"
}
],
"tags": [
"alertgroup"
]
}
},
"/convert/api/prom/rules": {
"get": {
"operationId": "RouteConvertPrometheusCortexGetRules",
@@ -7137,6 +7343,18 @@
"name": "x-grafana-alerting-merge-matchers",
"type": "string"
},
{
"description": "If true, the configuration will replace an existing configuration regardless of its identifier",
"in": "header",
"name": "x-grafana-alerting-config-force-replace",
"type": "boolean"
},
{
"description": "If true, validates the configuration without saving it",
"in": "header",
"name": "x-grafana-alerting-dry-run",
"type": "boolean"
},
{
"description": "Alertmanager configuration including routing rules, receivers, and template files",
"in": "body",
@@ -7711,6 +7929,15 @@
]
}
},
"/receivers": {
"get": {
"description": "Get list of all receivers (name of notification integrations)",
"operationId": "getReceivers",
"tags": [
"receiver"
]
}
},
"/ruler/grafana/api/v1/export/rules": {
"get": {
"description": "List rules in provisioning format",
@@ -8539,6 +8766,90 @@
]
}
},
"/silence/{silenceID}": {
"delete": {
"description": "Delete a silence by its ID",
"operationId": "deleteSilence",
"parameters": [
{
"description": "ID of the silence to get",
"format": "uuid",
"in": "path",
"name": "SilenceID",
"required": true,
"type": "string"
}
],
"tags": [
"silence"
]
},
"get": {
"description": "Get a silence by its ID",
"operationId": "getSilence",
"parameters": [
{
"description": "ID of the silence to get",
"format": "uuid",
"in": "path",
"name": "SilenceID",
"required": true,
"type": "string"
}
],
"tags": [
"silence"
]
}
},
"/silences": {
"get": {
"description": "Get a list of silences",
"operationId": "getSilences",
"parameters": [
{
"collectionFormat": "multi",
"description": "A list of matchers to filter silences by",
"in": "query",
"items": {
"type": "string"
},
"name": "Filter",
"type": "array"
}
],
"tags": [
"silence"
]
},
"post": {
"description": "Post a new silence or update an existing one",
"operationId": "postSilences",
"parameters": [
{
"description": "The silence to create",
"in": "body",
"name": "Silence",
"required": true,
"schema": {
"$ref": "#/definitions/postableSilence"
}
}
],
"tags": [
"silence"
]
}
},
"/status": {
"get": {
"description": "Get current status of an Alertmanager instance and its cluster",
"operationId": "getStatus",
"tags": [
"general"
]
}
},
"/v1/eval": {
"post": {
"consumes": [
@@ -10103,6 +10414,204 @@
"type": "array"
}
},
"deleteSilenceInternalServerError": {
"description": "DeleteSilenceInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"deleteSilenceNotFound": {
"description": "DeleteSilenceNotFound A silence with the specified ID was not found"
},
"deleteSilenceOK": {
"description": "DeleteSilenceOK Delete silence response"
},
"getAlertGroupsBadRequest": {
"description": "GetAlertGroupsBadRequest Bad request",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getAlertGroupsInternalServerError": {
"description": "GetAlertGroupsInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getAlertGroupsOK": {
"description": "GetAlertGroupsOK Get alert groups response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/alertGroups"
}
},
"getAlertsBadRequest": {
"description": "GetAlertsBadRequest Bad request",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getAlertsInternalServerError": {
"description": "GetAlertsInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getAlertsOK": {
"description": "GetAlertsOK Get alerts response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/gettableAlerts"
}
},
"getReceiversOK": {
"description": "GetReceiversOK Get receivers response",
"headers": {
"body": {
"description": "In: Body",
"items": {
"$ref": "#/definitions/receiver"
},
"type": "array"
}
}
},
"getSilenceInternalServerError": {
"description": "GetSilenceInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getSilenceNotFound": {
"description": "GetSilenceNotFound A silence with the specified ID was not found"
},
"getSilenceOK": {
"description": "GetSilenceOK Get silence response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/gettableSilence"
}
},
"getSilencesBadRequest": {
"description": "GetSilencesBadRequest Bad request",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getSilencesInternalServerError": {
"description": "GetSilencesInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"getSilencesOK": {
"description": "GetSilencesOK Get silences response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/gettableSilences"
}
},
"getStatusOK": {
"description": "GetStatusOK Get status response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/alertmanagerStatus"
}
},
"postAlertsBadRequest": {
"description": "PostAlertsBadRequest Bad request",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"postAlertsInternalServerError": {
"description": "PostAlertsInternalServerError Internal server error",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"postAlertsOK": {
"description": "PostAlertsOK Create alerts response"
},
"postSilencesBadRequest": {
"description": "PostSilencesBadRequest Bad request",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"postSilencesNotFound": {
"description": "PostSilencesNotFound A silence with the specified ID was not found",
"headers": {
"body": {
"description": "In: Body",
"type": "string"
}
}
},
"postSilencesOK": {
"description": "PostSilencesOK Create / update silence response",
"headers": {
"body": {
"description": "In: Body"
}
},
"schema": {
"$ref": "#/definitions/PostSilencesOKBody"
}
},
"receiversResponse": {
"description": "",
"schema": {
+22 -44
View File
@@ -6446,8 +6446,7 @@
"format": "int64"
},
"last_applied": {
"type": "string",
"format": "date-time"
"type": "string"
},
"template_file_provenances": {
"type": "object",
@@ -6547,8 +6546,7 @@
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time"
"type": "string"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
@@ -6861,8 +6859,7 @@
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
"type": "string",
"format": "date-time"
"type": "string"
},
"lastNotifyAttemptDuration": {
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
@@ -9869,8 +9866,7 @@
"properties": {
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri"
"type": "string"
},
"labels": {
"$ref": "#/definitions/labelSet"
@@ -9972,8 +9968,7 @@
},
"uptime": {
"description": "uptime",
"type": "string",
"format": "date-time"
"type": "string"
},
"versionInfo": {
"$ref": "#/definitions/versionInfo"
@@ -10026,8 +10021,7 @@
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time"
"type": "string"
},
"fingerprint": {
"description": "fingerprint",
@@ -10035,8 +10029,7 @@
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri"
"type": "string"
},
"labels": {
"$ref": "#/definitions/labelSet"
@@ -10050,16 +10043,14 @@
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time"
"type": "string"
},
"status": {
"$ref": "#/definitions/alertStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},
@@ -10105,8 +10096,7 @@
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time"
"type": "string"
},
"id": {
"description": "id",
@@ -10120,16 +10110,14 @@
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time"
"type": "string"
},
"status": {
"$ref": "#/definitions/silenceStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},
@@ -10163,8 +10151,7 @@
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time"
"type": "string"
},
"id": {
"description": "id",
@@ -10175,16 +10162,14 @@
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time"
"type": "string"
},
"status": {
"$ref": "#/definitions/silenceStatus"
},
"updatedAt": {
"description": "updated at",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},
@@ -10276,21 +10261,18 @@
},
"endsAt": {
"description": "ends at\nFormat: date-time",
"type": "string",
"format": "date-time"
"type": "string"
},
"generatorURL": {
"description": "generator URL\nFormat: uri",
"type": "string",
"format": "uri"
"type": "string"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"startsAt": {
"description": "starts at\nFormat: date-time",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},
@@ -10322,8 +10304,7 @@
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time"
"type": "string"
},
"id": {
"description": "id",
@@ -10334,8 +10315,7 @@
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},
@@ -10373,16 +10353,14 @@
},
"endsAt": {
"description": "ends at",
"type": "string",
"format": "date-time"
"type": "string"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"type": "string",
"format": "date-time"
"type": "string"
}
}
},