From a50cad6f78caa607d210cd90e12ab11bc18902bd Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Wed, 22 Nov 2023 12:21:07 -0800 Subject: [PATCH] [OAS] Migrate alerting APIs to v3.1.0 (#171587) --- .../alerting/docs/openapi/bundled.json | 560 +++++++++++++----- .../alerting/docs/openapi/bundled.yaml | 403 ++++++++----- .../components/parameters/alert_id.yaml | 3 +- .../components/parameters/rule_id.yaml | 3 +- .../components/parameters/space_id.yaml | 3 +- .../components/schemas/401_response.yaml | 6 +- .../components/schemas/404_response.yaml | 9 +- .../openapi/components/schemas/actions.yaml | 29 +- .../schemas/alert_response_properties.yaml | 62 +- .../openapi/components/schemas/filter.yaml | 5 +- .../components/schemas/notify_when.yaml | 3 +- .../schemas/params_es_query_rule.yaml | 18 +- .../schemas/rule_response_properties.yaml | 97 +-- .../openapi/components/schemas/schedule.yaml | 3 +- .../openapi/components/schemas/threshold.yaml | 3 +- .../schemas/thresholdcomparator.yaml | 3 +- .../openapi/components/schemas/throttle.yaml | 8 +- .../components/schemas/timewindowsize.yaml | 3 +- .../components/schemas/timewindowunit.yaml | 3 +- .../schemas/update_rule_request.yaml | 3 +- .../alerting/docs/openapi/entrypoint.yaml | 4 +- .../s@{spaceid}@api@alerting@_health.yaml | 24 +- ...@{spaceid}@api@alerting@rule@{ruleid}.yaml | 3 +- .../s@{spaceid}@api@alerting@rule_types.yaml | 9 +- .../s@{spaceid}@api@alerting@rules@_find.yaml | 12 +- .../paths/s@{spaceid}@api@alerts@_find.yaml | 12 +- .../paths/s@{spaceid}@api@alerts@_health.yaml | 24 +- ...@{spaceid}@api@alerts@alert@{alertid}.yaml | 18 +- ...}@api@alerts@alert@{alertid}@_disable.yaml | 3 +- ...d}@api@alerts@alert@{alertid}@_enable.yaml | 3 +- ...@api@alerts@alert@{alertid}@_mute_all.yaml | 3 +- ...pi@alerts@alert@{alertid}@_unmute_all.yaml | 3 +- ...lert_instance@{alertinstanceid}@_mute.yaml | 6 +- ...rt_instance@{alertinstanceid}@_unmute.yaml | 6 +- 34 files changed, 918 insertions(+), 439 deletions(-) diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.json b/x-pack/plugins/alerting/docs/openapi/bundled.json index 90e6ed57cf73a..0ffb3afc11186 100644 --- a/x-pack/plugins/alerting/docs/openapi/bundled.json +++ b/x-pack/plugins/alerting/docs/openapi/bundled.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Alerting", "description": "OpenAPI schema for alerting endpoints", - "version": "0.1", + "version": "0.2", "contact": { "name": "Alerting Team" }, @@ -239,7 +239,9 @@ "required": true, "schema": { "type": "string", - "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + "examples": [ + "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + ] } } ], @@ -496,9 +498,11 @@ "description": "The default operator to use for the simple_query_string.", "schema": { "type": "string", - "default": "OR" - }, - "example": "OR" + "default": "OR", + "examples": [ + "OR" + ] + } }, { "name": "fields", @@ -541,9 +545,11 @@ "description": "The page number to return.", "schema": { "type": "integer", - "default": 1 - }, - "example": 1 + "default": 1, + "examples": [ + 1 + ] + } }, { "name": "per_page", @@ -551,9 +557,11 @@ "description": "The number of rules to return per page.", "schema": { "type": "integer", - "default": 20 - }, - "example": 20 + "default": 20, + "examples": [ + 20 + ] + } }, { "name": "search", @@ -599,9 +607,11 @@ "asc", "desc" ], - "default": "desc" - }, - "example": "asc" + "default": "desc", + "examples": [ + "asc" + ] + } } ], "responses": { @@ -684,7 +694,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -694,7 +706,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } }, @@ -704,7 +718,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -714,7 +730,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } }, @@ -724,7 +742,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -734,7 +754,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } } @@ -743,12 +765,16 @@ "has_permanent_encryption_key": { "type": "boolean", "description": "If `false`, the encrypted saved object plugin does not have a permanent encryption key.", - "example": true + "examples": [ + true + ] }, "is_sufficiently_secure": { "type": "boolean", "description": "If `false`, security is enabled but TLS is not.", - "example": true + "examples": [ + true + ] } } }, @@ -1030,7 +1056,9 @@ "minimum_license_required": { "description": "The subscriptions required to use the rule type.", "type": "string", - "example": "basic" + "examples": [ + "basic" + ] }, "name": { "description": "The descriptive name of the rule type.", @@ -1039,7 +1067,9 @@ "producer": { "description": "An identifier for the application that produces this rule type.", "type": "string", - "example": "stackAlerts" + "examples": [ + "stackAlerts" + ] }, "recovery_action_group": { "description": "An action group to use when an alert goes from an active state to an inactive one.", @@ -1055,7 +1085,9 @@ }, "rule_task_timeout": { "type": "string", - "example": "5m" + "examples": [ + "5m" + ] } } } @@ -1290,7 +1322,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1329,7 +1363,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1375,7 +1411,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } }, { @@ -1464,7 +1502,9 @@ "interval": { "type": "string", "description": "The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute.", - "example": "10s" + "examples": [ + "10s" + ] } } }, @@ -1529,7 +1569,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1601,7 +1643,9 @@ "interval": { "type": "string", "description": "The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute.", - "example": "1d" + "examples": [ + "1d" + ] } } }, @@ -1668,7 +1712,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1712,7 +1758,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1756,7 +1804,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1800,7 +1850,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } } ], @@ -1840,9 +1892,11 @@ "description": "The default operator to use for the `simple_query_string`.", "schema": { "type": "string", - "default": "OR" - }, - "example": "OR" + "default": "OR", + "examples": [ + "OR" + ] + } }, { "name": "fields", @@ -1885,9 +1939,11 @@ "description": "The page number to return.", "schema": { "type": "integer", - "default": 1 - }, - "example": 1 + "default": 1, + "examples": [ + 1 + ] + } }, { "name": "per_page", @@ -1895,9 +1951,11 @@ "description": "The number of alerts to return per page.", "schema": { "type": "integer", - "default": 20 - }, - "example": 20 + "default": 20, + "examples": [ + 20 + ] + } }, { "name": "search", @@ -1943,9 +2001,11 @@ "asc", "desc" ], - "default": "desc" - }, - "example": "asc" + "default": "desc", + "examples": [ + "asc" + ] + } } ], "responses": { @@ -2021,7 +2081,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -2031,7 +2093,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } }, @@ -2041,7 +2105,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -2051,7 +2117,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } }, @@ -2061,7 +2129,9 @@ "properties": { "status": { "type": "string", - "example": "ok", + "examples": [ + "ok" + ], "enum": [ "error", "ok", @@ -2071,7 +2141,9 @@ "timestamp": { "type": "string", "format": "date-time", - "example": "2023-01-13T01:28:00.280Z" + "examples": [ + "2023-01-13T01:28:00.280Z" + ] } } } @@ -2080,12 +2152,16 @@ "hasPermanentEncryptionKey": { "type": "boolean", "description": "If `false`, the encrypted saved object plugin does not have a permanent encryption key.", - "example": true + "examples": [ + true + ] }, "isSufficientlySecure": { "type": "boolean", "description": "If `false`, security is enabled but TLS is not.", - "example": true + "examples": [ + true + ] } } } @@ -2278,7 +2354,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } }, { @@ -2288,7 +2366,9 @@ "required": true, "schema": { "type": "string", - "example": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" + "examples": [ + "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" + ] } } ], @@ -2332,7 +2412,9 @@ "required": true, "schema": { "type": "string", - "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" + "examples": [ + "41893910-6bca-11eb-9e0d-85d233e3ee35" + ] } }, { @@ -2342,7 +2424,9 @@ "required": true, "schema": { "type": "string", - "example": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" + "examples": [ + "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" + ] } } ], @@ -2394,7 +2478,9 @@ "required": true, "schema": { "type": "string", - "example": "default" + "examples": [ + "default" + ] } }, "rule_id": { @@ -2404,7 +2490,9 @@ "required": true, "schema": { "type": "string", - "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + "examples": [ + "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + ] } }, "alert_id": { @@ -2414,7 +2502,9 @@ "required": true, "schema": { "type": "string", - "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + "examples": [ + "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" + ] } } }, @@ -2427,8 +2517,10 @@ "type": "object", "properties": { "alias": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "controlledBy": { "type": "string" @@ -2481,19 +2573,27 @@ "onActiveAlert", "onThrottleInterval" ], - "example": "onActiveAlert" + "examples": [ + "onActiveAlert" + ] }, "throttle": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values.\n", - "nullable": true, "default": null, - "example": "10m" + "examples": [ + "10m" + ] }, "actions": { - "type": "array", + "type": [ + "array", + "null" + ], "default": [], - "nullable": true, "items": { "type": "object", "required": [ @@ -2533,12 +2633,14 @@ "items": { "type": "integer" }, - "example": [ - 1, - 2, - 3, - 4, - 5 + "examples": [ + [ + 1, + 2, + 3, + 4, + 5 + ] ] }, "hours": { @@ -2548,19 +2650,25 @@ "end": { "type": "string", "description": "The end of the time frame in 24-hour notation (`hh:mm`).", - "example": "17:00" + "examples": [ + "17:00" + ] }, "start": { "type": "string", "description": "The start of the time frame in 24-hour notation (`hh:mm`).", - "example": "08:00" + "examples": [ + "08:00" + ] } } }, "timezone": { "type": "string", "description": "The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended.\n", - "example": "Europe/Madrid" + "examples": [ + "Europe/Madrid" + ] } } } @@ -2569,7 +2677,9 @@ "connector_type_id": { "type": "string", "description": "The type of connector. This property appears in responses but cannot be set in requests.", - "example": ".server-log", + "examples": [ + ".server-log" + ], "readOnly": true }, "frequency": { @@ -2595,12 +2705,16 @@ "group": { "type": "string", "description": "The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`.\n", - "example": "default" + "examples": [ + "default" + ] }, "id": { "type": "string", "description": "The identifier for the connector saved object.", - "example": "9dca3e00-74f5-11ed-9801-35303b735aef" + "examples": [ + "9dca3e00-74f5-11ed-9801-35303b735aef" + ] }, "params": { "type": "object", @@ -2610,7 +2724,9 @@ "uuid": { "type": "string", "description": "A universally unique identifier (UUID) for the action.", - "example": "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61" + "examples": [ + "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61" + ] } } } @@ -2633,7 +2749,9 @@ "properties": { "interval": { "type": "string", - "example": "1m" + "examples": [ + "1m" + ] } } }, @@ -3211,7 +3329,9 @@ "timewindowsize": { "description": "The size of the time window (in `timeWindowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection.\n", "type": "integer", - "example": 5 + "examples": [ + 5 + ] }, "timewindowunit": { "description": "The type of units for the time window: seconds, minutes, hours, or days.\n", @@ -3222,7 +3342,9 @@ "h", "d" ], - "example": "m" + "examples": [ + "m" + ] }, "size": { "description": "The number of documents to pass to the configured actions when the threshold condition is met.\n", @@ -3248,7 +3370,9 @@ "type": "array", "items": { "type": "integer", - "example": 4000 + "examples": [ + 4000 + ] } }, "thresholdcomparator": { @@ -3262,7 +3386,9 @@ "between", "notBetween" ], - "example": ">" + "examples": [ + ">" + ] }, "params_es_query_rule": { "oneOf": [ @@ -3310,12 +3436,16 @@ "enum": [ "esqlQuery" ], - "example": "esqlQuery" + "examples": [ + "esqlQuery" + ] }, "size": { "type": "integer", "description": "When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior.\n", - "example": 0 + "examples": [ + 0 + ] }, "termSize": { "$ref": "#/components/schemas/termsize" @@ -3335,7 +3465,9 @@ "enum": [ ">" ], - "example": ">" + "examples": [ + ">" + ] }, "timeField": { "$ref": "#/components/schemas/timefield" @@ -3401,7 +3533,9 @@ "properties": { "language": { "type": "string", - "example": "kuery" + "examples": [ + "kuery" + ] }, "query": { "type": "string" @@ -3416,7 +3550,9 @@ "enum": [ "searchSource" ], - "example": "searchSource" + "examples": [ + "searchSource" + ] }, "size": { "$ref": "#/components/schemas/size" @@ -3494,7 +3630,9 @@ "esQuery" ], "default": "esQuery", - "example": "esQuery" + "examples": [ + "esQuery" + ] }, "size": { "$ref": "#/components/schemas/size" @@ -6319,58 +6457,82 @@ "api_key_created_by_user": { "type": "boolean", "description": "Indicates whether the API key that is associated with the rule was created by the user.", - "example": false + "examples": [ + false + ] }, "api_key_owner": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The owner of the API key that is associated with the rule and used to run background tasks.\n", - "nullable": true, - "example": "elastic" + "examples": [ + "elastic" + ] }, "consumer": { "type": "string", "description": "The application or feature that owns the rule. For example, `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`.", - "example": "alerts" + "examples": [ + "alerts" + ] }, "created_at": { "type": "string", "description": "The date and time that the rule was created.", "format": "date-time", - "example": "2022-12-05T23:36:58.284Z" + "examples": [ + "2022-12-05T23:36:58.284Z" + ] }, "created_by": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The identifier for the user that created the rule.", - "nullable": true, - "example": "elastic" + "examples": [ + "elastic" + ] }, "enabled": { "type": "boolean", "description": "Indicates whether the rule is currently enabled.", - "example": true + "examples": [ + true + ] }, "execution_status": { "type": "object", "properties": { "last_duration": { "type": "integer", - "example": 55 + "examples": [ + 55 + ] }, "last_execution_date": { "type": "string", "format": "date-time", - "example": "2022-12-06T00:13:43.890Z" + "examples": [ + "2022-12-06T00:13:43.890Z" + ] }, "status": { "type": "string", - "example": "ok" + "examples": [ + "ok" + ] } } }, "id": { "type": "string", "description": "The identifier for the rule.", - "example": "b530fed0-74f5-11ed-9801-35303b735aef" + "examples": [ + "b530fed0-74f5-11ed-9801-35303b735aef" + ] }, "last_run": { "type": "object", @@ -6394,51 +6556,71 @@ }, "outcome": { "type": "string", - "example": "succeeded" + "examples": [ + "succeeded" + ] }, "outcome_msg": { - "type": "array", + "type": [ + "array", + "null" + ], "items": { "type": "string" - }, - "nullable": true + } }, "outcome_order": { "type": "integer" }, "warning": { - "type": "string", - "nullable": true, - "example": null + "type": [ + "string", + "null" + ], + "examples": [ + null + ] } } }, "muted_alert_ids": { - "type": "array", - "nullable": true, + "type": [ + "array", + "null" + ], "items": { "type": "string" } }, "mute_all": { "type": "boolean", - "example": false + "examples": [ + false + ] }, "name": { "type": "string", "description": "The name of the rule.", - "example": "cluster_health_rule" + "examples": [ + "cluster_health_rule" + ] }, "next_run": { - "type": "string", + "type": [ + "string", + "null" + ], "format": "date-time", - "nullable": true, - "example": "2022-12-06T00:14:43.818Z" + "examples": [ + "2022-12-06T00:14:43.818Z" + ] }, "notify_when": { - "type": "string", - "description": "Indicates how often alerts generate actions.", - "nullable": true + "type": [ + "string", + "null" + ], + "description": "Indicates how often alerts generate actions." }, "params": { "type": "object", @@ -6452,7 +6634,9 @@ "rule_type_id": { "type": "string", "description": "The identifier for the type of rule. For example, `.es-query`, `.index-threshold`, `logs.alert.document.count`, `monitoring_alert_cluster_health`, `siem.thresholdRule`, or `xpack.ml.anomaly_detection_alert`.\n", - "example": "monitoring_alert_cluster_health" + "examples": [ + "monitoring_alert_cluster_health" + ] }, "running": { "type": "boolean", @@ -6463,7 +6647,9 @@ }, "scheduled_task_id": { "type": "string", - "example": "b530fed0-74f5-11ed-9801-35303b735aef" + "examples": [ + "b530fed0-74f5-11ed-9801-35303b735aef" + ] }, "tags": { "$ref": "#/components/schemas/tags" @@ -6474,13 +6660,19 @@ "updated_at": { "type": "string", "description": "The date and time that the rule was updated most recently.", - "example": "2022-12-05T23:36:58.284Z" + "examples": [ + "2022-12-05T23:36:58.284Z" + ] }, "updated_by": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The identifier for the user that updated this rule most recently.", - "nullable": true, - "example": "elastic" + "examples": [ + "elastic" + ] } } }, @@ -6490,7 +6682,9 @@ "properties": { "error": { "type": "string", - "example": "Unauthorized", + "examples": [ + "Unauthorized" + ], "enum": [ "Unauthorized" ] @@ -6500,7 +6694,9 @@ }, "statusCode": { "type": "integer", - "example": 401, + "examples": [ + 401 + ], "enum": [ 401 ] @@ -6512,18 +6708,24 @@ "properties": { "error": { "type": "string", - "example": "Not Found", + "examples": [ + "Not Found" + ], "enum": [ "Not Found" ] }, "message": { "type": "string", - "example": "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found" + "examples": [ + "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found" + ] }, "statusCode": { "type": "integer", - "example": 404, + "examples": [ + 404 + ], "enum": [ 404 ] @@ -6546,7 +6748,9 @@ "name": { "type": "string", "description": "The name of the rule.", - "example": "cluster_health_rule" + "examples": [ + "cluster_health_rule" + ] }, "notify_when": { "$ref": "#/components/schemas/notify_when" @@ -6605,28 +6809,40 @@ }, "alertTypeId": { "type": "string", - "example": ".index-threshold" + "examples": [ + ".index-threshold" + ] }, "apiKeyOwner": { - "type": "string", - "nullable": true, - "example": "elastic" + "type": [ + "string", + "null" + ], + "examples": [ + "elastic" + ] }, "createdAt": { "type": "string", "description": "The date and time that the alert was created.", "format": "date-time", - "example": "2022-12-05T23:36:58.284Z" + "examples": [ + "2022-12-05T23:36:58.284Z" + ] }, "createdBy": { "type": "string", "description": "The identifier for the user that created the alert.", - "example": "elastic" + "examples": [ + "elastic" + ] }, "enabled": { "type": "boolean", "description": "Indicates whether the alert is currently enabled.", - "example": true + "examples": [ + true + ] }, "executionStatus": { "type": "object", @@ -6634,26 +6850,36 @@ "lastExecutionDate": { "type": "string", "format": "date-time", - "example": "2022-12-06T00:13:43.890Z" + "examples": [ + "2022-12-06T00:13:43.890Z" + ] }, "status": { "type": "string", - "example": "ok" + "examples": [ + "ok" + ] } } }, "id": { "type": "string", "description": "The identifier for the alert.", - "example": "b530fed0-74f5-11ed-9801-35303b735aef" + "examples": [ + "b530fed0-74f5-11ed-9801-35303b735aef" + ] }, "muteAll": { "type": "boolean", - "example": false + "examples": [ + false + ] }, "mutedInstanceIds": { - "type": "array", - "nullable": true, + "type": [ + "array", + "null" + ], "items": { "type": "string" } @@ -6661,11 +6887,15 @@ "name": { "type": "string", "description": "The name of the alert.", - "example": "my alert" + "examples": [ + "my alert" + ] }, "notifyWhen": { "type": "string", - "example": "onActionGroupChange" + "examples": [ + "onActionGroupChange" + ] }, "params": { "type": "object", @@ -6681,7 +6911,9 @@ }, "scheduledTaskId": { "type": "string", - "example": "b530fed0-74f5-11ed-9801-35303b735aef" + "examples": [ + "b530fed0-74f5-11ed-9801-35303b735aef" + ] }, "tags": { "type": "array", @@ -6690,18 +6922,26 @@ } }, "throttle": { - "type": "string", - "nullable": true + "type": [ + "string", + "null" + ] }, "updatedAt": { "type": "string", - "example": "2022-12-05T23:36:58.284Z" + "examples": [ + "2022-12-05T23:36:58.284Z" + ] }, "updatedBy": { - "type": "string", + "type": [ + "string", + "null" + ], "description": "The identifier for the user that updated this alert most recently.", - "nullable": true, - "example": "elastic" + "examples": [ + "elastic" + ] } } } diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.yaml b/x-pack/plugins/alerting/docs/openapi/bundled.yaml index 0deeda0abf2f1..4a736e68e9b66 100644 --- a/x-pack/plugins/alerting/docs/openapi/bundled.yaml +++ b/x-pack/plugins/alerting/docs/openapi/bundled.yaml @@ -1,8 +1,8 @@ -openapi: 3.0.1 +openapi: 3.1.0 info: title: Alerting description: OpenAPI schema for alerting endpoints - version: '0.1' + version: '0.2' contact: name: Alerting Team license: @@ -147,7 +147,8 @@ paths: required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 requestBody: required: true content: @@ -303,7 +304,8 @@ paths: schema: type: string default: OR - example: OR + examples: + - OR - name: fields in: query description: The fields to return in the `attributes` key of the response. @@ -333,14 +335,16 @@ paths: schema: type: integer default: 1 - example: 1 + examples: + - 1 - name: per_page in: query description: The number of rules to return per page. schema: type: integer default: 20 - example: 20 + examples: + - 20 - name: search in: query description: An Elasticsearch simple_query_string query that filters the objects in the response. @@ -370,7 +374,8 @@ paths: - asc - desc default: desc - example: asc + examples: + - asc responses: '200': description: Indicates a successful call. @@ -429,7 +434,8 @@ paths: properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -437,14 +443,16 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' execution_health: type: object description: The timestamp and status of the rule run. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -452,14 +460,16 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' read_health: type: object description: The timestamp and status of the rule reading events. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -467,15 +477,18 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' has_permanent_encryption_key: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. - example: true + examples: + - true is_sufficiently_secure: type: boolean description: If `false`, security is enabled but TLS is not. - example: true + examples: + - true examples: getAlertingHealthResponse: $ref: '#/components/examples/get_health_response' @@ -662,14 +675,16 @@ paths: minimum_license_required: description: The subscriptions required to use the rule type. type: string - example: basic + examples: + - basic name: description: The descriptive name of the rule type. type: string producer: description: An identifier for the application that produces this rule type. type: string - example: stackAlerts + examples: + - stackAlerts recovery_action_group: description: An action group to use when an alert goes from an active state to an inactive one. type: object @@ -680,7 +695,8 @@ paths: type: string rule_task_timeout: type: string - example: 5m + examples: + - 5m examples: getRuleTypesResponse: $ref: '#/components/examples/get_rule_types_response' @@ -814,7 +830,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -839,7 +856,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '200': description: Indicates a successful call. @@ -868,7 +886,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - $ref: '#/components/parameters/space_id' requestBody: required: true @@ -939,7 +958,8 @@ paths: interval: type: string description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute. - example: 10s + examples: + - 10s tags: type: array items: @@ -978,7 +998,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 requestBody: required: true content: @@ -1037,7 +1058,8 @@ paths: interval: type: string description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute. - example: 1d + examples: + - 1d tags: type: array items: @@ -1077,7 +1099,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -1104,7 +1127,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -1131,7 +1155,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -1158,7 +1183,8 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -1185,7 +1211,8 @@ paths: schema: type: string default: OR - example: OR + examples: + - OR - name: fields in: query description: The fields to return in the `attributes` key of the response. @@ -1215,14 +1242,16 @@ paths: schema: type: integer default: 1 - example: 1 + examples: + - 1 - name: per_page in: query description: The number of alerts to return per page. schema: type: integer default: 20 - example: 20 + examples: + - 20 - name: search in: query description: An Elasticsearch `simple_query_string` query that filters the alerts in the response. @@ -1252,7 +1281,8 @@ paths: - asc - desc default: desc - example: asc + examples: + - asc responses: '200': description: Indicates a successful call. @@ -1306,7 +1336,8 @@ paths: properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -1314,14 +1345,16 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' executionHealth: type: object description: The timestamp and status of the alert execution. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -1329,14 +1362,16 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' readHealth: type: object description: The timestamp and status of the alert reading events. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -1344,15 +1379,18 @@ paths: timestamp: type: string format: date-time - example: '2023-01-13T01:28:00.280Z' + examples: + - '2023-01-13T01:28:00.280Z' hasPermanentEncryptionKey: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. - example: true + examples: + - true isSufficientlySecure: type: boolean description: If `false`, security is enabled but TLS is not. - example: true + examples: + - true '401': description: Authorization information is missing or invalid. content: @@ -1478,14 +1516,16 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - in: path name: alertInstanceId description: An identifier for the alert instance. required: true schema: type: string - example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 + examples: + - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: '204': description: Indicates a successful call. @@ -1512,14 +1552,16 @@ paths: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - in: path name: alertInstanceId description: An identifier for the alert instance. required: true schema: type: string - example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 + examples: + - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: '204': description: Indicates a successful call. @@ -1554,7 +1596,8 @@ components: required: true schema: type: string - example: default + examples: + - default rule_id: in: path name: ruleId @@ -1562,7 +1605,8 @@ components: required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 alert_id: in: path name: alertId @@ -1570,7 +1614,8 @@ components: required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 schemas: filter: type: object @@ -1580,8 +1625,9 @@ components: type: object properties: alias: - type: string - nullable: true + type: + - string + - 'null' controlledBy: type: string disabled: @@ -1616,18 +1662,22 @@ components: - onActionGroupChange - onActiveAlert - onThrottleInterval - example: onActiveAlert + examples: + - onActiveAlert throttle: - type: string + type: + - string + - 'null' description: | The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. - nullable: true default: null - example: 10m + examples: + - 10m actions: - type: array + type: + - array + - 'null' default: [] - nullable: true items: type: object required: @@ -1662,12 +1712,12 @@ components: description: Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week. items: type: integer - example: - - 1 - - 2 - - 3 - - 4 - - 5 + examples: + - - 1 + - 2 + - 3 + - 4 + - 5 hours: type: object description: | @@ -1676,20 +1726,24 @@ components: end: type: string description: The end of the time frame in 24-hour notation (`hh:mm`). - example: '17:00' + examples: + - '17:00' start: type: string description: The start of the time frame in 24-hour notation (`hh:mm`). - example: '08:00' + examples: + - '08:00' timezone: type: string description: | The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended. - example: Europe/Madrid + examples: + - Europe/Madrid connector_type_id: type: string description: The type of connector. This property appears in responses but cannot be set in requests. - example: .server-log + examples: + - .server-log readOnly: true frequency: type: object @@ -1710,11 +1764,13 @@ components: type: string description: | The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`. - example: default + examples: + - default id: type: string description: The identifier for the connector saved object. - example: 9dca3e00-74f5-11ed-9801-35303b735aef + examples: + - 9dca3e00-74f5-11ed-9801-35303b735aef params: type: object description: The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context. @@ -1722,7 +1778,8 @@ components: uuid: type: string description: A universally unique identifier (UUID) for the action. - example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + examples: + - 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 consumer: type: string description: | @@ -1740,7 +1797,8 @@ components: properties: interval: type: string - example: 1m + examples: + - 1m tags: type: array description: The tags for the rule. @@ -2171,7 +2229,8 @@ components: description: | The size of the time window (in `timeWindowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection. type: integer - example: 5 + examples: + - 5 timewindowunit: description: | The type of units for the time window: seconds, minutes, hours, or days. @@ -2181,7 +2240,8 @@ components: - m - h - d - example: m + examples: + - m size: description: | The number of documents to pass to the configured actions when the threshold condition is met. @@ -2201,7 +2261,8 @@ components: type: array items: type: integer - example: 4000 + examples: + - 4000 thresholdcomparator: description: The comparison function for the threshold. For example, "is above", "is above or equals", "is below", "is below or equals", "is between", and "is not between". type: string @@ -2212,7 +2273,8 @@ components: - <= - between - notBetween - example: '>' + examples: + - '>' params_es_query_rule: oneOf: - type: object @@ -2249,12 +2311,14 @@ components: type: string enum: - esqlQuery - example: esqlQuery + examples: + - esqlQuery size: type: integer description: | When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior. - example: 0 + examples: + - 0 termSize: $ref: '#/components/schemas/termsize' threshold: @@ -2271,7 +2335,8 @@ components: The comparison function for the threshold. When `searchType` is `esqlQuery`, this property is required and must be set to ">". Since the `threshold` value must be `0`, the result is that an alert occurs whenever the query returns results. enum: - '>' - example: '>' + examples: + - '>' timeField: $ref: '#/components/schemas/timefield' timeWindowSize: @@ -2316,7 +2381,8 @@ components: properties: language: type: string - example: kuery + examples: + - kuery query: type: string searchType: @@ -2324,7 +2390,8 @@ components: type: string enum: - searchSource - example: searchSource + examples: + - searchSource size: $ref: '#/components/schemas/size' termField: @@ -2376,7 +2443,8 @@ components: enum: - esQuery default: esQuery - example: esQuery + examples: + - esQuery size: $ref: '#/components/schemas/size' termField: @@ -4358,48 +4426,60 @@ components: api_key_created_by_user: type: boolean description: Indicates whether the API key that is associated with the rule was created by the user. - example: false + examples: + - false api_key_owner: - type: string + type: + - string + - 'null' description: | The owner of the API key that is associated with the rule and used to run background tasks. - nullable: true - example: elastic + examples: + - elastic consumer: type: string description: The application or feature that owns the rule. For example, `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`. - example: alerts + examples: + - alerts created_at: type: string description: The date and time that the rule was created. format: date-time - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' created_by: - type: string + type: + - string + - 'null' description: The identifier for the user that created the rule. - nullable: true - example: elastic + examples: + - elastic enabled: type: boolean description: Indicates whether the rule is currently enabled. - example: true + examples: + - true execution_status: type: object properties: last_duration: type: integer - example: 55 + examples: + - 55 last_execution_date: type: string format: date-time - example: '2022-12-06T00:13:43.890Z' + examples: + - '2022-12-06T00:13:43.890Z' status: type: string - example: ok + examples: + - ok id: type: string description: The identifier for the rule. - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef last_run: type: object properties: @@ -4416,39 +4496,49 @@ components: type: integer outcome: type: string - example: succeeded + examples: + - succeeded outcome_msg: - type: array + type: + - array + - 'null' items: type: string - nullable: true outcome_order: type: integer warning: - type: string - nullable: true - example: null + type: + - string + - 'null' + examples: + - null muted_alert_ids: - type: array - nullable: true + type: + - array + - 'null' items: type: string mute_all: type: boolean - example: false + examples: + - false name: type: string description: The name of the rule. - example: cluster_health_rule + examples: + - cluster_health_rule next_run: - type: string + type: + - string + - 'null' format: date-time - nullable: true - example: '2022-12-06T00:14:43.818Z' + examples: + - '2022-12-06T00:14:43.818Z' notify_when: - type: string + type: + - string + - 'null' description: Indicates how often alerts generate actions. - nullable: true params: type: object description: The parameters for the rule. @@ -4460,7 +4550,8 @@ components: type: string description: | The identifier for the type of rule. For example, `.es-query`, `.index-threshold`, `logs.alert.document.count`, `monitoring_alert_cluster_health`, `siem.thresholdRule`, or `xpack.ml.anomaly_detection_alert`. - example: monitoring_alert_cluster_health + examples: + - monitoring_alert_cluster_health running: type: boolean description: Indicates whether the rule is running. @@ -4468,7 +4559,8 @@ components: $ref: '#/components/schemas/schedule' scheduled_task_id: type: string - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef tags: $ref: '#/components/schemas/tags' throttle: @@ -4476,26 +4568,31 @@ components: updated_at: type: string description: The date and time that the rule was updated most recently. - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' updated_by: - type: string + type: + - string + - 'null' description: The identifier for the user that updated this rule most recently. - nullable: true - example: elastic + examples: + - elastic 401_response: type: object title: Unsuccessful rule API response properties: error: type: string - example: Unauthorized + examples: + - Unauthorized enum: - Unauthorized message: type: string statusCode: type: integer - example: 401 + examples: + - 401 enum: - 401 404_response: @@ -4503,15 +4600,18 @@ components: properties: error: type: string - example: Not Found + examples: + - Not Found enum: - Not Found message: type: string - example: Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found + examples: + - Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found statusCode: type: integer - example: 404 + examples: + - 404 enum: - 404 update_rule_request: @@ -4529,7 +4629,8 @@ components: name: type: string description: The name of the rule. - example: cluster_health_rule + examples: + - cluster_health_rule notify_when: $ref: '#/components/schemas/notify_when' params: @@ -4570,53 +4671,66 @@ components: type: object alertTypeId: type: string - example: .index-threshold + examples: + - .index-threshold apiKeyOwner: - type: string - nullable: true - example: elastic + type: + - string + - 'null' + examples: + - elastic createdAt: type: string description: The date and time that the alert was created. format: date-time - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' createdBy: type: string description: The identifier for the user that created the alert. - example: elastic + examples: + - elastic enabled: type: boolean description: Indicates whether the alert is currently enabled. - example: true + examples: + - true executionStatus: type: object properties: lastExecutionDate: type: string format: date-time - example: '2022-12-06T00:13:43.890Z' + examples: + - '2022-12-06T00:13:43.890Z' status: type: string - example: ok + examples: + - ok id: type: string description: The identifier for the alert. - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef muteAll: type: boolean - example: false + examples: + - false mutedInstanceIds: - type: array - nullable: true + type: + - array + - 'null' items: type: string name: type: string description: The name of the alert. - example: my alert + examples: + - my alert notifyWhen: type: string - example: onActionGroupChange + examples: + - onActionGroupChange params: type: object additionalProperties: true @@ -4627,22 +4741,27 @@ components: type: string scheduledTaskId: type: string - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef tags: type: array items: type: string throttle: - type: string - nullable: true + type: + - string + - 'null' updatedAt: type: string - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' updatedBy: - type: string + type: + - string + - 'null' description: The identifier for the user that updated this alert most recently. - nullable: true - example: elastic + examples: + - elastic examples: create_es_query_esql_rule_request: summary: Create an Elasticsearch query rule that uses Elasticsearch Query Language (ES|QL). diff --git a/x-pack/plugins/alerting/docs/openapi/components/parameters/alert_id.yaml b/x-pack/plugins/alerting/docs/openapi/components/parameters/alert_id.yaml index 27427e1ec6758..3ae77530b04d5 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/parameters/alert_id.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/parameters/alert_id.yaml @@ -4,4 +4,5 @@ description: An identifier for the alert. The identifier is generated by the rul required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \ No newline at end of file + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/parameters/rule_id.yaml b/x-pack/plugins/alerting/docs/openapi/components/parameters/rule_id.yaml index 4b5d14e207353..18cadc0e5d7e6 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/parameters/rule_id.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/parameters/rule_id.yaml @@ -4,4 +4,5 @@ description: An identifier for the rule. required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \ No newline at end of file + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/parameters/space_id.yaml b/x-pack/plugins/alerting/docs/openapi/components/parameters/space_id.yaml index 0a9fba457e3e7..45787e844caec 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/parameters/space_id.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/parameters/space_id.yaml @@ -4,4 +4,5 @@ description: An identifier for the space. If `/s/` and the identifier are omitte required: true schema: type: string - example: default + examples: + - default diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/401_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/401_response.yaml index c6044998f8649..ed5e2a823bc0f 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/401_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/401_response.yaml @@ -3,13 +3,15 @@ title: Unsuccessful rule API response properties: error: type: string - example: Unauthorized + examples: + - Unauthorized enum: - Unauthorized message: type: string statusCode: type: integer - example: 401 + examples: + - 401 enum: - 401 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/404_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/404_response.yaml index 1b8a118703ecb..875307d5a3893 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/404_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/404_response.yaml @@ -2,14 +2,17 @@ type: object properties: error: type: string - example: Not Found + examples: + - Not Found enum: - Not Found message: type: string - example: "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found" + examples: + - "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found" statusCode: type: integer - example: 404 + examples: + - 404 enum: - 404 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml index ee11bead01350..4297900d7a95f 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml @@ -1,6 +1,7 @@ -type: array +type: + - "array" + - "null" default: [] -nullable: true items: type: object required: @@ -37,7 +38,8 @@ items: description: Defines the days of the week that the action can run, represented as an array of numbers. For example, `1` represents Monday. An empty array is equivalent to specifying all the days of the week. items: type: integer - example: [1,2,3,4,5] + examples: + - [1,2,3,4,5] hours: type: object description: > @@ -47,21 +49,25 @@ items: end: type: string description: The end of the time frame in 24-hour notation (`hh:mm`). - example: 17:00 + examples: + - 17:00 start: type: string description: The start of the time frame in 24-hour notation (`hh:mm`). - example: 08:00 + examples: + - 08:00 timezone: type: string description: > The ISO time zone for the `hours` values. Values such as `UTC` and `UTC+1` also work but lack built-in daylight savings time support and are not recommended. - example: Europe/Madrid + examples: + - Europe/Madrid connector_type_id: type: string description: The type of connector. This property appears in responses but cannot be set in requests. - example: .server-log + examples: + - .server-log readOnly: true frequency: type: object @@ -87,11 +93,13 @@ items: The group name, which affects when the action runs (for example, when the threshold is met or when the alert is recovered). Each rule type has a list of valid action group names. If you don't need to group actions, set to `default`. - example: default + examples: + - default id: type: string description: The identifier for the connector saved object. - example: 9dca3e00-74f5-11ed-9801-35303b735aef + examples: + - 9dca3e00-74f5-11ed-9801-35303b735aef params: type: object description: The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context. @@ -99,4 +107,5 @@ items: uuid: type: string description: A universally unique identifier (UUID) for the action. - example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + examples: + - 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/alert_response_properties.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/alert_response_properties.yaml index 06fa627311e75..744e4ead6c94d 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/alert_response_properties.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/alert_response_properties.yaml @@ -7,53 +7,66 @@ properties: type: object alertTypeId: type: string - example: ".index-threshold" + examples: + - ".index-threshold" apiKeyOwner: - type: string - nullable: true - example: elastic + type: + - "string" + - "null" + examples: + - elastic createdAt: type: string description: The date and time that the alert was created. format: date-time - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' createdBy: type: string description: The identifier for the user that created the alert. - example: elastic + examples: + - elastic enabled: type: boolean description: Indicates whether the alert is currently enabled. - example: true + examples: + - true executionStatus: type: object properties: lastExecutionDate: type: string format: date-time - example: '2022-12-06T00:13:43.890Z' + examples: + - '2022-12-06T00:13:43.890Z' status: type: string - example: ok + examples: + - ok id: type: string description: The identifier for the alert. - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef muteAll: type: boolean - example: false + examples: + - false mutedInstanceIds: - type: array - nullable: true + type: + - "array" + - "null" items: type: string name: type: string description: The name of the alert. - example: my alert + examples: + - my alert notifyWhen: type: string - example: onActionGroupChange + examples: + - onActionGroupChange params: type: object additionalProperties: true @@ -64,19 +77,24 @@ properties: type: string scheduledTaskId: type: string - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef tags: type: array items: type: string throttle: - type: string - nullable: true + type: + - "string" + - "null" updatedAt: type: string - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' updatedBy: - type: string + type: + - "string" + - "null" description: The identifier for the user that updated this alert most recently. - nullable: true - example: elastic \ No newline at end of file + examples: + - elastic \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml index cb6a77c215682..ba8507f87f051 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml @@ -5,8 +5,9 @@ properties: type: object properties: alias: - type: string - nullable: true + type: + - "string" + - "null" controlledBy: type: string disabled: diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when.yaml index 0dcd244fc33e4..bb68967b6f5cb 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when.yaml @@ -8,4 +8,5 @@ enum: - onActionGroupChange - onActiveAlert - onThrottleInterval -example: onActiveAlert \ No newline at end of file +examples: + - onActiveAlert \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/params_es_query_rule.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/params_es_query_rule.yaml index 99b6a6f393a32..f51cbce979ab2 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/params_es_query_rule.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/params_es_query_rule.yaml @@ -35,12 +35,14 @@ oneOf: type: string enum: - esqlQuery - example: esqlQuery + examples: + - esqlQuery size: type: integer description: > When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior. - example: 0 + examples: + - 0 termSize: $ref: 'termsize.yaml' threshold: @@ -60,7 +62,8 @@ oneOf: Since the `threshold` value must be `0`, the result is that an alert occurs whenever the query returns results. enum: - ">" - example: ">" + examples: + - ">" timeField: $ref: 'timefield.yaml' timeWindowSize: @@ -105,7 +108,8 @@ oneOf: properties: language: type: string - example: kuery + examples: + - kuery query: type: string searchType: @@ -113,7 +117,8 @@ oneOf: type: string enum: - searchSource - example: searchSource + examples: + - searchSource size: $ref: 'size.yaml' termField: @@ -165,7 +170,8 @@ oneOf: enum: - esQuery default: esQuery - example: esQuery + examples: + - esQuery size: $ref: 'size.yaml' termField: diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml index 13f62ba63e229..51310c87b6c5c 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/rule_response_properties.yaml @@ -25,48 +25,60 @@ properties: api_key_created_by_user: type: boolean description: Indicates whether the API key that is associated with the rule was created by the user. - example: false + examples: + - false api_key_owner: - type: string + type: + - "string" + - "null" description: > The owner of the API key that is associated with the rule and used to run background tasks. - nullable: true - example: elastic + examples: + - elastic consumer: type: string description: The application or feature that owns the rule. For example, `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`. - example: alerts + examples: + - alerts created_at: type: string description: The date and time that the rule was created. format: date-time - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' created_by: - type: string + type: + - "string" + - "null" description: The identifier for the user that created the rule. - nullable: true - example: elastic + examples: + - elastic enabled: type: boolean description: Indicates whether the rule is currently enabled. - example: true + examples: + - true execution_status: type: object properties: last_duration: type: integer - example: 55 + examples: + - 55 last_execution_date: type: string format: date-time - example: '2022-12-06T00:13:43.890Z' + examples: + - '2022-12-06T00:13:43.890Z' status: type: string - example: ok + examples: + - ok id: type: string description: The identifier for the rule. - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef last_run: type: object properties: @@ -83,39 +95,49 @@ properties: type: integer outcome: type: string - example: succeeded + examples: + - succeeded outcome_msg: - type: array + type: + - "array" + - "null" items: type: string - nullable: true outcome_order: type: integer warning: - type: string - nullable: true - example: null + type: + - "string" + - "null" + examples: + - null muted_alert_ids: - type: array - nullable: true + type: + - "array" + - "null" items: type: string mute_all: type: boolean - example: false + examples: + - false name: type: string description: The name of the rule. - example: cluster_health_rule + examples: + - cluster_health_rule next_run: - type: string + type: + - "string" + - "null" format: date-time - nullable: true - example: '2022-12-06T00:14:43.818Z' + examples: + - '2022-12-06T00:14:43.818Z' notify_when: - type: string + type: + - "string" + - "null" description: Indicates how often alerts generate actions. - nullable: true params: type: object description: The parameters for the rule. @@ -127,7 +149,8 @@ properties: type: string description: > The identifier for the type of rule. For example, `.es-query`, `.index-threshold`, `logs.alert.document.count`, `monitoring_alert_cluster_health`, `siem.thresholdRule`, or `xpack.ml.anomaly_detection_alert`. - example: monitoring_alert_cluster_health + examples: + - monitoring_alert_cluster_health running: type: boolean description: Indicates whether the rule is running. @@ -135,7 +158,8 @@ properties: $ref: 'schedule.yaml' scheduled_task_id: type: string - example: b530fed0-74f5-11ed-9801-35303b735aef + examples: + - b530fed0-74f5-11ed-9801-35303b735aef tags: $ref: 'tags.yaml' throttle: @@ -143,9 +167,12 @@ properties: updated_at: type: string description: The date and time that the rule was updated most recently. - example: '2022-12-05T23:36:58.284Z' + examples: + - '2022-12-05T23:36:58.284Z' updated_by: - type: string + type: + - "string" + - "null" description: The identifier for the user that updated this rule most recently. - nullable: true - example: elastic \ No newline at end of file + examples: + - elastic \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml index 57ddf84ceb413..75e98d9a8d193 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml @@ -3,4 +3,5 @@ description: The check interval, which specifies how frequently the rule conditi properties: interval: type: string - example: 1m \ No newline at end of file + examples: + - 1m \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml index 4d646f637522d..7060ecf4e91a0 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml @@ -4,4 +4,5 @@ description: > type: array items: type: integer - example: 4000 \ No newline at end of file + examples: + - 4000 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml index 3459365ee0a1d..dd39d4c0bdc3a 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml @@ -7,4 +7,5 @@ enum: - "<=" - between - notBetween -example: ">" \ No newline at end of file +examples: + - ">" \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml index 19d8e621cdaf1..f45573dac8abb 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml @@ -1,9 +1,11 @@ -type: string +type: + - "string" + - "null" description: > The throttle interval, which defines how often an alert generates repeated actions. It is specified in seconds, minutes, hours, or days and is applicable only if `notify_when` is set to `onThrottleInterval`. NOTE: You cannot specify the throttle interval at both the rule and action level. The recommended method is to set it for each action. If you set it at the rule level then update the rule in Kibana, it is automatically changed to use action-specific values. -nullable: true default: null -example: 10m \ No newline at end of file +examples: + - 10m \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml index 7271f62f8dac2..137ae56a91672 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml @@ -2,4 +2,5 @@ description: > The size of the time window (in `timeWindowUnit` units), which determines how far back to search for documents. Generally it should be a value higher than the rule check interval to avoid gaps in detection. type: integer -example: 5 \ No newline at end of file +examples: + - 5 \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml index c0f2d458ae0e8..bc2cbf1bd3e1c 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml @@ -6,4 +6,5 @@ enum: - m - h - d -example: "m" \ No newline at end of file +examples: + - "m" \ No newline at end of file diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/update_rule_request.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/update_rule_request.yaml index 58b6049aa1077..63293f76ca710 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/update_rule_request.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/update_rule_request.yaml @@ -12,7 +12,8 @@ properties: name: type: string description: The name of the rule. - example: cluster_health_rule + examples: + - cluster_health_rule notify_when: $ref: 'notify_when.yaml' params: diff --git a/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml b/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml index 7d00f2c64a7cc..39c46ca8513f9 100644 --- a/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml +++ b/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml @@ -1,8 +1,8 @@ -openapi: 3.0.1 +openapi: 3.1.0 info: title: Alerting description: OpenAPI schema for alerting endpoints - version: '0.1' + version: '0.2' contact: name: Alerting Team license: diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml index 5b856e24ca997..25ae1cb0b9fc6 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml @@ -28,7 +28,8 @@ get: properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -36,14 +37,16 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" execution_health: type: object description: The timestamp and status of the rule run. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -51,14 +54,16 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" read_health: type: object description: The timestamp and status of the rule reading events. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -66,15 +71,18 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" has_permanent_encryption_key: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. - example: true + examples: + - true is_sufficiently_secure: type: boolean description: If `false`, security is enabled but TLS is not. - example: true + examples: + - true examples: getAlertingHealthResponse: $ref: '../components/examples/get_health_response.yaml' diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml index a4d624110014c..96c5973c570c8 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml @@ -90,7 +90,8 @@ post: required: true schema: type: string - example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + examples: + - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 requestBody: required: true content: diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml index 1dba3e085e2b7..41ec2aeadbe34 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml @@ -186,14 +186,16 @@ get: minimum_license_required: description: The subscriptions required to use the rule type. type: string - example: basic + examples: + - basic name: description: The descriptive name of the rule type. type: string producer: description: An identifier for the application that produces this rule type. type: string - example: stackAlerts + examples: + - stackAlerts recovery_action_group: description: An action group to use when an alert goes from an active state to an inactive one. type: object @@ -204,7 +206,8 @@ get: type: string rule_task_timeout: type: string - example: 5m + examples: + - 5m examples: getRuleTypesResponse: $ref: '../components/examples/get_rule_types_response.yaml' diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml index f512a0660f181..8055b4b5310a5 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml @@ -19,7 +19,8 @@ get: schema: type: string default: OR - example: OR + examples: + - OR - name: fields in: query description: The fields to return in the `attributes` key of the response. @@ -53,14 +54,16 @@ get: schema: type: integer default: 1 - example: 1 + examples: + - 1 - name: per_page in: query description: The number of rules to return per page. schema: type: integer default: 20 - example: 20 + examples: + - 20 - name: search in: query description: An Elasticsearch simple_query_string query that filters the objects in the response. @@ -91,7 +94,8 @@ get: - asc - desc default: desc - example: asc + examples: + - asc responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml index 32dcbbf218a34..2cc8acdf5c5ac 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml @@ -17,7 +17,8 @@ get: schema: type: string default: OR - example: OR + examples: + - OR - name: fields in: query description: The fields to return in the `attributes` key of the response. @@ -51,14 +52,16 @@ get: schema: type: integer default: 1 - example: 1 + examples: + - 1 - name: per_page in: query description: The number of alerts to return per page. schema: type: integer default: 20 - example: 20 + examples: + - 20 - name: search in: query description: An Elasticsearch `simple_query_string` query that filters the alerts in the response. @@ -89,7 +92,8 @@ get: - asc - desc default: desc - example: asc + examples: + - asc responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml index eba22ac1b4092..593977bd384d3 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml @@ -26,7 +26,8 @@ get: properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -34,14 +35,16 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" executionHealth: type: object description: The timestamp and status of the alert execution. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -49,14 +52,16 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" readHealth: type: object description: The timestamp and status of the alert reading events. properties: status: type: string - example: ok + examples: + - ok enum: - error - ok @@ -64,15 +69,18 @@ get: timestamp: type: string format: date-time - example: "2023-01-13T01:28:00.280Z" + examples: + - "2023-01-13T01:28:00.280Z" hasPermanentEncryptionKey: type: boolean description: If `false`, the encrypted saved object plugin does not have a permanent encryption key. - example: true + examples: + - true isSufficientlySecure: type: boolean description: If `false`, security is enabled but TLS is not. - example: true + examples: + - true '401': description: Authorization information is missing or invalid. content: diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml index 4af612fc150c5..48a1b12984b4c 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml @@ -16,7 +16,8 @@ delete: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. @@ -42,7 +43,8 @@ get: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '200': description: Indicates a successful call. @@ -72,7 +74,8 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - $ref: '../components/parameters/space_id.yaml' requestBody: required: true @@ -146,7 +149,8 @@ post: interval: type: string description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute. - example: "10s" + examples: + - "10s" tags: type: array items: @@ -189,7 +193,8 @@ put: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 requestBody: required: true content: @@ -251,7 +256,8 @@ put: interval: type: string description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute. - example: "1d" + examples: + - "1d" tags: type: array items: diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml index 62fc4de90cae9..a383c71ed0eae 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml @@ -14,7 +14,8 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml index 85ede004c1890..19b782ea3cccb 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml @@ -14,7 +14,8 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml index 6507cf6da6a18..64c28317025a4 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml @@ -14,7 +14,8 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml index 17c48dae2677b..63fa1d2aa50fa 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml @@ -14,7 +14,8 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml index 439445aa29a82..0f2620aff6a1e 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml @@ -14,14 +14,16 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - in: path name: alertInstanceId description: An identifier for the alert instance. required: true schema: type: string - example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 + examples: + - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: '204': description: Indicates a successful call. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml index 3a7fe8dc1d31a..7b1b6abeab392 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml @@ -14,14 +14,16 @@ post: required: true schema: type: string - example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + examples: + - 41893910-6bca-11eb-9e0d-85d233e3ee35 - in: path name: alertInstanceId description: An identifier for the alert instance. required: true schema: type: string - example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 + examples: + - dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 responses: '204': description: Indicates a successful call.