[DOCS] Create open API specification for disable/enable rule and mute/unmute all alerts #148360 (#148494)

This commit is contained in:
Lisa Cawley 2023-01-10 16:01:16 -08:00 committed by GitHub
parent 42b88a8fab
commit b254abaf08
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 807 additions and 24 deletions

View file

@ -19,8 +19,14 @@ Any modifications made to this file will be overwritten.
<h4><a href="#Alerting">Alerting</a></h4>
<ul>
<li><a href="#deleteRule"><code><span class="http-method">delete</span> /s/{spaceId}/api/alerting/rule/{ruleId}</code></a></li>
<li><a href="#disableRule"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_disable</code></a></li>
<li><a href="#enableRule"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_enable</code></a></li>
<li><a href="#findRules"><code><span class="http-method">get</span> /s/{spaceId}/api/alerting/rules/_find</code></a></li>
<li><a href="#getRule"><code><span class="http-method">get</span> /s/{spaceId}/api/alerting/rule/{ruleId}</code></a></li>
<li><a href="#muteAlert"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute</code></a></li>
<li><a href="#muteAllAlerts"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all</code></a></li>
<li><a href="#unmuteAlert"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute</code></a></li>
<li><a href="#unmuteAllAlerts"><code><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all</code></a></li>
<li><a href="#updateRule"><code><span class="http-method">put</span> /s/{spaceId}/api/alerting/rule/{ruleId}</code></a></li>
</ul>
@ -54,6 +60,84 @@ Any modifications made to this file will be overwritten.
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="disableRule"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_disable</code></pre></div>
<div class="method-summary">Disable a rule. (<span class="nickname">disableRule</span>)</div>
<div class="method-notes">You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="enableRule"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_enable</code></pre></div>
<div class="method-summary">Enable a rule. (<span class="nickname">enableRule</span>)</div>
<div class="method-notes">This API supports token-based authentication only. You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
@ -342,6 +426,166 @@ Any modifications made to this file will be overwritten.
<a href="#rule_response_properties">rule_response_properties</a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="muteAlert"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute</code></pre></div>
<div class="method-summary">Mute an alert. (<span class="nickname">muteAlert</span>)</div>
<div class="method-notes">You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features. If the rule has actions, you must also have <code>read</code> privileges for the <strong>Management &gt; Actions and Connectors</strong> feature.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">alertId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the alert. The identifier is generated by the rule and might be any arbitrary string. default: null </div><div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="muteAllAlerts"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all</code></pre></div>
<div class="method-summary">Mute all alerts. (<span class="nickname">muteAllAlerts</span>)</div>
<div class="method-notes">This API snoozes the notifications for the rule indefinitely. The rule checks continue to occur but alerts will not trigger any actions. You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features. If the rule has actions, you must also have <code>read</code> privileges for the <strong>Management &gt; Actions and Connectors</strong> feature.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="unmuteAlert"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute</code></pre></div>
<div class="method-summary">Unmute an alert. (<span class="nickname">unmuteAlert</span>)</div>
<div class="method-notes">You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features. If the rule has actions, you must also have <code>read</code> privileges for the <strong>Management &gt; Actions and Connectors</strong> feature.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">alertId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the alert. The identifier is generated by the rule and might be any arbitrary string. default: null </div><div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="unmuteAllAlerts"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>
<pre class="post"><code class="huge"><span class="http-method">post</span> /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all</code></pre></div>
<div class="method-summary">Unmute all alerts. (<span class="nickname">unmuteAllAlerts</span>)</div>
<div class="method-notes">If the rule has its notifications snoozed indefinitely, this API cancels the snooze. You must have <code>all</code> privileges for the appropriate Kibana features, depending on the <code>consumer</code> and <code>rule_type_id</code> of the rule. For example, the <strong>Management &gt; Stack Rules</strong> feature, <strong>Analytics &gt; Discover</strong> and <strong>Machine Learning</strong> features, <strong>Observability</strong>, and <strong>Security</strong> features. If the rule has actions, you must also have <code>read</code> privileges for the <strong>Management &gt; Actions and Connectors</strong> feature.</div>
<h3 class="field-label">Path parameters</h3>
<div class="field-items">
<div class="param">ruleId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the rule. default: null </div><div class="param">spaceId (required)</div>
<div class="param-desc"><span class="param-type">Path Parameter</span> &mdash; An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
</div> <!-- field-items -->
<h3 class="field-label">Request headers</h3>
<div class="field-items">
<div class="param">kbn-xsrf (required)</div>
<div class="param-desc"><span class="param-type">Header Parameter</span> &mdash; default: null </div>
</div> <!-- field-items -->
<!--Todo: process Response Object and its headers, schema, examples -->
<h3 class="field-label">Responses</h3>
<h4 class="field-label">204</h4>
Indicates a successful call.
<a href="#"></a>
</div> <!-- method -->
<hr/>
<div class="method"><a name="updateRule"/>
<div class="method-path">
<a class="up" href="#__Methods">Up</a>

