Skip to content

Commit 3239cda

Browse files
added api
1 parent aa153c7 commit 3239cda

File tree

1 file changed

+112
-43
lines changed

1 file changed

+112
-43
lines changed

src/content/partials/magic-wan/magic-tunnel-health-alerts/magic-tunnel-health-alerts.mdx

Lines changed: 112 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -73,48 +73,48 @@ Send a [`POST` request](/api/resources/alerting/subresources/policies/methods/cr
7373

7474
<pre class="json output">
7575
{`
76-
{
77-
"result": [
78-
{
79-
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
80-
"name": "<POLICY_NAME>",
81-
"description": "<POLICY_DESCRIPTION>",
82-
"enabled": true,
83-
"alert_type": "magic_tunnel_health_check_event",
84-
"mechanisms": {
85-
"email": [
86-
{
87-
"id": "<YOUR_EMAIL>"
88-
}
89-
]
90-
},
91-
"created": "2024-09-11T14:13:29.585658Z",
92-
"modified": "2024-09-11T14:13:29.585658Z",
93-
"conditions": {
94-
"and": [
95-
{
96-
"or": [
97-
{
98-
"<=": [
99-
{
100-
"var": "slo"
101-
},
102-
"99.9"
103-
]
104-
}
105-
]
106-
}
107-
]
108-
},
109-
"filters": {
110-
"slo": ["99.9"]
76+
{
77+
"result": [
78+
{
79+
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
80+
"name": "<POLICY_NAME>",
81+
"description": "<POLICY_DESCRIPTION>",
82+
"enabled": true,
83+
"alert_type": "magic_tunnel_health_check_event",
84+
"mechanisms": {
85+
"email": [
86+
{
87+
"id": "<YOUR_EMAIL>"
88+
}
89+
]
90+
},
91+
"created": "2024-09-11T14:13:29.585658Z",
92+
"modified": "2024-09-11T14:13:29.585658Z",
93+
"conditions": {
94+
"and": [
95+
{
96+
"or": [
97+
{
98+
"<=": [
99+
{
100+
"var": "slo"
101+
},
102+
"99.9"
103+
]
104+
}
105+
]
106+
}
107+
]
108+
},
109+
"filters": {
110+
"slo": ["99.9"]
111+
}
111112
}
112-
}
113-
],
114-
"success": true,
115-
"errors": [],
116-
"messages": []
117-
}
113+
],
114+
"success": true,
115+
"errors": [],
116+
"messages": []
117+
}
118118
`}
119119
</pre>
120120
</>
@@ -123,7 +123,76 @@ Send a [`POST` request](/api/resources/alerting/subresources/policies/methods/cr
123123

124124
{ props.magicWord === "Magic WAN" && (
125125
<>
126-
126+
<APIRequest
127+
path="/accounts/{account_id}/alerting/v3/policies"
128+
method="POST"
129+
json={{
130+
"alert_type": "magic_wan_tunnel_health",
131+
"description": "<DESCRIBE_POLICY>",
132+
"enabled": true,
133+
"filters": {
134+
"slo": [
135+
"99.9"
136+
]
137+
},
138+
"mechanisms": {
139+
"email": [
140+
{
141+
"id": "EMAIL_ADDRESS"
142+
}
143+
]},
144+
"name": "<DESCRIBE_ALERT>"
145+
}}
146+
/>
147+
148+
<pre class="json output">
149+
{`
150+
{
151+
"result": [
152+
{
153+
"id": "f174e90a-fafe-4643-bbbc-4a0ed4fc8415",
154+
"name": "<POLICY_NAME>",
155+
"description": "<POLICY_DESCRIPTION>",
156+
"enabled": true,
157+
"alert_type": "magic_wan_tunnel_health",
158+
"mechanisms": {
159+
"email": [
160+
{
161+
"id": "<YOUR_EMAIL>"
162+
}
163+
]
164+
},
165+
"created": "2024-09-11T14:13:29.585658Z",
166+
"modified": "2024-09-11T14:13:29.585658Z",
167+
"conditions": {
168+
"and": [
169+
{
170+
"or": [
171+
{
172+
"<=": [
173+
{
174+
"var": "slo"
175+
},
176+
"99.9"
177+
]
178+
}
179+
]
180+
}
181+
]
182+
},
183+
"filters": {
184+
"slo": ["99.9"]
185+
}
186+
}
187+
],
188+
"success": true,
189+
"errors": [],
190+
"messages": []
191+
}
192+
`}
193+
</pre>
127194
</>
128195
)
129-
}
196+
}
197+
198+
</TabItem> </Tabs>

0 commit comments

Comments
 (0)