forked from elastic/kibana
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DOCS] Add specifications for deprecated alert APIs (elastic#149655)
(cherry picked from commit 59488af)
- Loading branch information
Showing
15 changed files
with
4,189 additions
and
21 deletions.
There are no files selected for viewing
1,118 changes: 1,118 additions & 0 deletions
1,118
docs/api-generated/rules/rule-apis-passthru.asciidoc
Large diffs are not rendered by default.
Oops, something went wrong.
1,313 changes: 1,313 additions & 0 deletions
1,313
x-pack/plugins/alerting/docs/openapi/bundled.json
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
82 changes: 82 additions & 0 deletions
82
x-pack/plugins/alerting/docs/openapi/components/schemas/alert_response_properties.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
title: Legacy alert response properties | ||
type: object | ||
properties: | ||
actions: | ||
type: array | ||
items: | ||
type: object | ||
alertTypeId: | ||
type: string | ||
example: ".index-threshold" | ||
apiKeyOwner: | ||
type: string | ||
nullable: true | ||
example: elastic | ||
createdAt: | ||
type: string | ||
description: The date and time that the alert was created. | ||
format: date-time | ||
example: '2022-12-05T23:36:58.284Z' | ||
createdBy: | ||
type: string | ||
description: The identifier for the user that created the alert. | ||
example: elastic | ||
enabled: | ||
type: boolean | ||
description: Indicates whether the alert is currently enabled. | ||
example: true | ||
executionStatus: | ||
type: object | ||
properties: | ||
lastExecutionDate: | ||
type: string | ||
format: date-time | ||
example: '2022-12-06T00:13:43.890Z' | ||
status: | ||
type: string | ||
example: ok | ||
id: | ||
type: string | ||
description: The identifier for the alert. | ||
example: b530fed0-74f5-11ed-9801-35303b735aef | ||
muteAll: | ||
type: boolean | ||
example: false | ||
mutedInstanceIds: | ||
type: array | ||
nullable: true | ||
items: | ||
type: string | ||
name: | ||
type: string | ||
description: The name of the alert. | ||
example: my alert | ||
notifyWhen: | ||
type: string | ||
example: onActionGroupChange | ||
params: | ||
type: object | ||
additionalProperties: true | ||
schedule: | ||
type: object | ||
properties: | ||
interval: | ||
type: string | ||
scheduledTaskId: | ||
type: string | ||
example: b530fed0-74f5-11ed-9801-35303b735aef | ||
tags: | ||
type: array | ||
items: | ||
type: string | ||
throttle: | ||
type: string | ||
nullable: true | ||
updatedAt: | ||
type: string | ||
example: '2022-12-05T23:36:58.284Z' | ||
updatedBy: | ||
type: string | ||
description: The identifier for the user that updated this alert most recently. | ||
nullable: true | ||
example: elastic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
120 changes: 120 additions & 0 deletions
120
x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
get: | ||
summary: Retrieves a paginated set of alerts. | ||
operationId: legacyFindAlerts | ||
deprecated: true | ||
description: > | ||
Deprecated in 7.13.0. Use the find rules API instead. | ||
NOTE: 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. | ||
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 | ||
example: OR | ||
- name: fields | ||
in: query | ||
description: The fields to return in the `attributes` key of the response. | ||
schema: | ||
type: array | ||
items: | ||
type: string | ||
- name: filter | ||
in: query | ||
description: > | ||
A KQL string that you filter with an attribute from your saved object. | ||
It should look like `savedObjectType.attributes.title: "myTitle"`. | ||
However, if you used a direct attribute of a saved object, such as | ||
`updatedAt`, you must define your filter, for example, | ||
`savedObjectType.updatedAt > 2018-12-22`. | ||
schema: | ||
type: string | ||
- name: has_reference | ||
in: query | ||
description: Filters the rules that have a relation with the reference objects with a specific type and identifier. | ||
schema: | ||
type: object | ||
properties: | ||
id: | ||
type: string | ||
type: | ||
type: string | ||
- name: page | ||
in: query | ||
description: The page number to return. | ||
schema: | ||
type: integer | ||
default: 1 | ||
example: 1 | ||
- name: per_page | ||
in: query | ||
description: The number of alerts to return per page. | ||
schema: | ||
type: integer | ||
default: 20 | ||
example: 20 | ||
- name: search | ||
in: query | ||
description: An Elasticsearch `simple_query_string` query that filters the alerts in the response. | ||
schema: | ||
type: string | ||
- name: search_fields | ||
in: query | ||
description: The fields to perform the `simple_query_string` parsed query against. | ||
schema: | ||
oneOf: | ||
- type: string | ||
- type: array | ||
items: | ||
type: string | ||
- name: sort_field | ||
in: query | ||
description: > | ||
Determines which field is used to sort the results. The field must exist | ||
in the `attributes` key of the response. | ||
schema: | ||
type: string | ||
- name: sort_order | ||
in: query | ||
description: Determines the sort order. | ||
schema: | ||
type: string | ||
enum: | ||
- asc | ||
- desc | ||
default: desc | ||
example: asc | ||
responses: | ||
'200': | ||
description: Indicates a successful call. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
data: | ||
type: array | ||
items: | ||
$ref: '../components/schemas/alert_response_properties.yaml' | ||
page: | ||
type: integer | ||
perPage: | ||
type: integer | ||
total: | ||
type: integer | ||
'401': | ||
description: Authorization information is missing or invalid. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../components/schemas/401_response.yaml' | ||
servers: | ||
- url: https://localhost:5601 | ||
servers: | ||
- url: https://localhost:5601 |
83 changes: 83 additions & 0 deletions
83
x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
get: | ||
summary: Retrieves the health status of the alerting framework. | ||
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. | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
alertingFrameworkHealth: | ||
type: object | ||
description: > | ||
Three substates identify the health of the alerting framework: `decryptionHealth`, `executionHealth`, and `readHealth`. | ||
properties: | ||
decryptionHealth: | ||
type: object | ||
description: The timestamp and status of the alert decryption. | ||
properties: | ||
status: | ||
type: string | ||
example: ok | ||
enum: | ||
- error | ||
- ok | ||
- warn | ||
timestamp: | ||
type: string | ||
format: date-time | ||
example: "2023-01-13T01:28:00.280Z" | ||
executionHealth: | ||
type: object | ||
description: The timestamp and status of the alert execution. | ||
properties: | ||
status: | ||
type: string | ||
example: ok | ||
enum: | ||
- error | ||
- ok | ||
- warn | ||
timestamp: | ||
type: string | ||
format: date-time | ||
example: "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 | ||
enum: | ||
- error | ||
- ok | ||
- warn | ||
timestamp: | ||
type: string | ||
format: date-time | ||
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. | ||
example: true | ||
isSufficientlySecure: | ||
type: boolean | ||
description: If `false`, security is enabled but TLS is not. | ||
example: true | ||
'401': | ||
description: Authorization information is missing or invalid. | ||
content: | ||
application/json: | ||
schema: | ||
$ref: '../components/schemas/401_response.yaml' | ||
servers: | ||
- url: https://localhost:5601 |
Oops, something went wrong.