View file

@ -6,6 +6,12 @@
Disable a rule.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[disable-rule-api-request]]
=== {api-request-title}
@ -17,7 +23,7 @@ Disable a rule.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're disabling. For example,
the `consumer` and `rule_type_id` of the rule. For example,
the *Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. For more details, refer to
<<kibana-feature-privileges>>.
@ -35,7 +41,7 @@ the URL, the default space is used.
[[disable-rule-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -8,6 +8,12 @@ Enable a rule.
WARNING: This API supports <<token-api-authentication>> only.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[enable-rule-api-request]]
=== {api-request-title}
@ -18,7 +24,7 @@ WARNING: This API supports <<token-api-authentication>> only.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're enabling. For example, the
the `consumer` and `rule_type_id` of the rule. For example, the
*Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. For more details, refer to
<<kibana-feature-privileges>>.
@ -36,7 +42,7 @@ the URL, the default space is used.
[[enable-rule-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -6,6 +6,12 @@
Mute an alert.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[mute-alert-api-request]]
=== {api-request-title}
@ -16,7 +22,7 @@ Mute an alert.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're creating. For example, the
the `consumer` and `rule_type_id` of the rule. For example, the
*Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. If the rule has `actions`,
you must also have `read` privileges for the *Management* >
@ -38,7 +44,7 @@ you must also have `read` privileges for the *Management* >
[[mute-alert-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -6,6 +6,12 @@
Mute all alerts.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[mute-all-alerts-api-request]]
=== {api-request-title}
@ -16,7 +22,7 @@ Mute all alerts.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're creating. For example, the
the `consumer` and `rule_type_id` of the rule. For example, the
*Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. If the rule has `actions`,
you must also have `read` privileges for the *Management* >
@ -40,7 +46,7 @@ continue to occur but alerts will not trigger any actions.
[[mute-all-alerts-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -6,6 +6,12 @@
Unmute an alert.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[unmute-alert-api-request]]
=== {api-request-title}
@ -16,7 +22,7 @@ Unmute an alert.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're creating. For example, the
the `consumer` and `rule_type_id` of the rule. For example, the
*Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. If the rule has `actions`,
you must also have `read` privileges for the *Management* >
@ -38,7 +44,7 @@ you must also have `read` privileges for the *Management* >
[[unmute-alert-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -6,6 +6,12 @@
Unmute all alerts.
[NOTE]
====
For the most up-to-date API details, refer to the
{kib-repo}/tree/{branch}/x-pack/plugins/alerting/docs/openapi[open API specification]. For a preview, check out <<rule-apis>>.
====
[[unmute-all-alerts-api-all-request]]
=== {api-request-title}
@ -16,7 +22,7 @@ Unmute all alerts.
=== {api-prereq-title}
You must have `all` privileges for the appropriate {kib} features, depending on
the `consumer` and `rule_type_id` of the rules you're creating. For example, the
the `consumer` and `rule_type_id` of the rule. For example, the
*Management* > *Stack Rules* feature, *Analytics* > *Discover* and *{ml-app}*
features, *{observability}*, and *Security* features. If the rule has `actions`,
you must also have `read` privileges for the *Management* >
@ -40,7 +46,7 @@ snooze.
[[unmute-all-alerts-api-response-codes]]
=== {api-response-codes-title}
`200`::
`204`::
Indicates a successful call.
=== {api-examples-title}

View file

@ -150,6 +150,78 @@
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/_disable": {
"post": {
"summary": "Disable a rule.",
"operationId": "disableRule",
"description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features.\n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/_enable": {
"post": {
"summary": "Enable a rule.",
"operationId": "enableRule",
"description": "This API supports token-based authentication only. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features.\n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rules/_find": {
"get": {
"summary": "Retrieves information about rules.",
@ -321,6 +393,156 @@
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all": {
"post": {
"summary": "Mute all alerts.",
"operationId": "muteAllAlerts",
"description": "This API snoozes the notifications for the rule indefinitely. The rule checks continue to occur but alerts will not trigger any actions. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all": {
"post": {
"summary": "Unmute all alerts.",
"operationId": "unmuteAllAlerts",
"description": "If the rule has its notifications snoozed indefinitely, this API cancels the snooze. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute": {
"post": {
"summary": "Mute an alert.",
"operationId": "muteAlert",
"description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. \n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/alert_id"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute": {
"post": {
"summary": "Unmute an alert.",
"operationId": "unmuteAlert",
"description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. \n",
"tags": [
"alerting"
],
"parameters": [
{
"$ref": "#/components/parameters/kbn_xsrf"
},
{
"$ref": "#/components/parameters/alert_id"
},
{
"$ref": "#/components/parameters/rule_id"
},
{
"$ref": "#/components/parameters/space_id"
}
],
"responses": {
"204": {
"description": "Indicates a successful call."
}
},
"servers": [
{
"url": "https://localhost:5601"
}
]
},
"servers": [
{
"url": "https://localhost:5601"
}
]
}
},
"components": {
@ -363,6 +585,16 @@
"in": "header",
"name": "kbn-xsrf",
"required": true
},
"alert_id": {
"in": "path",
"name": "alertId",
"description": "An identifier for the alert. The identifier is generated by the rule and might be any arbitrary string.",
"required": true,
"schema": {
"type": "string",
"example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74"
}
}
},
"schemas": {

View file

@ -86,6 +86,44 @@ paths:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/_disable:
post:
summary: Disable a rule.
operationId: disableRule
description: |
You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/_enable:
post:
summary: Enable a rule.
operationId: enableRule
description: |
This API supports token-based authentication only. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rules/_find:
get:
summary: Retrieves information about rules.
@ -195,6 +233,84 @@ paths:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all:
post:
summary: Mute all alerts.
operationId: muteAllAlerts
description: |
This API snoozes the notifications for the rule indefinitely. The rule checks continue to occur but alerts will not trigger any actions. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all:
post:
summary: Unmute all alerts.
operationId: unmuteAllAlerts
description: |
If the rule has its notifications snoozed indefinitely, this API cancels the snooze. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute:
post:
summary: Mute an alert.
operationId: muteAlert
description: |
You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/alert_id'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute:
post:
summary: Unmute an alert.
operationId: unmuteAlert
description: |
You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: '#/components/parameters/kbn_xsrf'
- $ref: '#/components/parameters/alert_id'
- $ref: '#/components/parameters/rule_id'
- $ref: '#/components/parameters/space_id'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601
components:
securitySchemes:
basicAuth:
@ -227,6 +343,14 @@ components:
in: header
name: kbn-xsrf
required: true
alert_id:
in: path
name: alertId
description: An identifier for the alert. The identifier is generated by the rule and might be any arbitrary string.
required: true
schema:
type: string
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
schemas:
actions:
type: array

View file

@ -0,0 +1,7 @@
in: path
name: alertId
description: An identifier for the alert. The identifier is generated by the rule and might be any arbitrary string.
required: true
schema:
type: string
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74

View file

@ -17,24 +17,24 @@ servers:
paths:
'/s/{spaceId}/api/alerting/rule/{ruleId}':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/_disable':
# $ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_disable.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/_enable':
# $ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_enable.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/_disable':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_disable.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/_enable':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_enable.yaml'
'/s/{spaceId}/api/alerting/rules/_find':
$ref: 'paths/s@{spaceid}@api@alerting@rules@_find.yaml'
# '/s/{spaceId}/api/alerting/_health':
# $ref: paths/s@{spaceid}@api@alerting@_health.yaml
# '/s/{spaceId}/api/alerting/rule_types':
# $ref: 'paths/s@{spaceid}@api@alerting@rule_types.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all':
# $ref: 'paths/s@{spaceid}@api@rule@{ruleid}@_mute_all.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all':
# $ref: 'paths/s@{spaceid}@api@rule@{ruleid}@_unmute_all.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute':
# $ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml'
# '/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute':
# $ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_mute_all.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_unmute_all.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml'
'/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml'
# Deprecated APIs
# '/s/{spaceId}/api/alerts/alert/{alertId}':

View file

@ -0,0 +1,21 @@
post:
summary: Disable a rule.
operationId: disableRule
description: >
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,22 @@
post:
summary: Enable a rule.
operationId: enableRule
description: >
This API supports token-based authentication only.
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,25 @@
post:
summary: Mute all alerts.
operationId: muteAllAlerts
description: >
This API snoozes the notifications for the rule indefinitely. The rule
checks continue to occur but alerts will not trigger any actions.
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
If the rule has actions, you must also have `read` privileges for the
**Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,24 @@
post:
summary: Unmute all alerts.
operationId: unmuteAllAlerts
description: >
If the rule has its notifications snoozed indefinitely, this API cancels the snooze.
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
If the rule has actions, you must also have `read` privileges for the
**Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,24 @@
post:
summary: Mute an alert.
operationId: muteAlert
description: >
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
If the rule has actions, you must also have `read` privileges for the
**Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/alert_id.yaml'
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601

View file

@ -0,0 +1,24 @@
post:
summary: Unmute an alert.
operationId: unmuteAlert
description: >
You must have `all` privileges for the appropriate Kibana features,
depending on the `consumer` and `rule_type_id` of the rule. For example, the
**Management > Stack Rules** feature, **Analytics > Discover** and
**Machine Learning** features, **Observability**, and **Security** features.
If the rule has actions, you must also have `read` privileges for the
**Management > Actions and Connectors** feature.
tags:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/alert_id.yaml'
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'204':
description: Indicates a successful call.
servers:
- url: https://localhost:5601
servers:
- url: https://localhost:5601