Skip to content

Commit

Permalink
chore: update alerting swagger spec
Browse files Browse the repository at this point in the history
  • Loading branch information
megan-godfrey authored Sep 2, 2024
1 parent 968dfcb commit 3ebf994
Show file tree
Hide file tree
Showing 3 changed files with 240 additions and 228 deletions.
133 changes: 60 additions & 73 deletions pkg/services/ngalert/api/tooling/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -967,7 +967,9 @@
},
"type": "object"
},
"EvalQueriesResponse": {},
"EvalQueriesResponse": {
"type": "object"
},
"ExplorePanelsState": {
"description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties"
},
Expand Down Expand Up @@ -3655,6 +3657,20 @@
},
"type": "object"
},
"SilenceMetadata": {
"properties": {
"folder_uid": {
"type": "string"
},
"rule_title": {
"type": "string"
},
"rule_uid": {
"type": "string"
}
},
"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.",
"properties": {
Expand Down Expand Up @@ -4194,6 +4210,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.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"properties": {
"ForceQuery": {
"type": "boolean"
Expand Down Expand Up @@ -4229,7 +4246,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"
},
"UpdateRuleGroupResponse": {
Expand Down Expand Up @@ -4435,22 +4452,6 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
},
"type": "array"
},
"labels": {
"$ref": "#/definitions/labelSet"
},
"receiver": {
"$ref": "#/definitions/receiver"
}
},
"required": [
"alerts",
"labels",
Expand All @@ -4459,9 +4460,9 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/definitions/alertGroup"
"$ref": "#/definitions/alertGroup",
"type": "object"
},
"type": "array"
},
Expand Down Expand Up @@ -4564,6 +4565,7 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/definitions/labelSet"
Expand Down Expand Up @@ -4621,12 +4623,24 @@
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/definitions/gettableAlert"
"$ref": "#/definitions/gettableAlert",
"type": "object"
},
"type": "array"
},
"gettableSilence": {
"gettableGrafanaSilence": {
"properties": {
"accessControl": {
"additionalProperties": {
"type": "boolean"
},
"example": {
"create": false,
"read": true,
"write": false
},
"type": "object"
},
"comment": {
"description": "comment",
"type": "string"
Expand All @@ -4647,6 +4661,9 @@
"matchers": {
"$ref": "#/definitions/matchers"
},
"metadata": {
"$ref": "#/definitions/SilenceMetadata"
},
"startsAt": {
"description": "starts at",
"format": "date-time",
Expand All @@ -4673,37 +4690,34 @@
],
"type": "object"
},
"gettableGrafanaSilences": {
"items": {
"$ref": "#/definitions/gettableGrafanaSilence"
},
"type": "array"
},
"gettableSilence": {
"required": [
"comment",
"createdBy",
"endsAt",
"matchers",
"startsAt",
"id",
"status",
"updatedAt"
],
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/definitions/gettableSilence"
"$ref": "#/definitions/gettableSilence",
"type": "object"
},
"type": "array"
},
"integration": {
"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": {
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
"type": "string"
},
"lastNotifyAttemptError": {
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
"type": "string"
},
"name": {
"description": "name",
"type": "string"
},
"sendResolved": {
"description": "send resolved",
"type": "boolean"
}
},
"required": [
"name",
"sendResolved"
Expand Down Expand Up @@ -4824,33 +4838,6 @@
"type": "array"
},
"postableSilence": {
"properties": {
"comment": {
"description": "comment",
"type": "string"
},
"createdBy": {
"description": "created by",
"type": "string"
},
"endsAt": {
"description": "ends at",
"format": "date-time",
"type": "string"
},
"id": {
"description": "id",
"type": "string"
},
"matchers": {
"$ref": "#/definitions/matchers"
},
"startsAt": {
"description": "starts at",
"format": "date-time",
"type": "string"
}
},
"required": [
"comment",
"createdBy",
Expand Down
Loading

0 comments on commit 3ebf994

Please sign in to comment.