Skip to content

Commit ef14e7b

Browse files
authored
chore: update alerting swagger spec
1 parent bf9f6c2 commit ef14e7b

File tree

2 files changed

+176
-2
lines changed

2 files changed

+176
-2
lines changed

pkg/services/ngalert/api/tooling/api.json

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,12 @@
15301530
},
15311531
"type": "array"
15321532
},
1533+
"msteamsv2_configs": {
1534+
"items": {
1535+
"$ref": "#/definitions/MSTeamsV2Config"
1536+
},
1537+
"type": "array"
1538+
},
15331539
"name": {
15341540
"description": "A unique identifier for this receiver.",
15351541
"type": "string"
@@ -2114,6 +2120,32 @@
21142120
"title": "InspectType is a type for the Inspect property of a Notice.",
21152121
"type": "integer"
21162122
},
2123+
"IntegrationStatus": {
2124+
"properties": {
2125+
"lastNotifyAttempt": {
2126+
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
2127+
"format": "date-time",
2128+
"type": "string"
2129+
},
2130+
"lastNotifyAttemptDuration": {
2131+
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
2132+
"type": "string"
2133+
},
2134+
"lastNotifyAttemptError": {
2135+
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
2136+
"type": "string"
2137+
},
2138+
"name": {
2139+
"description": "Name of the integration.",
2140+
"type": "string"
2141+
},
2142+
"sendResolved": {
2143+
"description": "Whether the integration is configured to send resolved notifications.",
2144+
"type": "boolean"
2145+
}
2146+
},
2147+
"type": "object"
2148+
},
21172149
"InternalDataLink": {
21182150
"description": "InternalDataLink definition to allow Explore links to be constructed in the backend",
21192151
"properties": {
@@ -2263,6 +2295,29 @@
22632295
},
22642296
"type": "object"
22652297
},
2298+
"MSTeamsV2Config": {
2299+
"properties": {
2300+
"http_config": {
2301+
"$ref": "#/definitions/HTTPClientConfig"
2302+
},
2303+
"send_resolved": {
2304+
"type": "boolean"
2305+
},
2306+
"text": {
2307+
"type": "string"
2308+
},
2309+
"title": {
2310+
"type": "string"
2311+
},
2312+
"webhook_url": {
2313+
"$ref": "#/definitions/SecretURL"
2314+
},
2315+
"webhook_url_file": {
2316+
"type": "string"
2317+
}
2318+
},
2319+
"type": "object"
2320+
},
22662321
"MatchRegexps": {
22672322
"additionalProperties": {
22682323
"type": "string"
@@ -2803,6 +2858,12 @@
28032858
},
28042859
"type": "array"
28052860
},
2861+
"msteamsv2_configs": {
2862+
"items": {
2863+
"$ref": "#/definitions/MSTeamsV2Config"
2864+
},
2865+
"type": "array"
2866+
},
28062867
"name": {
28072868
"description": "A unique identifier for this receiver.",
28082869
"type": "string"
@@ -3557,6 +3618,12 @@
35573618
},
35583619
"type": "array"
35593620
},
3621+
"msteamsv2_configs": {
3622+
"items": {
3623+
"$ref": "#/definitions/MSTeamsV2Config"
3624+
},
3625+
"type": "array"
3626+
},
35603627
"name": {
35613628
"description": "A unique identifier for this receiver.",
35623629
"type": "string"
@@ -3643,6 +3710,26 @@
36433710
"title": "ReceiverExport is the provisioned file export of alerting.ReceiverV1.",
36443711
"type": "object"
36453712
},
3713+
"ReceiverStatus": {
3714+
"properties": {
3715+
"active": {
3716+
"description": "Whether the receiver is used in a route or not.",
3717+
"type": "boolean"
3718+
},
3719+
"integrations": {
3720+
"description": "Integrations configured for this receiver.",
3721+
"items": {
3722+
"$ref": "#/definitions/IntegrationStatus"
3723+
},
3724+
"type": "array"
3725+
},
3726+
"name": {
3727+
"description": "Name of the receiver.",
3728+
"type": "string"
3729+
}
3730+
},
3731+
"type": "object"
3732+
},
36463733
"Record": {
36473734
"properties": {
36483735
"from": {
@@ -7314,7 +7401,7 @@
73147401
"description": "",
73157402
"schema": {
73167403
"items": {
7317-
"$ref": "#/definitions/Receiver"
7404+
"$ref": "#/definitions/ReceiverStatus"
73187405
},
73197406
"type": "array"
73207407
}

pkg/services/ngalert/api/tooling/spec.json

Lines changed: 88 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5834,6 +5834,12 @@
58345834
"$ref": "#/definitions/MSTeamsConfig"
58355835
}
58365836
},
5837+
"msteamsv2_configs": {
5838+
"type": "array",
5839+
"items": {
5840+
"$ref": "#/definitions/MSTeamsV2Config"
5841+
}
5842+
},
58375843
"name": {
58385844
"description": "A unique identifier for this receiver.",
58395845
"type": "string"
@@ -6417,6 +6423,32 @@
64176423
"format": "int64",
64186424
"title": "InspectType is a type for the Inspect property of a Notice."
64196425
},
6426+
"IntegrationStatus": {
6427+
"type": "object",
6428+
"properties": {
6429+
"lastNotifyAttempt": {
6430+
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
6431+
"type": "string",
6432+
"format": "date-time"
6433+
},
6434+
"lastNotifyAttemptDuration": {
6435+
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
6436+
"type": "string"
6437+
},
6438+
"lastNotifyAttemptError": {
6439+
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
6440+
"type": "string"
6441+
},
6442+
"name": {
6443+
"description": "Name of the integration.",
6444+
"type": "string"
6445+
},
6446+
"sendResolved": {
6447+
"description": "Whether the integration is configured to send resolved notifications.",
6448+
"type": "boolean"
6449+
}
6450+
}
6451+
},
64206452
"InternalDataLink": {
64216453
"description": "InternalDataLink definition to allow Explore links to be constructed in the backend",
64226454
"type": "object",
@@ -6566,6 +6598,29 @@
65666598
}
65676599
}
65686600
},
6601+
"MSTeamsV2Config": {
6602+
"type": "object",
6603+
"properties": {
6604+
"http_config": {
6605+
"$ref": "#/definitions/HTTPClientConfig"
6606+
},
6607+
"send_resolved": {
6608+
"type": "boolean"
6609+
},
6610+
"text": {
6611+
"type": "string"
6612+
},
6613+
"title": {
6614+
"type": "string"
6615+
},
6616+
"webhook_url": {
6617+
"$ref": "#/definitions/SecretURL"
6618+
},
6619+
"webhook_url_file": {
6620+
"type": "string"
6621+
}
6622+
}
6623+
},
65696624
"MatchRegexps": {
65706625
"type": "object",
65716626
"title": "MatchRegexps represents a map of Regexp.",
@@ -7108,6 +7163,12 @@
71087163
"$ref": "#/definitions/MSTeamsConfig"
71097164
}
71107165
},
7166+
"msteamsv2_configs": {
7167+
"type": "array",
7168+
"items": {
7169+
"$ref": "#/definitions/MSTeamsV2Config"
7170+
}
7171+
},
71117172
"name": {
71127173
"description": "A unique identifier for this receiver.",
71137174
"type": "string"
@@ -7863,6 +7924,12 @@
78637924
"$ref": "#/definitions/MSTeamsConfig"
78647925
}
78657926
},
7927+
"msteamsv2_configs": {
7928+
"type": "array",
7929+
"items": {
7930+
"$ref": "#/definitions/MSTeamsV2Config"
7931+
}
7932+
},
78667933
"name": {
78677934
"description": "A unique identifier for this receiver.",
78687935
"type": "string"
@@ -7947,6 +8014,26 @@
79478014
}
79488015
}
79498016
},
8017+
"ReceiverStatus": {
8018+
"type": "object",
8019+
"properties": {
8020+
"active": {
8021+
"description": "Whether the receiver is used in a route or not.",
8022+
"type": "boolean"
8023+
},
8024+
"integrations": {
8025+
"description": "Integrations configured for this receiver.",
8026+
"type": "array",
8027+
"items": {
8028+
"$ref": "#/definitions/IntegrationStatus"
8029+
}
8030+
},
8031+
"name": {
8032+
"description": "Name of the receiver.",
8033+
"type": "string"
8034+
}
8035+
}
8036+
},
79508037
"Record": {
79518038
"type": "object",
79528039
"required": [
@@ -9851,7 +9938,7 @@
98519938
"schema": {
98529939
"type": "array",
98539940
"items": {
9854-
"$ref": "#/definitions/Receiver"
9941+
"$ref": "#/definitions/ReceiverStatus"
98559942
}
98569943
}
98579944
}

0 commit comments

Comments
 (0)