Skip to content

Commit

Permalink
Create new alerting HTTP APIs that use the new terminology (#93977) (#…
Browse files Browse the repository at this point in the history
…95781)

* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Create new rule HTTP APIs (#93980)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Move current alert HTTP APIs to legacy folder (#93943)

* Move current HTTP APIs to legacy folder

* Rename BASE_ALERT_API_PATH to LEGACY_BASE_ALERT_API_PATH

* Fix failing tests and extra files

* Add necessary files

* Create rule route

* Get rule API

* Update rule API

* Delete rule route

* Aggregate rules API

* Disable rule API

* Enable rule API

* Find rules API

* Fix Update API

* Get rule alert summary API

* Get rule state API

* Health API

* Rule types API

* Mute all API

* Mute alert API

* Unmute all API

* Unmute alert route

* Update API key API

* corrected tpye by making it much more complicated

* removed unneeded cocde

* Fixes

* Add back health route

* mutedInstanceIds -> mutedAlertIds

* lastRun -> last_run

* alert_type_state -> rule_type_state & alert_instances -> alerts

Co-authored-by: Gidi Meir Morris <[email protected]>

* Create docs for new rule HTTP APIs, deprecate old docs (#94745)

* Create docs for new APIs, deprecate old docs

* Remove connector_type_id

* Update docs

* Add link to legacy APIs from rules API docs

* Remove connector_type_id references

* [DOCS] Add legacy APIs to index.asciidoc

* Fix camel case

Co-authored-by: lcawl <[email protected]>

* Make alerting tests use new rules APIs (#95159)

* Make API integration tests use new HTTP APIs

* Fix end to end tests

* Fix test failures

* Fix more test failures

* Rename some files

* Add tests for legacy APIs (#95333)

* Initial commit (#95457)

* Move some new alerting APIs to /internal (#95461)

* Initial commit

* Update README.md

* Use internal API

* Merge deprecated warning w/ alternative solution

* Update API docs

Co-authored-by: Gidi Meir Morris <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
Co-authored-by: lcawl <[email protected]>
# Conflicts:
#	api_docs/core.json
  • Loading branch information
mikecote authored Mar 30, 2021
1 parent 8f5fd0f commit 52f41d8
Show file tree
Hide file tree
Showing 206 changed files with 9,202 additions and 4,484 deletions.
70 changes: 50 additions & 20 deletions api_docs/alerting.json
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts",
"lineNumber": 132
"lineNumber": 133
}
},
{
Expand All @@ -821,7 +821,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts",
"lineNumber": 133
"lineNumber": 134
}
},
{
Expand All @@ -832,7 +832,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts",
"lineNumber": 134
"lineNumber": 135
}
},
{
Expand All @@ -843,7 +843,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts",
"lineNumber": 135
"lineNumber": 136
},
"signature": [
"Pick<",
Expand All @@ -860,7 +860,7 @@
],
"source": {
"path": "x-pack/plugins/alerting/server/alerts_client/alerts_client.ts",
"lineNumber": 131
"lineNumber": 132
},
"initialIsOpen": false
},
Expand Down Expand Up @@ -905,21 +905,21 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 111
"lineNumber": 93
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 103
"lineNumber": 85
}
}
],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 102
"lineNumber": 84
},
"initialIsOpen": false
},
Expand All @@ -938,7 +938,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 123
"lineNumber": 105
},
"signature": [
"() => Set<",
Expand Down Expand Up @@ -994,15 +994,15 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 124
"lineNumber": 106
}
}
],
"tags": [],
"returnComment": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 124
"lineNumber": 106
}
},
{
Expand All @@ -1013,7 +1013,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 125
"lineNumber": 107
},
"signature": [
"() => Promise<",
Expand All @@ -1030,7 +1030,7 @@
],
"source": {
"path": "x-pack/plugins/alerting/server/plugin.ts",
"lineNumber": 122
"lineNumber": 104
},
"initialIsOpen": false
}
Expand Down Expand Up @@ -1118,15 +1118,15 @@
},
"<Params>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"muteAll\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"mutedInstanceIds\" | \"executionStatus\">>; delete: ({ id }: { id: string; }) => Promise<{}>; create: <Params extends Record<string, unknown> = never>({ data, options, }: ",
"CreateOptions",
"<Params>) => Promise<",
"<Params>) => Promise<Pick<",
{
"pluginId": "alerting",
"scope": "common",
"docId": "kibAlertingPluginApi",
"section": "def-common.Alert",
"text": "Alert"
},
"<Params>>; find: <Params>({ options: { fields, ...options }, }?: { options?: ",
"<Params>, \"enabled\" | \"id\" | \"name\" | \"params\" | \"actions\" | \"muteAll\" | \"tags\" | \"alertTypeId\" | \"consumer\" | \"schedule\" | \"scheduledTaskId\" | \"createdBy\" | \"updatedBy\" | \"createdAt\" | \"updatedAt\" | \"apiKeyOwner\" | \"throttle\" | \"notifyWhen\" | \"mutedInstanceIds\" | \"executionStatus\">>; find: <Params>({ options: { fields, ...options }, }?: { options?: ",
"FindOptions",
" | undefined; }) => Promise<",
{
Expand Down Expand Up @@ -2922,7 +2922,7 @@
"description": [],
"source": {
"path": "x-pack/plugins/alerting/common/index.ts",
"lineNumber": 28
"lineNumber": 30
},
"signature": [
"\"alerts\""
Expand Down Expand Up @@ -3006,16 +3006,16 @@
},
{
"tags": [],
"id": "def-common.BASE_ALERT_API_PATH",
"id": "def-common.BASE_ALERTING_API_PATH",
"type": "string",
"label": "BASE_ALERT_API_PATH",
"label": "BASE_ALERTING_API_PATH",
"description": [],
"source": {
"path": "x-pack/plugins/alerting/common/index.ts",
"lineNumber": 27
"lineNumber": 28
},
"signature": [
"\"/api/alerts\""
"\"/api/alerting\""
],
"initialIsOpen": false
},
Expand All @@ -3034,6 +3034,36 @@
],
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.INTERNAL_BASE_ALERTING_API_PATH",
"type": "string",
"label": "INTERNAL_BASE_ALERTING_API_PATH",
"description": [],
"source": {
"path": "x-pack/plugins/alerting/common/index.ts",
"lineNumber": 29
},
"signature": [
"\"/internal/alerting\""
],
"initialIsOpen": false
},
{
"tags": [],
"id": "def-common.LEGACY_BASE_ALERT_API_PATH",
"type": "string",
"label": "LEGACY_BASE_ALERT_API_PATH",
"description": [],
"source": {
"path": "x-pack/plugins/alerting/common/index.ts",
"lineNumber": 27
},
"signature": [
"\"/api/alerts\""
],
"initialIsOpen": false
},
{
"id": "def-common.RawAlertInstance",
"type": "Type",
Expand Down
2 changes: 1 addition & 1 deletion api_docs/apm.json
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@
"text": "APMEventESSearchRequest"
},
">(params: TParams, { includeLegacyData }?: { includeLegacyData?: boolean | undefined; }): Promise<",
"ESSearchResponse",
"InferSearchResponseOf",
"<TypeOfProcessorEvent<",
"ValuesType"
]
Expand Down
Loading

0 comments on commit 52f41d8

Please sign in to comment.