[DOCS][OAS] Add alerting to Kibana API bundle (#188885)

This commit is contained in:
Lisa Cawley 2024-07-30 15:59:47 -07:00 committed by GitHub
parent 6c87925bcb
commit 8a26557491
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 7204 additions and 1378 deletions

View file

@ -16,12 +16,11 @@
.PHONY: api-docs
api-docs: ## Generate kibana.serverless.yaml and kibana.yaml
@npx @redocly/cli join "kibana.info.serverless.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/actions/docs/openapi/bundled_serverless.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis_serverless.yaml" "../packages/core/saved-objects/docs/openapi/bundled_serverless.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" -o "output/kibana.serverless.yaml" "bundle.serverless.json" --prefix-components-with-info-prop title
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
.PHONY: api-docs-stateful
api-docs-stateful: ## Generate only kibana.yaml
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
# Temporarily omit "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" due to OAS version
@npx @redocly/cli join "kibana.info.yaml" "../x-pack/plugins/alerting/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/apm/docs/openapi/apm.yaml" "../x-pack/plugins/cases/docs/openapi/bundled.yaml" "../x-pack/plugins/actions/docs/openapi/bundled.yaml" "../src/plugins/data_views/docs/openapi/bundled.yaml" "../x-pack/plugins/ml/common/openapi/ml_apis.yaml" "../packages/core/saved-objects/docs/openapi/bundled.yaml" "../x-pack/plugins/observability_solution/slo/docs/openapi/slo/bundled.yaml" "bundle.json" -o "output/kibana.yaml" --prefix-components-with-info-prop title
# Temporarily omit "../x-pack/plugins/fleet/common/openapi/bundled.yaml" due to internals tag and tag sorting
.PHONY: api-docs-serverless

File diff suppressed because it is too large Load diff

View file

@ -13,22 +13,12 @@ A guide about the openApi specification can be found at [https://swagger.io/docs
## Tools
It is possible to validate the docs before bundling them with the following
command in the `x-pack/plugins/alerting/docs/openapi/` folder:
```
npx swagger-cli validate entrypoint.yaml
```
Then you can generate the `bundled` files by running the following commands:
You can generate the `bundled` files by running the following commands:
```
npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml
npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json
```
You can run additional linting with the following command:
```
npx @redocly/cli lint bundled.json
```
Then join these files with the rest of the Kibana APIs per `oas_docs/README.md`

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -4,5 +4,4 @@ description: An identifier for the alert. The identifier is generated by the rul
required: true
schema:
type: string
examples:
- ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74

View file

@ -4,5 +4,4 @@ description: An identifier for the rule.
required: true
schema:
type: string
examples:
- ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74

View file

@ -4,5 +4,4 @@ description: An identifier for the space. If `/s/` and the identifier are omitte
required: true
schema:
type: string
examples:
- default
example: default

View file

@ -3,15 +3,13 @@ title: Unsuccessful rule API response
properties:
error:
type: string
examples:
- Unauthorized
example: Unauthorized
enum:
- Unauthorized
message:
type: string
statusCode:
type: integer
examples:
- 401
example: 401
enum:
- 401

View file

@ -2,17 +2,14 @@ type: object
properties:
error:
type: string
examples:
- Not Found
example: Not Found
enum:
- Not Found
message:
type: string
examples:
- "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found"
example: "Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found"
statusCode:
type: integer
examples:
- 404
example: 404
enum:
- 404

View file

@ -1,7 +1,6 @@
type:
- "array"
- "null"
type: array
default: []
nullable: true
items:
type: object
required:
@ -38,8 +37,7 @@ 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
examples:
- [1,2,3,4,5]
example: [1,2,3,4,5]
hours:
type: object
description: >
@ -49,25 +47,21 @@ items:
end:
type: string
description: The end of the time frame in 24-hour notation (`hh:mm`).
examples:
- 17:00
example: 17:00
start:
type: string
description: The start of the time frame in 24-hour notation (`hh:mm`).
examples:
- 08:00
example: 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.
examples:
- Europe/Madrid
example: Europe/Madrid
connector_type_id:
type: string
description: The type of connector. This property appears in responses but cannot be set in requests.
examples:
- .server-log
example: .server-log
readOnly: true
frequency:
type: object
@ -93,13 +87,11 @@ 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`.
examples:
- default
example: default
id:
type: string
description: The identifier for the connector saved object.
examples:
- 9dca3e00-74f5-11ed-9801-35303b735aef
example: 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.
@ -107,5 +99,4 @@ items:
uuid:
type: string
description: A universally unique identifier (UUID) for the action.
examples:
- 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61
example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61

View file

@ -7,66 +7,53 @@ properties:
type: object
alertTypeId:
type: string
examples:
- ".index-threshold"
example: ".index-threshold"
apiKeyOwner:
type:
- "string"
- "null"
examples:
- elastic
type: string
nullable: true
example: elastic
createdAt:
type: string
description: The date and time that the alert was created.
format: date-time
examples:
- '2022-12-05T23:36:58.284Z'
example: '2022-12-05T23:36:58.284Z'
createdBy:
type: string
description: The identifier for the user that created the alert.
examples:
- elastic
example: elastic
enabled:
type: boolean
description: Indicates whether the alert is currently enabled.
examples:
- true
example: true
executionStatus:
type: object
properties:
lastExecutionDate:
type: string
format: date-time
examples:
- '2022-12-06T00:13:43.890Z'
example: '2022-12-06T00:13:43.890Z'
status:
type: string
examples:
- ok
example: ok
id:
type: string
description: The identifier for the alert.
examples:
- b530fed0-74f5-11ed-9801-35303b735aef
example: b530fed0-74f5-11ed-9801-35303b735aef
muteAll:
type: boolean
examples:
- false
example: false
mutedInstanceIds:
type:
- "array"
- "null"
type: array
nullable: true
items:
type: string
name:
type: string
description: The name of the alert.
examples:
- my alert
example: my alert
notifyWhen:
type: string
examples:
- onActionGroupChange
example: onActionGroupChange
params:
type: object
additionalProperties: true
@ -77,24 +64,19 @@ properties:
type: string
scheduledTaskId:
type: string
examples:
- b530fed0-74f5-11ed-9801-35303b735aef
example: b530fed0-74f5-11ed-9801-35303b735aef
tags:
type: array
items:
type: string
throttle:
type:
- "string"
- "null"
type: string
nullable: true
updatedAt:
type: string
examples:
- '2022-12-05T23:36:58.284Z'
example: '2022-12-05T23:36:58.284Z'
updatedBy:
type:
- "string"
- "null"
type: string
description: The identifier for the user that updated this alert most recently.
examples:
- elastic
nullable: true
example: elastic

View file

@ -5,9 +5,8 @@ properties:
type: object
properties:
alias:
type:
- "string"
- "null"
type: string
nullable: true
controlledBy:
type: string
disabled:

View file

@ -9,5 +9,4 @@ enum:
- onActiveAlert
- onThrottleInterval
deprecated: true
examples:
- onActiveAlert
example: onActiveAlert

View file

@ -8,5 +8,4 @@ enum:
- onActionGroupChange
- onActiveAlert
- onThrottleInterval
examples:
- onActiveAlert
example: onActiveAlert

View file

@ -35,14 +35,12 @@ oneOf:
type: string
enum:
- esqlQuery
examples:
- esqlQuery
example: esqlQuery
size:
type: integer
description: >
When `searchType` is `esqlQuery`, this property is required but it does not affect the rule behavior.
examples:
- 0
example: 0
termSize:
$ref: 'termsize.yaml'
threshold:
@ -62,8 +60,7 @@ oneOf:
Since the `threshold` value must be `0`, the result is that an alert occurs whenever the query returns results.
enum:
- ">"
examples:
- ">"
example: ">"
timeField:
$ref: 'timefield.yaml'
timeWindowSize:
@ -108,8 +105,7 @@ oneOf:
properties:
language:
type: string
examples:
- kuery
example: kuery
query:
type: string
searchType:
@ -117,8 +113,7 @@ oneOf:
type: string
enum:
- searchSource
examples:
- searchSource
example: searchSource
size:
$ref: 'size.yaml'
termField:
@ -170,8 +165,7 @@ oneOf:
enum:
- esQuery
default: esQuery
examples:
- esQuery
example: esQuery
size:
$ref: 'size.yaml'
termField:

View file

@ -27,60 +27,48 @@ 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.
examples:
- false
example: false
api_key_owner:
type:
- "string"
- "null"
type: string
description: >
The owner of the API key that is associated with the rule and used to run background tasks.
examples:
- elastic
nullable: true
example: 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`.
examples:
- alerts
example: alerts
created_at:
type: string
description: The date and time that the rule was created.
format: date-time
examples:
- '2022-12-05T23:36:58.284Z'
example: '2022-12-05T23:36:58.284Z'
created_by:
type:
- "string"
- "null"
type: string
description: The identifier for the user that created the rule.
examples:
- elastic
nullable: true
example: elastic
enabled:
type: boolean
description: Indicates whether the rule is currently enabled.
examples:
- true
example: true
execution_status:
type: object
properties:
last_duration:
type: integer
examples:
- 55
example: 55
last_execution_date:
type: string
format: date-time
examples:
- '2022-12-06T00:13:43.890Z'
example: '2022-12-06T00:13:43.890Z'
status:
type: string
examples:
- ok
example: ok
id:
type: string
description: The identifier for the rule.
examples:
- b530fed0-74f5-11ed-9801-35303b735aef
example: b530fed0-74f5-11ed-9801-35303b735aef
last_run:
type: object
properties:
@ -97,49 +85,39 @@ properties:
type: integer
outcome:
type: string
examples:
- succeeded
example: succeeded
outcome_msg:
type:
- "array"
- "null"
type: array
items:
type: string
nullable: true
outcome_order:
type: integer
warning:
type:
- "string"
- "null"
examples:
- null
type: string
nullable: true
example: null
muted_alert_ids:
type:
- "array"
- "null"
type: array
nullable: true
items:
type: string
mute_all:
type: boolean
examples:
- false
example: false
name:
type: string
description: The name of the rule.
examples:
- cluster_health_rule
example: cluster_health_rule
next_run:
type:
- "string"
- "null"
type: string
format: date-time
examples:
- '2022-12-06T00:14:43.818Z'
nullable: true
example: '2022-12-06T00:14:43.818Z'
notify_when:
type:
- "string"
- "null"
type: string
description: Indicates how often alerts generate actions.
nullable: true
params:
type: object
description: The parameters for the rule.
@ -151,8 +129,7 @@ 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`.
examples:
- monitoring_alert_cluster_health
example: monitoring_alert_cluster_health
running:
type: boolean
description: Indicates whether the rule is running.
@ -160,8 +137,7 @@ properties:
$ref: 'schedule.yaml'
scheduled_task_id:
type: string
examples:
- b530fed0-74f5-11ed-9801-35303b735aef
example: b530fed0-74f5-11ed-9801-35303b735aef
tags:
$ref: 'tags.yaml'
throttle:
@ -169,12 +145,9 @@ properties:
updated_at:
type: string
description: The date and time that the rule was updated most recently.
examples:
- '2022-12-05T23:36:58.284Z'
example: '2022-12-05T23:36:58.284Z'
updated_by:
type:
- "string"
- "null"
type: string
description: The identifier for the user that updated this rule most recently.
examples:
- elastic
nullable: true
example: elastic

View file

@ -3,5 +3,4 @@ description: The check interval, which specifies how frequently the rule conditi
properties:
interval:
type: string
examples:
- 1m
example: 1m

View file

@ -4,5 +4,4 @@ description: >
type: array
items:
type: integer
examples:
- 4000
example: 4000

View file

@ -7,5 +7,4 @@ enum:
- "<="
- between
- notBetween
examples:
- ">"
example: ">"

View file

@ -1,12 +1,10 @@
type:
- "string"
- "null"
type: string
description: >
Deprecated in 8.13.0. Use the `throttle` property in the action `frequency` object instead.
The throttle interval, which defines how often an alert generates repeated actions.
NOTE: You cannot specify the throttle interval at both the rule and action level.
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
deprecated: true
examples:
- 10m
example: 10m

View file

@ -1,11 +1,9 @@
type:
- "string"
- "null"
type: string
nullable: true
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.
default: null
examples:
- 10m
example: 10m

View file

@ -2,5 +2,4 @@ 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
examples:
- 5
example: 5

View file

@ -6,5 +6,4 @@ enum:
- m
- h
- d
examples:
- "m"
example: "m"

View file

@ -14,8 +14,7 @@ properties:
name:
type: string
description: The name of the rule.
examples:
- cluster_health_rule
example: cluster_health_rule
notify_when:
$ref: 'notify_when.yaml'
params:

View file

@ -1,8 +1,8 @@
openapi: 3.1.0
openapi: 3.0.1
info:
title: Alerting
description: OpenAPI schema for alerting endpoints
version: '0.2'
version: '0.1'
contact:
name: Alerting Team
license:
@ -14,62 +14,48 @@ tags:
servers:
- url: /
paths:
'/s/{spaceId}/api/alerting/rule':
$ref: 'paths/s@{spaceid}@api@alerting@rule.yaml'
'/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/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@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}/_update_api_key':
$ref: 'paths/s@{spaceid}@api@alerting@rule@{ruleid}@_update_api_key.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'
'/api/alerting/rule':
$ref: 'paths/api@alerting@rule.yaml'
'/api/alerting/rule/{ruleId}':
$ref: 'paths/api@alerting@rule@{ruleid}.yaml'
'/api/alerting/rule/{ruleId}/_disable':
$ref: 'paths/api@alerting@rule@{ruleid}@_disable.yaml'
'/api/alerting/rule/{ruleId}/_enable':
$ref: 'paths/api@alerting@rule@{ruleid}@_enable.yaml'
'/api/alerting/rules/_find':
$ref: 'paths/api@alerting@rules@_find.yaml'
'/api/alerting/_health':
$ref: paths/api@alerting@_health.yaml
'/api/alerting/rule_types':
$ref: 'paths/api@alerting@rule_types.yaml'
'/api/alerting/rule/{ruleId}/_mute_all':
$ref: 'paths/api@alerting@rule@{ruleid}@_mute_all.yaml'
'/api/alerting/rule/{ruleId}/_unmute_all':
$ref: 'paths/api@alerting@rule@{ruleid}@_unmute_all.yaml'
'/api/alerting/rule/{ruleId}/_update_api_key':
$ref: 'paths/api@alerting@rule@{ruleid}@_update_api_key.yaml'
'/api/alerting/rule/{ruleId}/alert/{alertId}/_mute':
$ref: 'paths/api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml'
'/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute':
$ref: 'paths/api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml'
# Deprecated APIs
'/s/{spaceId}/api/alerts/alert/{alertId}':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/_disable':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/_enable':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/_mute_all':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml'
'/s/{spaceId}/api/alerts/alerts/_find':
$ref: 'paths/s@{spaceid}@api@alerts@_find.yaml'
'/s/{spaceId}/api/alerts/alerts/_health':
$ref: 'paths/s@{spaceid}@api@alerts@_health.yaml'
'/s/{spaceId}/api/alerts/alerts/list_alert_types':
$ref: 'paths/s@{spaceid}@api@alerts@list_alert_types.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml'
'/s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute':
$ref: 'paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml'
components:
securitySchemes:
basicAuth:
type: http
scheme: basic
apiKeyAuth:
type: apiKey
in: header
name: Authorization
description: 'e.g. Authorization: ApiKey base64AccessApiKey'
security:
- basicAuth: []
- apiKeyAuth: []
'/api/alerts/alert/{alertId}':
$ref: 'paths/api@alerts@alert@{alertid}.yaml'
'/api/alerts/alert/{alertId}/_disable':
$ref: 'paths/api@alerts@alert@{alertid}@_disable.yaml'
'/api/alerts/alert/{alertId}/_enable':
$ref: 'paths/api@alerts@alert@{alertid}@_enable.yaml'
'/api/alerts/alert/{alertId}/_mute_all':
$ref: 'paths/api@alerts@alert@{alertid}@_mute_all.yaml'
'/api/alerts/alert/{alertId}/_unmute_all':
$ref: 'paths/api@alerts@alert@{alertid}@_unmute_all.yaml'
'/api/alerts/alerts/_find':
$ref: 'paths/api@alerts@_find.yaml'
'/api/alerts/alerts/_health':
$ref: 'paths/api@alerts@_health.yaml'
'/api/alerts/alerts/list_alert_types':
$ref: 'paths/api@alerts@list_alert_types.yaml'
'/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute':
$ref: 'paths/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml'
'/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute':
$ref: 'paths/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml'

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves the health status of the alerting framework.
summary: Get the alerting framework health
operationId: getAlertingHealth
description: >
You must have `read` privileges for the **Management > Stack Rules** feature
@ -7,8 +7,6 @@ get:
**Analytics > Machine Learning**, **Observability**, or **Security** features.
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
@ -28,8 +26,7 @@ get:
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -37,16 +34,14 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "2023-01-13T01:28:00.280Z"
execution_health:
type: object
description: The timestamp and status of the rule run.
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -54,16 +49,14 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "2023-01-13T01:28:00.280Z"
read_health:
type: object
description: The timestamp and status of the rule reading events.
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -71,18 +64,15 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "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.
examples:
- true
example: true
is_sufficiently_secure:
type: boolean
description: If `false`, security is enabled but TLS is not.
examples:
- true
example: true
examples:
getAlertingHealthResponse:
$ref: '../components/examples/get_health_response.yaml'

View file

@ -1,5 +1,5 @@
post:
summary: Creates a rule with a randomly generated rule identifier.
summary: Create a rule with a random identifier
operationId: createRule
description: >
To create a rule, you must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule you're creating.
@ -13,7 +13,6 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
requestBody:
required: true
content:

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves a rule by its identifier.
summary: Get rule details
operationId: getRule
description: >
You must have `read` privileges for the appropriate Kibana features,
@ -12,7 +12,6 @@ get:
- alerting
parameters:
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
@ -37,7 +36,7 @@ get:
$ref: '../components/schemas/404_response.yaml'
delete:
summary: Deletes a rule.
summary: Delete a rule
operationId: deleteRule
description: >
To delete a rule, you must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule you're deleting.
@ -49,7 +48,6 @@ delete:
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.
@ -67,9 +65,11 @@ delete:
$ref: '../components/schemas/404_response.yaml'
post:
summary: Creates a rule with a specific rule identifier.
summary: Create a rule
operationId: createRuleId
description: >
This API creates a rule with a specific rule identifier.
If you omit the identifer, it is automatically generated.
To create a rule, you must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule you're creating.
For example, you must have privileges for the **Management > Stack rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, or **Security** features.
If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.
@ -81,7 +81,6 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: ruleId
description: >
@ -90,8 +89,7 @@ post:
required: true
schema:
type: string
examples:
- ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
requestBody:
required: true
content:
@ -137,7 +135,7 @@ post:
$ref: '../components/schemas/404_response.yaml'
put:
summary: Updates the attributes for a rule.
summary: Update a rule
operationId: updateRule
description: >
To update a rule, you must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule you're updating.
@ -155,7 +153,6 @@ put:
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
requestBody:
required: true
content:

View file

@ -1,5 +1,5 @@
post:
summary: Disables a rule.
summary: Disable a rule
operationId: disableRule
description: >
You must have `all` privileges for the appropriate Kibana features,
@ -11,7 +11,6 @@ post:
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.

View file

@ -1,5 +1,5 @@
post:
summary: Enables a rule.
summary: Enable a rule
operationId: enableRule
description: >
To enable a rule, you must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule.
@ -13,7 +13,6 @@ post:
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.

View file

@ -1,5 +1,5 @@
post:
summary: Mutes all alerts.
summary: Mute all alerts
operationId: muteAllAlerts
description: >
This API snoozes the notifications for the rule indefinitely. The rule
@ -15,7 +15,6 @@ post:
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.

View file

@ -1,5 +1,5 @@
post:
summary: Unmutes all alerts.
summary: Unmute all alerts
operationId: unmuteAllAlerts
description: >
If the rule has its notifications snoozed indefinitely, this API cancels the snooze.
@ -14,7 +14,6 @@ post:
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.

View file

@ -1,5 +1,5 @@
post:
summary: Updates the API key for a rule.
summary: Update the API key for a rule
operationId: updateRuleAPIKey
description: The new API key has the credentials of the user that submits the request.
tags:
@ -7,7 +7,6 @@ post:
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/rule_id.yaml'
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Mutes an alert.
summary: Mute an alert
operationId: muteAlert
description: >
You must have `all` privileges for the appropriate Kibana features,
@ -14,7 +14,6 @@ post:
- $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.

View file

@ -1,5 +1,5 @@
post:
summary: Unmutes an alert.
summary: Unmute an alert
operationId: unmuteAlert
description: >
You must have `all` privileges for the appropriate Kibana features,
@ -14,7 +14,6 @@ post:
- $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.

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves a list of rule types.
summary: Get the rule types
operationId: getRuleTypes
description: >
If you have `read` privileges for one or more Kibana features, the API
@ -10,8 +10,6 @@ get:
**Stack Monitoring** feature, use the `monitoring_user` built-in role.
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
@ -245,16 +243,14 @@ get:
minimum_license_required:
description: The subscriptions required to use the rule type.
type: string
examples:
- basic
example: 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
examples:
- stackAlerts
example: stackAlerts
recovery_action_group:
description: An action group to use when an alert goes from an active state to an inactive one.
type: object
@ -265,8 +261,7 @@ get:
type: string
rule_task_timeout:
type: string
examples:
- 5m
example: 5m
examples:
getRuleTypesResponse:
$ref: '../components/examples/get_rule_types_response.yaml'

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves information about rules.
summary: Find rule information
operationId: findRules
description: >
You must have `read` privileges for the appropriate Kibana features,
@ -12,15 +12,13 @@ get:
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
- name: default_search_operator
in: query
description: The default operator to use for the simple_query_string.
schema:
type: string
default: OR
examples:
- AND
example: OR
- name: fields
in: query
description: The fields to return in the `attributes` key of the response.
@ -54,31 +52,27 @@ get:
schema:
type: integer
default: 1
examples:
- 1
example: 1
- name: per_page
in: query
description: The number of rules to return per page.
schema:
type: integer
default: 20
examples:
- 20
example: 20
- name: search
in: query
description: An Elasticsearch simple_query_string query that filters the objects in the response.
schema:
type: string
examples:
- threshold +-test*
example: threshold +-test*
- name: search_fields
in: query
description: The fields to perform the simple_query_string parsed query against.
schema:
oneOf:
- type: string
examples:
- name
example: name
- type: array
items:
type: string
@ -98,8 +92,7 @@ get:
- asc
- desc
default: desc
examples:
- asc
example: asc
responses:
'200':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
get:
summary: Retrieves a paginated set of alerts.
summary: Get a paginated set of alerts
operationId: legacyFindAlerts
deprecated: true
description: >
@ -10,15 +10,13 @@ get:
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
- name: default_search_operator
in: query
description: The default operator to use for the `simple_query_string`.
schema:
type: string
default: OR
examples:
- OR
example: OR
- name: fields
in: query
description: The fields to return in the `attributes` key of the response.
@ -52,16 +50,14 @@ get:
schema:
type: integer
default: 1
examples:
- 1
example: 1
- name: per_page
in: query
description: The number of alerts to return per page.
schema:
type: integer
default: 20
examples:
- 20
example: 20
- name: search
in: query
description: An Elasticsearch `simple_query_string` query that filters the alerts in the response.
@ -92,8 +88,7 @@ get:
- asc
- desc
default: desc
examples:
- asc
example: asc
responses:
'200':
description: Indicates a successful call.

View file

@ -1,12 +1,10 @@
get:
summary: Retrieves the health status of the alerting framework.
summary: Get the alerting framework health
operationId: legacyGetAlertingHealth
deprecated: true
description: Deprecated in 7.13.0. Use the get alerting framework health API instead.
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.
@ -26,8 +24,7 @@ get:
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -35,16 +32,14 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "2023-01-13T01:28:00.280Z"
executionHealth:
type: object
description: The timestamp and status of the alert execution.
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -52,16 +47,14 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "2023-01-13T01:28:00.280Z"
readHealth:
type: object
description: The timestamp and status of the alert reading events.
properties:
status:
type: string
examples:
- ok
example: ok
enum:
- error
- ok
@ -69,18 +62,15 @@ get:
timestamp:
type: string
format: date-time
examples:
- "2023-01-13T01:28:00.280Z"
example: "2023-01-13T01:28:00.280Z"
hasPermanentEncryptionKey:
type: boolean
description: If `false`, the encrypted saved object plugin does not have a permanent encryption key.
examples:
- true
example: true
isSufficientlySecure:
type: boolean
description: If `false`, security is enabled but TLS is not.
examples:
- true
example: true
'401':
description: Authorization information is missing or invalid.
content:

View file

@ -1,5 +1,5 @@
delete:
summary: Permanently removes an alert.
summary: Delete an alert
operationId: legaryDeleteAlert
deprecated: true
description: >
@ -9,15 +9,13 @@ delete:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'204':
description: Indicates a successful call.
@ -29,22 +27,20 @@ delete:
$ref: '../components/schemas/401_response.yaml'
get:
summary: Retrieves an alert by its identifier.
summary: Get an alert by identifier
operationId: legacyGetAlert
deprecated: true
description: Deprecated in 7.13.0. Use the get rule API instead.
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'200':
description: Indicates a successful call.
@ -60,7 +56,7 @@ get:
$ref: '../components/schemas/401_response.yaml'
post:
summary: Create an alert.
summary: Create an alert
operationId: legacyCreateAlert
deprecated: true
description: Deprecated in 7.13.0. Use the create rule API instead.
@ -74,9 +70,7 @@ post:
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
- $ref: '../components/parameters/space_id.yaml'
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
requestBody:
required: true
content:
@ -112,7 +106,7 @@ post:
If you don't need this functionality, set it to `default`.
id:
type: string
description: The ID of the action saved object to execute.
description: The ID of the action saved object.
params:
type: object
description: >
@ -148,9 +142,8 @@ post:
properties:
interval:
type: string
description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute.
examples:
- "10s"
description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should run.
example: "10s"
tags:
type: array
items:
@ -178,7 +171,7 @@ post:
$ref: '../components/schemas/401_response.yaml'
put:
summary: Updates the attributes for an alert.
summary: Update an alert
operationId: legacyUpdateAlert
deprecated: true
description: Deprecated in 7.13.0. Use the update rule API instead.
@ -186,15 +179,13 @@ put:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
requestBody:
required: true
content:
@ -228,7 +219,7 @@ put:
If you don't need this functionality, set it to `default`.
id:
type: string
description: The ID of the action saved object to execute.
description: The ID of the action saved object.
params:
type: object
description: >
@ -255,9 +246,8 @@ put:
properties:
interval:
type: string
description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should execute.
examples:
- "1d"
description: The interval format specifies the interval in seconds, minutes, hours or days at which the alert should run.
example: "1d"
tags:
type: array
items:

View file

@ -1,5 +1,5 @@
post:
summary: Disables an alert.
summary: Disable an alert
operationId: legacyDisableAlert
deprecated: true
description: Deprecated in 7.13.0. Use the disable rule API instead.
@ -7,15 +7,13 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'204':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Enables an alert.
summary: Enable an alert
operationId: legacyEnableAlert
deprecated: true
description: Deprecated in 7.13.0. Use the enable rule API instead.
@ -7,15 +7,13 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'204':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Mutes all alert instances.
summary: Mute all alert instances
operationId: legacyMuteAllAlertInstances
deprecated: true
description: Deprecated in 7.13.0. Use the mute all alerts API instead.
@ -7,15 +7,13 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'204':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Unmutes all alert instances.
summary: Unmute all alert instances
operationId: legacyUnmuteAllAlertInstances
deprecated: true
description: Deprecated in 7.13.0. Use the unmute all alerts API instead.
@ -7,15 +7,13 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: The identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
responses:
'204':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Mutes an alert instance.
summary: Mute an alert instance
operationId: legacyMuteAlertInstance
deprecated: true
description: Deprecated in 7.13.0. Use the mute alert API instead.
@ -7,23 +7,20 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: An identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
- in: path
name: alertInstanceId
description: An identifier for the alert instance.
required: true
schema:
type: string
examples:
- dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
responses:
'204':
description: Indicates a successful call.

View file

@ -1,5 +1,5 @@
post:
summary: Unmutes an alert instance.
summary: Unmute an alert instance
operationId: legacyUnmuteAlertInstance
deprecated: true
description: Deprecated in 7.13.0. Use the unmute alert API instead.
@ -7,23 +7,20 @@ post:
- alerting
parameters:
- $ref: ../components/headers/kbn_xsrf.yaml
- $ref: '../components/parameters/space_id.yaml'
- in: path
name: alertId
description: An identifier for the alert.
required: true
schema:
type: string
examples:
- 41893910-6bca-11eb-9e0d-85d233e3ee35
example: 41893910-6bca-11eb-9e0d-85d233e3ee35
- in: path
name: alertInstanceId
description: An identifier for the alert instance.
required: true
schema:
type: string
examples:
- dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
example: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
responses:
'204':
description: Indicates a successful call.

View file

@ -1,12 +1,10 @@
get:
summary: Retrieves a list of alert types.
summary: Get the alert types
operationId: legacyGetAlertTypes
deprecated: true
description: Deprecated in 7.13.0. Use the get rule types API instead.
tags:
- alerting
parameters:
- $ref: '../components/parameters/space_id.yaml'
responses:
'200':
description: Indicates a successful call.

View file

@ -42,7 +42,8 @@ export const healthRoute = (
path: `${BASE_ALERTING_API_PATH}/_health`,
options: {
access: 'public',
summary: `Get the health of the alerting framework`,
summary: `Get the alerting framework health`,
tags: ['oas-tag:alerting'],
},
validate: false,
},

View file

@ -56,6 +56,11 @@ export const createAlertRoute = ({ router, licenseState, usageCounter }: RouteOp
),
body: bodySchema,
},
options: {
summary: 'Create an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
handleDisabledApiKeysError(
router.handleLegacyErrors(async function (context, req, res) {

View file

@ -28,6 +28,11 @@ export const deleteAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Delete an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -29,6 +29,11 @@ export const disableAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Disable an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -30,6 +30,11 @@ export const enableAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Enable an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
handleDisabledApiKeysError(
router.handleLegacyErrors(async function (context, req, res) {

View file

@ -72,6 +72,13 @@ export const findAlertRoute = (
validate: {
query: querySchema,
},
options: {
summary: 'Find alerts',
tags: ['oas-tag:alerting'],
description:
'Gets a paginated set of alerts. Alert `params` are stored as a flattened field type and analyzed as keywords. As alerts change in Kibana, the results on each page of the response also change. Use the find API for traditional paginated results, but avoid using it to export large amounts of data.',
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -28,6 +28,11 @@ export const getAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Get an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -39,6 +39,11 @@ export const getAlertInstanceSummaryRoute = (
params: paramSchema,
query: querySchema,
},
options: {
summary: 'Get an alert summary',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -28,6 +28,11 @@ export const getAlertStateRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Get the state of an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -24,6 +24,11 @@ export function healthRoute(
{
path: '/api/alerts/_health',
validate: false,
options: {
summary: 'Get the alerting framework health',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -20,6 +20,11 @@ export const listAlertTypesRoute = (
{
path: `${LEGACY_BASE_ALERT_API_PATH}/list_alert_types`,
validate: {},
options: {
summary: 'Get the alert types',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -29,6 +29,11 @@ export const muteAllAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Mute all alert instances',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -32,6 +32,11 @@ export const muteAlertInstanceRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Mute an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -29,6 +29,11 @@ export const unmuteAllAlertRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Unmute all alert instances',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -30,6 +30,11 @@ export const unmuteAlertInstanceRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Unmute an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
router.handleLegacyErrors(async function (context, req, res) {
verifyApiAccess(licenseState);

View file

@ -56,6 +56,11 @@ export const updateAlertRoute = (
body: bodySchema,
params: paramSchema,
},
options: {
summary: 'Update an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
handleDisabledApiKeysError(
router.handleLegacyErrors(async function (context, req, res) {

View file

@ -30,6 +30,11 @@ export const updateApiKeyRoute = (
validate: {
params: paramSchema,
},
options: {
summary: 'Update the API key for an alert',
tags: ['oas-tag:alerting'],
deprecated: true,
},
},
handleDisabledApiKeysError(
router.handleLegacyErrors(async function (context, req, res) {

View file

@ -28,6 +28,7 @@ export const muteAllRuleRoute = (
options: {
access: 'public',
summary: `Mute all alerts`,
tags: ['oas-tag:alerting'],
},
validate: {
params: paramSchema,

View file

@ -35,6 +35,7 @@ export const createRuleRoute = ({ router, licenseState, usageCounter }: RouteOpt
options: {
access: 'public',
summary: `Create a rule`,
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -24,6 +24,7 @@ export const deleteRuleRoute = (
options: {
access: 'public',
summary: `Delete a rule`,
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -26,6 +26,7 @@ export const disableRuleRoute = (
options: {
access: 'public',
summary: 'Disable a rule',
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -25,6 +25,7 @@ export const enableRuleRoute = (
options: {
access: 'public',
summary: 'Enable a rule',
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -43,7 +43,8 @@ const buildFindRulesRoute = ({
path,
options: {
access: 'public',
summary: `Get information about rules.`,
summary: 'Get information about rules',
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -87,6 +87,7 @@ export const getRuleRoute = (
options: {
access: 'public',
summary: `Get rule details`,
tags: ['oas-tag:alerting'],
},
});

View file

@ -24,6 +24,7 @@ export const muteAlertRoute = (
options: {
access: 'public',
summary: `Mute an alert`,
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -25,6 +25,7 @@ export const unmuteAlertRoute = (
options: {
access: 'public',
summary: `Unmute an alert`,
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -34,6 +34,7 @@ export const updateRuleRoute = (
options: {
access: 'public',
summary: `Update a rule`,
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -24,6 +24,7 @@ export const updateRuleApiKeyRoute = (
options: {
access: 'public',
summary: 'Update the API key for a rule',
tags: ['oas-tag:alerting'],
},
validate: {
request: {

View file

@ -57,7 +57,8 @@ export const ruleTypesRoute = (
path: `${BASE_ALERTING_API_PATH}/rule_types`,
options: {
access: 'public',
summary: `Get rule types`,
summary: `Get the rule types`,
tags: ['oas-tag:alerting'],
},
validate: {},
},

View file

@ -25,6 +25,7 @@ export const unmuteAllRuleRoute = (
options: {
access: 'public',
summary: `Unmute all alerts`,
tags: ['oas-tag:alerting'],
},
validate: {
params: paramSchema,