diff --git a/api_docs/actions.mdx b/api_docs/actions.mdx index f9f6f8053f27a..4673c4326e10a 100644 --- a/api_docs/actions.mdx +++ b/api_docs/actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/actions title: "actions" image: https://source.unsplash.com/400x175/?github description: API docs for the actions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'actions'] --- import actionsObj from './actions.devdocs.json'; diff --git a/api_docs/advanced_settings.mdx b/api_docs/advanced_settings.mdx index 125e22e18cde9..7d97981deb4a8 100644 --- a/api_docs/advanced_settings.mdx +++ b/api_docs/advanced_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/advancedSettings title: "advancedSettings" image: https://source.unsplash.com/400x175/?github description: API docs for the advancedSettings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'advancedSettings'] --- import advancedSettingsObj from './advanced_settings.devdocs.json'; diff --git a/api_docs/ai_assistant_management_selection.mdx b/api_docs/ai_assistant_management_selection.mdx index 7f65254e90dca..46dc8cf4c8304 100644 --- a/api_docs/ai_assistant_management_selection.mdx +++ b/api_docs/ai_assistant_management_selection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiAssistantManagementSelection title: "aiAssistantManagementSelection" image: https://source.unsplash.com/400x175/?github description: API docs for the aiAssistantManagementSelection plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiAssistantManagementSelection'] --- import aiAssistantManagementSelectionObj from './ai_assistant_management_selection.devdocs.json'; diff --git a/api_docs/aiops.mdx b/api_docs/aiops.mdx index 12bf9d768cd4e..1243f0417a7b8 100644 --- a/api_docs/aiops.mdx +++ b/api_docs/aiops.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/aiops title: "aiops" image: https://source.unsplash.com/400x175/?github description: API docs for the aiops plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'aiops'] --- import aiopsObj from './aiops.devdocs.json'; diff --git a/api_docs/alerting.mdx b/api_docs/alerting.mdx index 0e5bc21bff8ed..d470045dba9d7 100644 --- a/api_docs/alerting.mdx +++ b/api_docs/alerting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/alerting title: "alerting" image: https://source.unsplash.com/400x175/?github description: API docs for the alerting plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'alerting'] --- import alertingObj from './alerting.devdocs.json'; diff --git a/api_docs/apm.mdx b/api_docs/apm.mdx index 415ba28bafeb6..ba245493d106a 100644 --- a/api_docs/apm.mdx +++ b/api_docs/apm.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apm title: "apm" image: https://source.unsplash.com/400x175/?github description: API docs for the apm plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apm'] --- import apmObj from './apm.devdocs.json'; diff --git a/api_docs/apm_data_access.mdx b/api_docs/apm_data_access.mdx index 991ce6f84e645..5d46b334c4485 100644 --- a/api_docs/apm_data_access.mdx +++ b/api_docs/apm_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/apmDataAccess title: "apmDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the apmDataAccess plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'apmDataAccess'] --- import apmDataAccessObj from './apm_data_access.devdocs.json'; diff --git a/api_docs/assets_data_access.mdx b/api_docs/assets_data_access.mdx index a0e6256c8d8b7..404c68b3fa990 100644 --- a/api_docs/assets_data_access.mdx +++ b/api_docs/assets_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/assetsDataAccess title: "assetsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the assetsDataAccess plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'assetsDataAccess'] --- import assetsDataAccessObj from './assets_data_access.devdocs.json'; diff --git a/api_docs/banners.mdx b/api_docs/banners.mdx index f3ab70815f725..6e0a4c5762b01 100644 --- a/api_docs/banners.mdx +++ b/api_docs/banners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/banners title: "banners" image: https://source.unsplash.com/400x175/?github description: API docs for the banners plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'banners'] --- import bannersObj from './banners.devdocs.json'; diff --git a/api_docs/bfetch.mdx b/api_docs/bfetch.mdx index 968f15067118c..7b736d92c7d06 100644 --- a/api_docs/bfetch.mdx +++ b/api_docs/bfetch.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/bfetch title: "bfetch" image: https://source.unsplash.com/400x175/?github description: API docs for the bfetch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'bfetch'] --- import bfetchObj from './bfetch.devdocs.json'; diff --git a/api_docs/canvas.mdx b/api_docs/canvas.mdx index 980d9fb017d26..05f51d8433d33 100644 --- a/api_docs/canvas.mdx +++ b/api_docs/canvas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/canvas title: "canvas" image: https://source.unsplash.com/400x175/?github description: API docs for the canvas plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'canvas'] --- import canvasObj from './canvas.devdocs.json'; diff --git a/api_docs/cases.mdx b/api_docs/cases.mdx index 2fd673d90e831..ece2eaad47219 100644 --- a/api_docs/cases.mdx +++ b/api_docs/cases.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cases title: "cases" image: https://source.unsplash.com/400x175/?github description: API docs for the cases plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cases'] --- import casesObj from './cases.devdocs.json'; diff --git a/api_docs/charts.mdx b/api_docs/charts.mdx index 27e58be4d7e29..4066d1ae659c0 100644 --- a/api_docs/charts.mdx +++ b/api_docs/charts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/charts title: "charts" image: https://source.unsplash.com/400x175/?github description: API docs for the charts plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'charts'] --- import chartsObj from './charts.devdocs.json'; diff --git a/api_docs/cloud.mdx b/api_docs/cloud.mdx index 99770f39d446e..18e762c07be0b 100644 --- a/api_docs/cloud.mdx +++ b/api_docs/cloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloud title: "cloud" image: https://source.unsplash.com/400x175/?github description: API docs for the cloud plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloud'] --- import cloudObj from './cloud.devdocs.json'; diff --git a/api_docs/cloud_data_migration.mdx b/api_docs/cloud_data_migration.mdx index 3db0046145d01..e780f6d281789 100644 --- a/api_docs/cloud_data_migration.mdx +++ b/api_docs/cloud_data_migration.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDataMigration title: "cloudDataMigration" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDataMigration plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDataMigration'] --- import cloudDataMigrationObj from './cloud_data_migration.devdocs.json'; diff --git a/api_docs/cloud_defend.mdx b/api_docs/cloud_defend.mdx index c36d36c08fbdb..7c7b3675a8005 100644 --- a/api_docs/cloud_defend.mdx +++ b/api_docs/cloud_defend.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudDefend title: "cloudDefend" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudDefend plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudDefend'] --- import cloudDefendObj from './cloud_defend.devdocs.json'; diff --git a/api_docs/cloud_experiments.mdx b/api_docs/cloud_experiments.mdx index 4bf4b913c9e8a..24a9a8faac300 100644 --- a/api_docs/cloud_experiments.mdx +++ b/api_docs/cloud_experiments.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudExperiments title: "cloudExperiments" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudExperiments plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudExperiments'] --- import cloudExperimentsObj from './cloud_experiments.devdocs.json'; diff --git a/api_docs/cloud_security_posture.mdx b/api_docs/cloud_security_posture.mdx index 7f2f5afd7dd73..75762b7bd7ec0 100644 --- a/api_docs/cloud_security_posture.mdx +++ b/api_docs/cloud_security_posture.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/cloudSecurityPosture title: "cloudSecurityPosture" image: https://source.unsplash.com/400x175/?github description: API docs for the cloudSecurityPosture plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'cloudSecurityPosture'] --- import cloudSecurityPostureObj from './cloud_security_posture.devdocs.json'; diff --git a/api_docs/console.mdx b/api_docs/console.mdx index 288753ed26d41..df600df404f54 100644 --- a/api_docs/console.mdx +++ b/api_docs/console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/console title: "console" image: https://source.unsplash.com/400x175/?github description: API docs for the console plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'console'] --- import consoleObj from './console.devdocs.json'; diff --git a/api_docs/content_management.mdx b/api_docs/content_management.mdx index 4cd755b6511a5..efa9439976552 100644 --- a/api_docs/content_management.mdx +++ b/api_docs/content_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/contentManagement title: "contentManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the contentManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'contentManagement'] --- import contentManagementObj from './content_management.devdocs.json'; diff --git a/api_docs/controls.mdx b/api_docs/controls.mdx index d19823f155238..19e64620bcc96 100644 --- a/api_docs/controls.mdx +++ b/api_docs/controls.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/controls title: "controls" image: https://source.unsplash.com/400x175/?github description: API docs for the controls plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'controls'] --- import controlsObj from './controls.devdocs.json'; diff --git a/api_docs/custom_integrations.mdx b/api_docs/custom_integrations.mdx index efc1d7008d8e7..d7e132068f8fd 100644 --- a/api_docs/custom_integrations.mdx +++ b/api_docs/custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/customIntegrations title: "customIntegrations" image: https://source.unsplash.com/400x175/?github description: API docs for the customIntegrations plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'customIntegrations'] --- import customIntegrationsObj from './custom_integrations.devdocs.json'; diff --git a/api_docs/dashboard.mdx b/api_docs/dashboard.mdx index 29ee050173470..c0e53b620e766 100644 --- a/api_docs/dashboard.mdx +++ b/api_docs/dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboard title: "dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboard plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboard'] --- import dashboardObj from './dashboard.devdocs.json'; diff --git a/api_docs/dashboard_enhanced.mdx b/api_docs/dashboard_enhanced.mdx index 4515e8e12a01a..82262fdabb461 100644 --- a/api_docs/dashboard_enhanced.mdx +++ b/api_docs/dashboard_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dashboardEnhanced title: "dashboardEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the dashboardEnhanced plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dashboardEnhanced'] --- import dashboardEnhancedObj from './dashboard_enhanced.devdocs.json'; diff --git a/api_docs/data.mdx b/api_docs/data.mdx index 29425a30fa00b..2382cc5caaf0f 100644 --- a/api_docs/data.mdx +++ b/api_docs/data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data title: "data" image: https://source.unsplash.com/400x175/?github description: API docs for the data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data'] --- import dataObj from './data.devdocs.json'; diff --git a/api_docs/data_quality.mdx b/api_docs/data_quality.mdx index 5b190cb67de7a..759a63f3c730e 100644 --- a/api_docs/data_quality.mdx +++ b/api_docs/data_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataQuality title: "dataQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the dataQuality plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataQuality'] --- import dataQualityObj from './data_quality.devdocs.json'; diff --git a/api_docs/data_query.mdx b/api_docs/data_query.mdx index 99b59e02d4857..0bdba1a7173d3 100644 --- a/api_docs/data_query.mdx +++ b/api_docs/data_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-query title: "data.query" image: https://source.unsplash.com/400x175/?github description: API docs for the data.query plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.query'] --- import dataQueryObj from './data_query.devdocs.json'; diff --git a/api_docs/data_search.mdx b/api_docs/data_search.mdx index b4e1b2b4d2588..41085ad08472c 100644 --- a/api_docs/data_search.mdx +++ b/api_docs/data_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/data-search title: "data.search" image: https://source.unsplash.com/400x175/?github description: API docs for the data.search plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'data.search'] --- import dataSearchObj from './data_search.devdocs.json'; diff --git a/api_docs/data_view_editor.mdx b/api_docs/data_view_editor.mdx index 66a1b6d2ee581..f4886ab64ea8b 100644 --- a/api_docs/data_view_editor.mdx +++ b/api_docs/data_view_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewEditor title: "dataViewEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewEditor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewEditor'] --- import dataViewEditorObj from './data_view_editor.devdocs.json'; diff --git a/api_docs/data_view_field_editor.mdx b/api_docs/data_view_field_editor.mdx index 0f2ef6fffde3f..01919889e3538 100644 --- a/api_docs/data_view_field_editor.mdx +++ b/api_docs/data_view_field_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewFieldEditor title: "dataViewFieldEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewFieldEditor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewFieldEditor'] --- import dataViewFieldEditorObj from './data_view_field_editor.devdocs.json'; diff --git a/api_docs/data_view_management.mdx b/api_docs/data_view_management.mdx index a46b14e6355fa..4f4d88620ad81 100644 --- a/api_docs/data_view_management.mdx +++ b/api_docs/data_view_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViewManagement title: "dataViewManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViewManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViewManagement'] --- import dataViewManagementObj from './data_view_management.devdocs.json'; diff --git a/api_docs/data_views.mdx b/api_docs/data_views.mdx index acdc22352adc2..3dc5e73c02863 100644 --- a/api_docs/data_views.mdx +++ b/api_docs/data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataViews title: "dataViews" image: https://source.unsplash.com/400x175/?github description: API docs for the dataViews plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataViews'] --- import dataViewsObj from './data_views.devdocs.json'; diff --git a/api_docs/data_visualizer.mdx b/api_docs/data_visualizer.mdx index 166787c47a58f..d5285fdc76b50 100644 --- a/api_docs/data_visualizer.mdx +++ b/api_docs/data_visualizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/dataVisualizer title: "dataVisualizer" image: https://source.unsplash.com/400x175/?github description: API docs for the dataVisualizer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'dataVisualizer'] --- import dataVisualizerObj from './data_visualizer.devdocs.json'; diff --git a/api_docs/dataset_quality.mdx b/api_docs/dataset_quality.mdx index a1921090be7a5..7aa1a0a563b12 100644 --- a/api_docs/dataset_quality.mdx +++ b/api_docs/dataset_quality.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/datasetQuality title: "datasetQuality" image: https://source.unsplash.com/400x175/?github description: API docs for the datasetQuality plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'datasetQuality'] --- import datasetQualityObj from './dataset_quality.devdocs.json'; diff --git a/api_docs/deprecations_by_api.mdx b/api_docs/deprecations_by_api.mdx index 4e99aa8e77cdc..254238c3afb37 100644 --- a/api_docs/deprecations_by_api.mdx +++ b/api_docs/deprecations_by_api.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByApi slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-api title: Deprecated API usage by API description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -68,7 +68,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | securitySolution | - | | | @kbn/monaco, securitySolution | - | | | fleet, cloudSecurityPosture, exploratoryView, osquery, synthetics | - | -| | alerting, observabilityAIAssistant, fleet, cloudSecurityPosture, enterpriseSearch, serverlessSearch, transform, upgradeAssistant, apm, entityManager, observabilityOnboarding, synthetics, security | - | +| | alerting, observabilityAIAssistant, fleet, cloudSecurityPosture, enterpriseSearch, serverlessSearch, transform, upgradeAssistant, apm, entityManager, synthetics, security | - | | | spaces, navigation, cloudChat | - | | | @kbn/core-saved-objects-browser-internal, @kbn/core, spaces, savedSearch, visualizations, lens, cases, maps, canvas, graph | - | | | spaces, savedObjectsManagement | - | diff --git a/api_docs/deprecations_by_plugin.mdx b/api_docs/deprecations_by_plugin.mdx index d8adf816f21da..a356857d36bf9 100644 --- a/api_docs/deprecations_by_plugin.mdx +++ b/api_docs/deprecations_by_plugin.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsByPlugin slug: /kibana-dev-docs/api-meta/deprecated-api-list-by-plugin title: Deprecated API usage by plugin description: A list of deprecated APIs, which plugins are still referencing them, and when they need to be removed by. -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -1148,7 +1148,6 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | Deprecated API | Reference location(s) | Remove By | | ---------------|-----------|-----------| | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts#:~:text=CloudExperimentsPluginStart), [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts#:~:text=CloudExperimentsPluginStart) | - | -| | [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts#:~:text=authc), [route.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts#:~:text=authc) | - | | | [plugin.ts](https://github.com/elastic/kibana/tree/main/x-pack/plugins/observability_solution/observability_onboarding/server/plugin.ts#:~:text=legacy) | - | diff --git a/api_docs/deprecations_by_team.mdx b/api_docs/deprecations_by_team.mdx index f095c84634f47..d9069ead980de 100644 --- a/api_docs/deprecations_by_team.mdx +++ b/api_docs/deprecations_by_team.mdx @@ -7,7 +7,7 @@ id: kibDevDocsDeprecationsDueByTeam slug: /kibana-dev-docs/api-meta/deprecations-due-by-team title: Deprecated APIs due to be removed, by team description: Lists the teams that are referencing deprecated APIs with a remove by date. -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- diff --git a/api_docs/dev_tools.mdx b/api_docs/dev_tools.mdx index fa026a29908a5..4e34ac7486ff2 100644 --- a/api_docs/dev_tools.mdx +++ b/api_docs/dev_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/devTools title: "devTools" image: https://source.unsplash.com/400x175/?github description: API docs for the devTools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'devTools'] --- import devToolsObj from './dev_tools.devdocs.json'; diff --git a/api_docs/discover.mdx b/api_docs/discover.mdx index 2f5a53ec57b1c..7b2c6335ef8b9 100644 --- a/api_docs/discover.mdx +++ b/api_docs/discover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discover title: "discover" image: https://source.unsplash.com/400x175/?github description: API docs for the discover plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discover'] --- import discoverObj from './discover.devdocs.json'; diff --git a/api_docs/discover_enhanced.mdx b/api_docs/discover_enhanced.mdx index 927b5a99af4c1..a32e2d03d4ec0 100644 --- a/api_docs/discover_enhanced.mdx +++ b/api_docs/discover_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverEnhanced title: "discoverEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverEnhanced plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverEnhanced'] --- import discoverEnhancedObj from './discover_enhanced.devdocs.json'; diff --git a/api_docs/discover_shared.mdx b/api_docs/discover_shared.mdx index 81bc4cacdda23..5d72870a1145c 100644 --- a/api_docs/discover_shared.mdx +++ b/api_docs/discover_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/discoverShared title: "discoverShared" image: https://source.unsplash.com/400x175/?github description: API docs for the discoverShared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'discoverShared'] --- import discoverSharedObj from './discover_shared.devdocs.json'; diff --git a/api_docs/ecs_data_quality_dashboard.mdx b/api_docs/ecs_data_quality_dashboard.mdx index 208831b2c437d..d386ecccede55 100644 --- a/api_docs/ecs_data_quality_dashboard.mdx +++ b/api_docs/ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ecsDataQualityDashboard title: "ecsDataQualityDashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the ecsDataQualityDashboard plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ecsDataQualityDashboard'] --- import ecsDataQualityDashboardObj from './ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/elastic_assistant.mdx b/api_docs/elastic_assistant.mdx index 231ef97db2c75..cdf8dfe9d6598 100644 --- a/api_docs/elastic_assistant.mdx +++ b/api_docs/elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/elasticAssistant title: "elasticAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the elasticAssistant plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'elasticAssistant'] --- import elasticAssistantObj from './elastic_assistant.devdocs.json'; diff --git a/api_docs/embeddable.mdx b/api_docs/embeddable.mdx index 5c17a021fed4f..006156ba9076e 100644 --- a/api_docs/embeddable.mdx +++ b/api_docs/embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddable title: "embeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddable plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddable'] --- import embeddableObj from './embeddable.devdocs.json'; diff --git a/api_docs/embeddable_enhanced.mdx b/api_docs/embeddable_enhanced.mdx index 21ef9064f44dc..69ce9c1f0f6ea 100644 --- a/api_docs/embeddable_enhanced.mdx +++ b/api_docs/embeddable_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/embeddableEnhanced title: "embeddableEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the embeddableEnhanced plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'embeddableEnhanced'] --- import embeddableEnhancedObj from './embeddable_enhanced.devdocs.json'; diff --git a/api_docs/encrypted_saved_objects.mdx b/api_docs/encrypted_saved_objects.mdx index 9be42a4f17aa6..f32d9baf0a9c8 100644 --- a/api_docs/encrypted_saved_objects.mdx +++ b/api_docs/encrypted_saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/encryptedSavedObjects title: "encryptedSavedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the encryptedSavedObjects plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'encryptedSavedObjects'] --- import encryptedSavedObjectsObj from './encrypted_saved_objects.devdocs.json'; diff --git a/api_docs/enterprise_search.mdx b/api_docs/enterprise_search.mdx index 681fbc0b54e22..1025d301965da 100644 --- a/api_docs/enterprise_search.mdx +++ b/api_docs/enterprise_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/enterpriseSearch title: "enterpriseSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the enterpriseSearch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'enterpriseSearch'] --- import enterpriseSearchObj from './enterprise_search.devdocs.json'; diff --git a/api_docs/entity_manager.mdx b/api_docs/entity_manager.mdx index 1ec7efb0d2995..71f30d30d171b 100644 --- a/api_docs/entity_manager.mdx +++ b/api_docs/entity_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/entityManager title: "entityManager" image: https://source.unsplash.com/400x175/?github description: API docs for the entityManager plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'entityManager'] --- import entityManagerObj from './entity_manager.devdocs.json'; diff --git a/api_docs/es_ui_shared.mdx b/api_docs/es_ui_shared.mdx index dbfe2f97c790b..66ba96d6935d9 100644 --- a/api_docs/es_ui_shared.mdx +++ b/api_docs/es_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esUiShared title: "esUiShared" image: https://source.unsplash.com/400x175/?github description: API docs for the esUiShared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esUiShared'] --- import esUiSharedObj from './es_ui_shared.devdocs.json'; diff --git a/api_docs/esql.mdx b/api_docs/esql.mdx index f3c8708fb939b..83c548844df5d 100644 --- a/api_docs/esql.mdx +++ b/api_docs/esql.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esql title: "esql" image: https://source.unsplash.com/400x175/?github description: API docs for the esql plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esql'] --- import esqlObj from './esql.devdocs.json'; diff --git a/api_docs/esql_data_grid.mdx b/api_docs/esql_data_grid.mdx index 4017b8012b718..9996c45f378c7 100644 --- a/api_docs/esql_data_grid.mdx +++ b/api_docs/esql_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/esqlDataGrid title: "esqlDataGrid" image: https://source.unsplash.com/400x175/?github description: API docs for the esqlDataGrid plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'esqlDataGrid'] --- import esqlDataGridObj from './esql_data_grid.devdocs.json'; diff --git a/api_docs/event_annotation.mdx b/api_docs/event_annotation.mdx index 581ff697067e8..cce25a515112d 100644 --- a/api_docs/event_annotation.mdx +++ b/api_docs/event_annotation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotation title: "eventAnnotation" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotation plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotation'] --- import eventAnnotationObj from './event_annotation.devdocs.json'; diff --git a/api_docs/event_annotation_listing.mdx b/api_docs/event_annotation_listing.mdx index 81ade58037ba8..0cb37b54402cf 100644 --- a/api_docs/event_annotation_listing.mdx +++ b/api_docs/event_annotation_listing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventAnnotationListing title: "eventAnnotationListing" image: https://source.unsplash.com/400x175/?github description: API docs for the eventAnnotationListing plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventAnnotationListing'] --- import eventAnnotationListingObj from './event_annotation_listing.devdocs.json'; diff --git a/api_docs/event_log.mdx b/api_docs/event_log.mdx index 3f1a43d99d0b9..eab5ff2bd0eff 100644 --- a/api_docs/event_log.mdx +++ b/api_docs/event_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/eventLog title: "eventLog" image: https://source.unsplash.com/400x175/?github description: API docs for the eventLog plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'eventLog'] --- import eventLogObj from './event_log.devdocs.json'; diff --git a/api_docs/exploratory_view.mdx b/api_docs/exploratory_view.mdx index ce8b8148533dd..519e9c0c2e269 100644 --- a/api_docs/exploratory_view.mdx +++ b/api_docs/exploratory_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/exploratoryView title: "exploratoryView" image: https://source.unsplash.com/400x175/?github description: API docs for the exploratoryView plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'exploratoryView'] --- import exploratoryViewObj from './exploratory_view.devdocs.json'; diff --git a/api_docs/expression_error.mdx b/api_docs/expression_error.mdx index 0971c57316b4b..982745ba2ae08 100644 --- a/api_docs/expression_error.mdx +++ b/api_docs/expression_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionError title: "expressionError" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionError plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionError'] --- import expressionErrorObj from './expression_error.devdocs.json'; diff --git a/api_docs/expression_gauge.mdx b/api_docs/expression_gauge.mdx index d44a7ee5fad5f..3d5ec7a07bc6a 100644 --- a/api_docs/expression_gauge.mdx +++ b/api_docs/expression_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionGauge title: "expressionGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionGauge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionGauge'] --- import expressionGaugeObj from './expression_gauge.devdocs.json'; diff --git a/api_docs/expression_heatmap.mdx b/api_docs/expression_heatmap.mdx index 6d81cb17422ca..af30fcec71591 100644 --- a/api_docs/expression_heatmap.mdx +++ b/api_docs/expression_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionHeatmap title: "expressionHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionHeatmap plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionHeatmap'] --- import expressionHeatmapObj from './expression_heatmap.devdocs.json'; diff --git a/api_docs/expression_image.mdx b/api_docs/expression_image.mdx index c9460498ceb47..330b39092365b 100644 --- a/api_docs/expression_image.mdx +++ b/api_docs/expression_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionImage title: "expressionImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionImage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionImage'] --- import expressionImageObj from './expression_image.devdocs.json'; diff --git a/api_docs/expression_legacy_metric_vis.mdx b/api_docs/expression_legacy_metric_vis.mdx index 71aebfdc9d30c..d118612fe2a20 100644 --- a/api_docs/expression_legacy_metric_vis.mdx +++ b/api_docs/expression_legacy_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionLegacyMetricVis title: "expressionLegacyMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionLegacyMetricVis plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionLegacyMetricVis'] --- import expressionLegacyMetricVisObj from './expression_legacy_metric_vis.devdocs.json'; diff --git a/api_docs/expression_metric.mdx b/api_docs/expression_metric.mdx index a36ca13f9886a..b226ec02edb21 100644 --- a/api_docs/expression_metric.mdx +++ b/api_docs/expression_metric.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetric title: "expressionMetric" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetric plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetric'] --- import expressionMetricObj from './expression_metric.devdocs.json'; diff --git a/api_docs/expression_metric_vis.mdx b/api_docs/expression_metric_vis.mdx index 63e29e1cc67fd..bc9f7fd265b14 100644 --- a/api_docs/expression_metric_vis.mdx +++ b/api_docs/expression_metric_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionMetricVis title: "expressionMetricVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionMetricVis plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionMetricVis'] --- import expressionMetricVisObj from './expression_metric_vis.devdocs.json'; diff --git a/api_docs/expression_partition_vis.mdx b/api_docs/expression_partition_vis.mdx index 2e8e55fed1881..1339fdceacdd5 100644 --- a/api_docs/expression_partition_vis.mdx +++ b/api_docs/expression_partition_vis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionPartitionVis title: "expressionPartitionVis" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionPartitionVis plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionPartitionVis'] --- import expressionPartitionVisObj from './expression_partition_vis.devdocs.json'; diff --git a/api_docs/expression_repeat_image.mdx b/api_docs/expression_repeat_image.mdx index 54390ab63b223..ec3b35dd8382e 100644 --- a/api_docs/expression_repeat_image.mdx +++ b/api_docs/expression_repeat_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRepeatImage title: "expressionRepeatImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRepeatImage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRepeatImage'] --- import expressionRepeatImageObj from './expression_repeat_image.devdocs.json'; diff --git a/api_docs/expression_reveal_image.mdx b/api_docs/expression_reveal_image.mdx index 679251f02e207..dd70371ccdf99 100644 --- a/api_docs/expression_reveal_image.mdx +++ b/api_docs/expression_reveal_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionRevealImage title: "expressionRevealImage" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionRevealImage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionRevealImage'] --- import expressionRevealImageObj from './expression_reveal_image.devdocs.json'; diff --git a/api_docs/expression_shape.mdx b/api_docs/expression_shape.mdx index 38ab19ae413d5..d970e9bd2e64b 100644 --- a/api_docs/expression_shape.mdx +++ b/api_docs/expression_shape.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionShape title: "expressionShape" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionShape plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionShape'] --- import expressionShapeObj from './expression_shape.devdocs.json'; diff --git a/api_docs/expression_tagcloud.mdx b/api_docs/expression_tagcloud.mdx index 86931a3ccb354..a31ba242a245b 100644 --- a/api_docs/expression_tagcloud.mdx +++ b/api_docs/expression_tagcloud.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionTagcloud title: "expressionTagcloud" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionTagcloud plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionTagcloud'] --- import expressionTagcloudObj from './expression_tagcloud.devdocs.json'; diff --git a/api_docs/expression_x_y.mdx b/api_docs/expression_x_y.mdx index c22f15668cd51..12be27753ef64 100644 --- a/api_docs/expression_x_y.mdx +++ b/api_docs/expression_x_y.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressionXY title: "expressionXY" image: https://source.unsplash.com/400x175/?github description: API docs for the expressionXY plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressionXY'] --- import expressionXYObj from './expression_x_y.devdocs.json'; diff --git a/api_docs/expressions.mdx b/api_docs/expressions.mdx index ecb6884ac929c..02b1eac5cfffa 100644 --- a/api_docs/expressions.mdx +++ b/api_docs/expressions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/expressions title: "expressions" image: https://source.unsplash.com/400x175/?github description: API docs for the expressions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'expressions'] --- import expressionsObj from './expressions.devdocs.json'; diff --git a/api_docs/features.mdx b/api_docs/features.mdx index f27b224f2d8c3..ba1e7ee0bdcb5 100644 --- a/api_docs/features.mdx +++ b/api_docs/features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/features title: "features" image: https://source.unsplash.com/400x175/?github description: API docs for the features plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'features'] --- import featuresObj from './features.devdocs.json'; diff --git a/api_docs/field_formats.mdx b/api_docs/field_formats.mdx index 758b4097b5306..fb418da077cb5 100644 --- a/api_docs/field_formats.mdx +++ b/api_docs/field_formats.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldFormats title: "fieldFormats" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldFormats plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldFormats'] --- import fieldFormatsObj from './field_formats.devdocs.json'; diff --git a/api_docs/fields_metadata.mdx b/api_docs/fields_metadata.mdx index 3122a379c8b5d..92381696d887d 100644 --- a/api_docs/fields_metadata.mdx +++ b/api_docs/fields_metadata.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fieldsMetadata title: "fieldsMetadata" image: https://source.unsplash.com/400x175/?github description: API docs for the fieldsMetadata plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fieldsMetadata'] --- import fieldsMetadataObj from './fields_metadata.devdocs.json'; diff --git a/api_docs/file_upload.mdx b/api_docs/file_upload.mdx index fb3c2c8e046f4..3c137b0954fae 100644 --- a/api_docs/file_upload.mdx +++ b/api_docs/file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fileUpload title: "fileUpload" image: https://source.unsplash.com/400x175/?github description: API docs for the fileUpload plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fileUpload'] --- import fileUploadObj from './file_upload.devdocs.json'; diff --git a/api_docs/files.mdx b/api_docs/files.mdx index 5dc5362b1665d..9aa9464fd7b55 100644 --- a/api_docs/files.mdx +++ b/api_docs/files.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/files title: "files" image: https://source.unsplash.com/400x175/?github description: API docs for the files plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'files'] --- import filesObj from './files.devdocs.json'; diff --git a/api_docs/files_management.mdx b/api_docs/files_management.mdx index bdbbcc5a56ac2..b357847034c8b 100644 --- a/api_docs/files_management.mdx +++ b/api_docs/files_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/filesManagement title: "filesManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the filesManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'filesManagement'] --- import filesManagementObj from './files_management.devdocs.json'; diff --git a/api_docs/fleet.mdx b/api_docs/fleet.mdx index cc67ace3fde26..7a9eae15d00a4 100644 --- a/api_docs/fleet.mdx +++ b/api_docs/fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/fleet title: "fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the fleet plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'fleet'] --- import fleetObj from './fleet.devdocs.json'; diff --git a/api_docs/global_search.mdx b/api_docs/global_search.mdx index 6fd03482a1dd2..48a860e5c9469 100644 --- a/api_docs/global_search.mdx +++ b/api_docs/global_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/globalSearch title: "globalSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the globalSearch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'globalSearch'] --- import globalSearchObj from './global_search.devdocs.json'; diff --git a/api_docs/guided_onboarding.mdx b/api_docs/guided_onboarding.mdx index 9efc9d8eea0b5..986b5a2a4b621 100644 --- a/api_docs/guided_onboarding.mdx +++ b/api_docs/guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/guidedOnboarding title: "guidedOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the guidedOnboarding plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'guidedOnboarding'] --- import guidedOnboardingObj from './guided_onboarding.devdocs.json'; diff --git a/api_docs/home.mdx b/api_docs/home.mdx index 31878107d0bfa..91b93ede14445 100644 --- a/api_docs/home.mdx +++ b/api_docs/home.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/home title: "home" image: https://source.unsplash.com/400x175/?github description: API docs for the home plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'home'] --- import homeObj from './home.devdocs.json'; diff --git a/api_docs/image_embeddable.mdx b/api_docs/image_embeddable.mdx index c599740eb016f..cb784135c14fd 100644 --- a/api_docs/image_embeddable.mdx +++ b/api_docs/image_embeddable.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/imageEmbeddable title: "imageEmbeddable" image: https://source.unsplash.com/400x175/?github description: API docs for the imageEmbeddable plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'imageEmbeddable'] --- import imageEmbeddableObj from './image_embeddable.devdocs.json'; diff --git a/api_docs/index_lifecycle_management.mdx b/api_docs/index_lifecycle_management.mdx index 4fbffc14611df..5d77ced696775 100644 --- a/api_docs/index_lifecycle_management.mdx +++ b/api_docs/index_lifecycle_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexLifecycleManagement title: "indexLifecycleManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexLifecycleManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexLifecycleManagement'] --- import indexLifecycleManagementObj from './index_lifecycle_management.devdocs.json'; diff --git a/api_docs/index_management.mdx b/api_docs/index_management.mdx index 24b423e414ef1..49f2066d86eb1 100644 --- a/api_docs/index_management.mdx +++ b/api_docs/index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/indexManagement title: "indexManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the indexManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'indexManagement'] --- import indexManagementObj from './index_management.devdocs.json'; diff --git a/api_docs/infra.mdx b/api_docs/infra.mdx index f30a8dcc31bff..dcd7eb400b2d3 100644 --- a/api_docs/infra.mdx +++ b/api_docs/infra.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/infra title: "infra" image: https://source.unsplash.com/400x175/?github description: API docs for the infra plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'infra'] --- import infraObj from './infra.devdocs.json'; diff --git a/api_docs/ingest_pipelines.mdx b/api_docs/ingest_pipelines.mdx index fabb962ccb942..b1de45de1896e 100644 --- a/api_docs/ingest_pipelines.mdx +++ b/api_docs/ingest_pipelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ingestPipelines title: "ingestPipelines" image: https://source.unsplash.com/400x175/?github description: API docs for the ingestPipelines plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ingestPipelines'] --- import ingestPipelinesObj from './ingest_pipelines.devdocs.json'; diff --git a/api_docs/inspector.mdx b/api_docs/inspector.mdx index 682d551b55336..554d69150deaf 100644 --- a/api_docs/inspector.mdx +++ b/api_docs/inspector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/inspector title: "inspector" image: https://source.unsplash.com/400x175/?github description: API docs for the inspector plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'inspector'] --- import inspectorObj from './inspector.devdocs.json'; diff --git a/api_docs/integration_assistant.mdx b/api_docs/integration_assistant.mdx index 167d3394ee4c6..6698d38d4f188 100644 --- a/api_docs/integration_assistant.mdx +++ b/api_docs/integration_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/integrationAssistant title: "integrationAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the integrationAssistant plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'integrationAssistant'] --- import integrationAssistantObj from './integration_assistant.devdocs.json'; diff --git a/api_docs/interactive_setup.mdx b/api_docs/interactive_setup.mdx index a52fb54ca6b68..6f00a4d1f8006 100644 --- a/api_docs/interactive_setup.mdx +++ b/api_docs/interactive_setup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/interactiveSetup title: "interactiveSetup" image: https://source.unsplash.com/400x175/?github description: API docs for the interactiveSetup plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'interactiveSetup'] --- import interactiveSetupObj from './interactive_setup.devdocs.json'; diff --git a/api_docs/investigate.mdx b/api_docs/investigate.mdx index 8c73c72169827..f322e678b5049 100644 --- a/api_docs/investigate.mdx +++ b/api_docs/investigate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigate title: "investigate" image: https://source.unsplash.com/400x175/?github description: API docs for the investigate plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigate'] --- import investigateObj from './investigate.devdocs.json'; diff --git a/api_docs/investigate_app.mdx b/api_docs/investigate_app.mdx index 2585fb04b3f46..2be9577c4431d 100644 --- a/api_docs/investigate_app.mdx +++ b/api_docs/investigate_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/investigateApp title: "investigateApp" image: https://source.unsplash.com/400x175/?github description: API docs for the investigateApp plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'investigateApp'] --- import investigateAppObj from './investigate_app.devdocs.json'; diff --git a/api_docs/kbn_ace.mdx b/api_docs/kbn_ace.mdx index 121690c37f47f..875a1410f8007 100644 --- a/api_docs/kbn_ace.mdx +++ b/api_docs/kbn_ace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ace title: "@kbn/ace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ace plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ace'] --- import kbnAceObj from './kbn_ace.devdocs.json'; diff --git a/api_docs/kbn_actions_types.mdx b/api_docs/kbn_actions_types.mdx index e252d9d69885b..75001dd0bfc0f 100644 --- a/api_docs/kbn_actions_types.mdx +++ b/api_docs/kbn_actions_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-actions-types title: "@kbn/actions-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/actions-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/actions-types'] --- import kbnActionsTypesObj from './kbn_actions_types.devdocs.json'; diff --git a/api_docs/kbn_aiops_components.mdx b/api_docs/kbn_aiops_components.mdx index 3c397798f9322..be7ae48dadec7 100644 --- a/api_docs/kbn_aiops_components.mdx +++ b/api_docs/kbn_aiops_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-components title: "@kbn/aiops-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-components'] --- import kbnAiopsComponentsObj from './kbn_aiops_components.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_pattern_analysis.mdx b/api_docs/kbn_aiops_log_pattern_analysis.mdx index ff2cc18428888..4214beeb13d6d 100644 --- a/api_docs/kbn_aiops_log_pattern_analysis.mdx +++ b/api_docs/kbn_aiops_log_pattern_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-pattern-analysis title: "@kbn/aiops-log-pattern-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-pattern-analysis plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-pattern-analysis'] --- import kbnAiopsLogPatternAnalysisObj from './kbn_aiops_log_pattern_analysis.devdocs.json'; diff --git a/api_docs/kbn_aiops_log_rate_analysis.mdx b/api_docs/kbn_aiops_log_rate_analysis.mdx index afb53e5878408..a2e78f7f3a667 100644 --- a/api_docs/kbn_aiops_log_rate_analysis.mdx +++ b/api_docs/kbn_aiops_log_rate_analysis.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-aiops-log-rate-analysis title: "@kbn/aiops-log-rate-analysis" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/aiops-log-rate-analysis plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/aiops-log-rate-analysis'] --- import kbnAiopsLogRateAnalysisObj from './kbn_aiops_log_rate_analysis.devdocs.json'; diff --git a/api_docs/kbn_alerting_api_integration_helpers.mdx b/api_docs/kbn_alerting_api_integration_helpers.mdx index d1b33fa4aded8..b0431b6106dab 100644 --- a/api_docs/kbn_alerting_api_integration_helpers.mdx +++ b/api_docs/kbn_alerting_api_integration_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-api-integration-helpers title: "@kbn/alerting-api-integration-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-api-integration-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-api-integration-helpers'] --- import kbnAlertingApiIntegrationHelpersObj from './kbn_alerting_api_integration_helpers.devdocs.json'; diff --git a/api_docs/kbn_alerting_comparators.mdx b/api_docs/kbn_alerting_comparators.mdx index dc7302665f847..9eb7c4a8fc904 100644 --- a/api_docs/kbn_alerting_comparators.mdx +++ b/api_docs/kbn_alerting_comparators.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-comparators title: "@kbn/alerting-comparators" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-comparators plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-comparators'] --- import kbnAlertingComparatorsObj from './kbn_alerting_comparators.devdocs.json'; diff --git a/api_docs/kbn_alerting_state_types.mdx b/api_docs/kbn_alerting_state_types.mdx index b3a166274f3d9..9ec4618474291 100644 --- a/api_docs/kbn_alerting_state_types.mdx +++ b/api_docs/kbn_alerting_state_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-state-types title: "@kbn/alerting-state-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-state-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-state-types'] --- import kbnAlertingStateTypesObj from './kbn_alerting_state_types.devdocs.json'; diff --git a/api_docs/kbn_alerting_types.mdx b/api_docs/kbn_alerting_types.mdx index 285b133e2d77c..2af04c72dead6 100644 --- a/api_docs/kbn_alerting_types.mdx +++ b/api_docs/kbn_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerting-types title: "@kbn/alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerting-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerting-types'] --- import kbnAlertingTypesObj from './kbn_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_alerts_as_data_utils.mdx b/api_docs/kbn_alerts_as_data_utils.mdx index 05cb78fa08362..7f6f5a6872583 100644 --- a/api_docs/kbn_alerts_as_data_utils.mdx +++ b/api_docs/kbn_alerts_as_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-as-data-utils title: "@kbn/alerts-as-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-as-data-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-as-data-utils'] --- import kbnAlertsAsDataUtilsObj from './kbn_alerts_as_data_utils.devdocs.json'; diff --git a/api_docs/kbn_alerts_grouping.mdx b/api_docs/kbn_alerts_grouping.mdx index b927c515dce19..1f8d85bb5fd3d 100644 --- a/api_docs/kbn_alerts_grouping.mdx +++ b/api_docs/kbn_alerts_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-grouping title: "@kbn/alerts-grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-grouping plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-grouping'] --- import kbnAlertsGroupingObj from './kbn_alerts_grouping.devdocs.json'; diff --git a/api_docs/kbn_alerts_ui_shared.mdx b/api_docs/kbn_alerts_ui_shared.mdx index 9780b17f63827..4e41640bd9112 100644 --- a/api_docs/kbn_alerts_ui_shared.mdx +++ b/api_docs/kbn_alerts_ui_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-alerts-ui-shared title: "@kbn/alerts-ui-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/alerts-ui-shared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/alerts-ui-shared'] --- import kbnAlertsUiSharedObj from './kbn_alerts_ui_shared.devdocs.json'; diff --git a/api_docs/kbn_analytics.mdx b/api_docs/kbn_analytics.mdx index 99d60ea0d8670..f8434010ccf48 100644 --- a/api_docs/kbn_analytics.mdx +++ b/api_docs/kbn_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics title: "@kbn/analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics'] --- import kbnAnalyticsObj from './kbn_analytics.devdocs.json'; diff --git a/api_docs/kbn_analytics_collection_utils.mdx b/api_docs/kbn_analytics_collection_utils.mdx index a5de950609fdb..f1ab4a419a622 100644 --- a/api_docs/kbn_analytics_collection_utils.mdx +++ b/api_docs/kbn_analytics_collection_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-analytics-collection-utils title: "@kbn/analytics-collection-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/analytics-collection-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/analytics-collection-utils'] --- import kbnAnalyticsCollectionUtilsObj from './kbn_analytics_collection_utils.devdocs.json'; diff --git a/api_docs/kbn_apm_config_loader.mdx b/api_docs/kbn_apm_config_loader.mdx index 55a2429f90dbb..3eda2f4efff3e 100644 --- a/api_docs/kbn_apm_config_loader.mdx +++ b/api_docs/kbn_apm_config_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-config-loader title: "@kbn/apm-config-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-config-loader plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-config-loader'] --- import kbnApmConfigLoaderObj from './kbn_apm_config_loader.devdocs.json'; diff --git a/api_docs/kbn_apm_data_view.mdx b/api_docs/kbn_apm_data_view.mdx index 9643c05c778e2..50459cbc37289 100644 --- a/api_docs/kbn_apm_data_view.mdx +++ b/api_docs/kbn_apm_data_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-data-view title: "@kbn/apm-data-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-data-view plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-data-view'] --- import kbnApmDataViewObj from './kbn_apm_data_view.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace.mdx b/api_docs/kbn_apm_synthtrace.mdx index f5cfa412d0eba..03ad7f700589d 100644 --- a/api_docs/kbn_apm_synthtrace.mdx +++ b/api_docs/kbn_apm_synthtrace.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace title: "@kbn/apm-synthtrace" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace'] --- import kbnApmSynthtraceObj from './kbn_apm_synthtrace.devdocs.json'; diff --git a/api_docs/kbn_apm_synthtrace_client.mdx b/api_docs/kbn_apm_synthtrace_client.mdx index ab47aa0afb5fd..12a255ab3a76b 100644 --- a/api_docs/kbn_apm_synthtrace_client.mdx +++ b/api_docs/kbn_apm_synthtrace_client.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-synthtrace-client title: "@kbn/apm-synthtrace-client" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-synthtrace-client plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-synthtrace-client'] --- import kbnApmSynthtraceClientObj from './kbn_apm_synthtrace_client.devdocs.json'; diff --git a/api_docs/kbn_apm_utils.mdx b/api_docs/kbn_apm_utils.mdx index 59f2fcba62ce4..edc744fe6fdd7 100644 --- a/api_docs/kbn_apm_utils.mdx +++ b/api_docs/kbn_apm_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-apm-utils title: "@kbn/apm-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/apm-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/apm-utils'] --- import kbnApmUtilsObj from './kbn_apm_utils.devdocs.json'; diff --git a/api_docs/kbn_avc_banner.mdx b/api_docs/kbn_avc_banner.mdx index 607ab71474739..8d2071d53695f 100644 --- a/api_docs/kbn_avc_banner.mdx +++ b/api_docs/kbn_avc_banner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-avc-banner title: "@kbn/avc-banner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/avc-banner plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/avc-banner'] --- import kbnAvcBannerObj from './kbn_avc_banner.devdocs.json'; diff --git a/api_docs/kbn_axe_config.mdx b/api_docs/kbn_axe_config.mdx index bae79199fc9ac..429bbe9006178 100644 --- a/api_docs/kbn_axe_config.mdx +++ b/api_docs/kbn_axe_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-axe-config title: "@kbn/axe-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/axe-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/axe-config'] --- import kbnAxeConfigObj from './kbn_axe_config.devdocs.json'; diff --git a/api_docs/kbn_bfetch_error.mdx b/api_docs/kbn_bfetch_error.mdx index 07ecd018be86c..7aedfb0634050 100644 --- a/api_docs/kbn_bfetch_error.mdx +++ b/api_docs/kbn_bfetch_error.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-bfetch-error title: "@kbn/bfetch-error" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/bfetch-error plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/bfetch-error'] --- import kbnBfetchErrorObj from './kbn_bfetch_error.devdocs.json'; diff --git a/api_docs/kbn_calculate_auto.mdx b/api_docs/kbn_calculate_auto.mdx index 893e11dbfa679..34ec918e0239d 100644 --- a/api_docs/kbn_calculate_auto.mdx +++ b/api_docs/kbn_calculate_auto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-auto title: "@kbn/calculate-auto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-auto plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-auto'] --- import kbnCalculateAutoObj from './kbn_calculate_auto.devdocs.json'; diff --git a/api_docs/kbn_calculate_width_from_char_count.mdx b/api_docs/kbn_calculate_width_from_char_count.mdx index bc7d454b08ca2..382023cd58319 100644 --- a/api_docs/kbn_calculate_width_from_char_count.mdx +++ b/api_docs/kbn_calculate_width_from_char_count.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-calculate-width-from-char-count title: "@kbn/calculate-width-from-char-count" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/calculate-width-from-char-count plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/calculate-width-from-char-count'] --- import kbnCalculateWidthFromCharCountObj from './kbn_calculate_width_from_char_count.devdocs.json'; diff --git a/api_docs/kbn_cases_components.mdx b/api_docs/kbn_cases_components.mdx index 20b4b7f97b262..0d2c30f73981f 100644 --- a/api_docs/kbn_cases_components.mdx +++ b/api_docs/kbn_cases_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cases-components title: "@kbn/cases-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cases-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cases-components'] --- import kbnCasesComponentsObj from './kbn_cases_components.devdocs.json'; diff --git a/api_docs/kbn_cell_actions.mdx b/api_docs/kbn_cell_actions.mdx index bc6f8548382cc..ef43b568d06cd 100644 --- a/api_docs/kbn_cell_actions.mdx +++ b/api_docs/kbn_cell_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cell-actions title: "@kbn/cell-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cell-actions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cell-actions'] --- import kbnCellActionsObj from './kbn_cell_actions.devdocs.json'; diff --git a/api_docs/kbn_chart_expressions_common.mdx b/api_docs/kbn_chart_expressions_common.mdx index 37dd9630e7772..8d714e9cf959c 100644 --- a/api_docs/kbn_chart_expressions_common.mdx +++ b/api_docs/kbn_chart_expressions_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-expressions-common title: "@kbn/chart-expressions-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-expressions-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-expressions-common'] --- import kbnChartExpressionsCommonObj from './kbn_chart_expressions_common.devdocs.json'; diff --git a/api_docs/kbn_chart_icons.mdx b/api_docs/kbn_chart_icons.mdx index c109116aeec1d..538fb0470de79 100644 --- a/api_docs/kbn_chart_icons.mdx +++ b/api_docs/kbn_chart_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-chart-icons title: "@kbn/chart-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/chart-icons plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/chart-icons'] --- import kbnChartIconsObj from './kbn_chart_icons.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_core.mdx b/api_docs/kbn_ci_stats_core.mdx index 934b6e070f3b8..3425182024f09 100644 --- a/api_docs/kbn_ci_stats_core.mdx +++ b/api_docs/kbn_ci_stats_core.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-core title: "@kbn/ci-stats-core" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-core plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-core'] --- import kbnCiStatsCoreObj from './kbn_ci_stats_core.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_performance_metrics.mdx b/api_docs/kbn_ci_stats_performance_metrics.mdx index 9641c7d1f9261..bcf3dcfd9745e 100644 --- a/api_docs/kbn_ci_stats_performance_metrics.mdx +++ b/api_docs/kbn_ci_stats_performance_metrics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-performance-metrics title: "@kbn/ci-stats-performance-metrics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-performance-metrics plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-performance-metrics'] --- import kbnCiStatsPerformanceMetricsObj from './kbn_ci_stats_performance_metrics.devdocs.json'; diff --git a/api_docs/kbn_ci_stats_reporter.mdx b/api_docs/kbn_ci_stats_reporter.mdx index bac6ac98b8672..8fb138d3e21e9 100644 --- a/api_docs/kbn_ci_stats_reporter.mdx +++ b/api_docs/kbn_ci_stats_reporter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ci-stats-reporter title: "@kbn/ci-stats-reporter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ci-stats-reporter plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ci-stats-reporter'] --- import kbnCiStatsReporterObj from './kbn_ci_stats_reporter.devdocs.json'; diff --git a/api_docs/kbn_cli_dev_mode.devdocs.json b/api_docs/kbn_cli_dev_mode.devdocs.json index c37bb3fd626b3..2f1b44dd52f5e 100644 --- a/api_docs/kbn_cli_dev_mode.devdocs.json +++ b/api_docs/kbn_cli_dev_mode.devdocs.json @@ -9,19 +9,11 @@ "objects": [] }, "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { "classes": [], "functions": [ { "parentPluginId": "@kbn/cli-dev-mode", - "id": "def-common.bootstrapDevMode", + "id": "def-server.bootstrapDevMode", "type": "Function", "tags": [], "label": "bootstrapDevMode", @@ -35,7 +27,7 @@ "children": [ { "parentPluginId": "@kbn/cli-dev-mode", - "id": "def-common.bootstrapDevMode.$1", + "id": "def-server.bootstrapDevMode.$1", "type": "Object", "tags": [], "label": "{ configs, cliArgs, applyConfigOverrides }", @@ -57,5 +49,13 @@ "enums": [], "misc": [], "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_cli_dev_mode.mdx b/api_docs/kbn_cli_dev_mode.mdx index 5a25757f68599..8da7b2e174f9d 100644 --- a/api_docs/kbn_cli_dev_mode.mdx +++ b/api_docs/kbn_cli_dev_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cli-dev-mode title: "@kbn/cli-dev-mode" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cli-dev-mode plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cli-dev-mode'] --- import kbnCliDevModeObj from './kbn_cli_dev_mode.devdocs.json'; @@ -23,8 +23,8 @@ Contact [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kiban |-------------------|-----------|------------------------|-----------------| | 2 | 0 | 2 | 0 | -## Common +## Server ### Functions - + diff --git a/api_docs/kbn_code_editor.mdx b/api_docs/kbn_code_editor.mdx index 69fb669ce94de..e60af91339918 100644 --- a/api_docs/kbn_code_editor.mdx +++ b/api_docs/kbn_code_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor title: "@kbn/code-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor'] --- import kbnCodeEditorObj from './kbn_code_editor.devdocs.json'; diff --git a/api_docs/kbn_code_editor_mock.mdx b/api_docs/kbn_code_editor_mock.mdx index fef234fec4025..804ff5407989e 100644 --- a/api_docs/kbn_code_editor_mock.mdx +++ b/api_docs/kbn_code_editor_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-editor-mock title: "@kbn/code-editor-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-editor-mock plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-editor-mock'] --- import kbnCodeEditorMockObj from './kbn_code_editor_mock.devdocs.json'; diff --git a/api_docs/kbn_code_owners.mdx b/api_docs/kbn_code_owners.mdx index 68eb66d3ddc78..448e719003a23 100644 --- a/api_docs/kbn_code_owners.mdx +++ b/api_docs/kbn_code_owners.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-code-owners title: "@kbn/code-owners" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/code-owners plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/code-owners'] --- import kbnCodeOwnersObj from './kbn_code_owners.devdocs.json'; diff --git a/api_docs/kbn_coloring.mdx b/api_docs/kbn_coloring.mdx index 0b6b1fcfc554a..a3a10a69261b2 100644 --- a/api_docs/kbn_coloring.mdx +++ b/api_docs/kbn_coloring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-coloring title: "@kbn/coloring" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/coloring plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/coloring'] --- import kbnColoringObj from './kbn_coloring.devdocs.json'; diff --git a/api_docs/kbn_config.devdocs.json b/api_docs/kbn_config.devdocs.json index 9d3f7d417425c..ed8e98d30c968 100644 --- a/api_docs/kbn_config.devdocs.json +++ b/api_docs/kbn_config.devdocs.json @@ -9,18 +9,10 @@ "objects": [] }, "server": { - "classes": [], - "functions": [], - "interfaces": [], - "enums": [], - "misc": [], - "objects": [] - }, - "common": { "classes": [ { "parentPluginId": "@kbn/config", - "id": "def-common.Env", + "id": "def-server.Env", "type": "Class", "tags": [], "label": "Env", @@ -31,7 +23,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.Env.packageInfo", + "id": "def-server.Env.packageInfo", "type": "Object", "tags": [], "label": "packageInfo", @@ -42,9 +34,9 @@ "{ readonly version: string; readonly branch: string; readonly buildNum: number; readonly buildSha: string; readonly buildShaShort: string; readonly buildDate: Date; readonly buildFlavor: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.BuildFlavor", + "section": "def-server.BuildFlavor", "text": "BuildFlavor" }, "; readonly dist: boolean; }" @@ -55,7 +47,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.Env.mode", + "id": "def-server.Env.mode", "type": "Object", "tags": [], "label": "mode", @@ -76,7 +68,7 @@ "functions": [ { "parentPluginId": "@kbn/config", - "id": "def-common.getConfigFromFiles", + "id": "def-server.getConfigFromFiles", "type": "Function", "tags": [], "label": "getConfigFromFiles", @@ -90,7 +82,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.getConfigFromFiles.$1", + "id": "def-server.getConfigFromFiles.$1", "type": "Object", "tags": [], "label": "configFiles", @@ -109,7 +101,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.hasConfigPathIntersection", + "id": "def-server.hasConfigPathIntersection", "type": "Function", "tags": [], "label": "hasConfigPathIntersection", @@ -123,7 +115,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.hasConfigPathIntersection.$1", + "id": "def-server.hasConfigPathIntersection.$1", "type": "string", "tags": [], "label": "leafPath", @@ -138,7 +130,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.hasConfigPathIntersection.$2", + "id": "def-server.hasConfigPathIntersection.$2", "type": "string", "tags": [], "label": "rootPath", @@ -157,7 +149,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.isConfigPath", + "id": "def-server.isConfigPath", "type": "Function", "tags": [], "label": "isConfigPath", @@ -173,7 +165,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.isConfigPath.$1", + "id": "def-server.isConfigPath.$1", "type": "Unknown", "tags": [], "label": "value", @@ -196,7 +188,7 @@ "interfaces": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ChangedDeprecatedPaths", + "id": "def-server.ChangedDeprecatedPaths", "type": "Interface", "tags": [], "label": "ChangedDeprecatedPaths", @@ -209,7 +201,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ChangedDeprecatedPaths.set", + "id": "def-server.ChangedDeprecatedPaths.set", "type": "Array", "tags": [], "label": "set", @@ -223,7 +215,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ChangedDeprecatedPaths.unset", + "id": "def-server.ChangedDeprecatedPaths.unset", "type": "Array", "tags": [], "label": "unset", @@ -240,7 +232,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationCommand", + "id": "def-server.ConfigDeprecationCommand", "type": "Interface", "tags": [], "label": "ConfigDeprecationCommand", @@ -253,7 +245,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationCommand.set", + "id": "def-server.ConfigDeprecationCommand.set", "type": "Array", "tags": [], "label": "set", @@ -267,7 +259,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationCommand.unset", + "id": "def-server.ConfigDeprecationCommand.unset", "type": "Array", "tags": [], "label": "unset", @@ -284,7 +276,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationContext", + "id": "def-server.ConfigDeprecationContext", "type": "Interface", "tags": [], "label": "ConfigDeprecationContext", @@ -297,7 +289,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationContext.version", + "id": "def-server.ConfigDeprecationContext.version", "type": "string", "tags": [], "label": "version", @@ -310,7 +302,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationContext.branch", + "id": "def-server.ConfigDeprecationContext.branch", "type": "string", "tags": [], "label": "branch", @@ -323,7 +315,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationContext.docLinks", + "id": "def-server.ConfigDeprecationContext.docLinks", "type": "Object", "tags": [], "label": "docLinks", @@ -348,7 +340,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory", + "id": "def-server.ConfigDeprecationFactory", "type": "Interface", "tags": [], "label": "ConfigDeprecationFactory", @@ -361,7 +353,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecate", + "id": "def-server.ConfigDeprecationFactory.deprecate", "type": "Function", "tags": [], "label": "deprecate", @@ -374,9 +366,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -386,7 +378,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecate.$1", + "id": "def-server.ConfigDeprecationFactory.deprecate.$1", "type": "string", "tags": [], "label": "deprecatedKey", @@ -401,7 +393,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecate.$2", + "id": "def-server.ConfigDeprecationFactory.deprecate.$2", "type": "string", "tags": [], "label": "removeBy", @@ -416,7 +408,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecate.$3", + "id": "def-server.ConfigDeprecationFactory.deprecate.$3", "type": "CompoundType", "tags": [], "label": "details", @@ -434,7 +426,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecateFromRoot", + "id": "def-server.ConfigDeprecationFactory.deprecateFromRoot", "type": "Function", "tags": [], "label": "deprecateFromRoot", @@ -447,9 +439,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -459,7 +451,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecateFromRoot.$1", + "id": "def-server.ConfigDeprecationFactory.deprecateFromRoot.$1", "type": "string", "tags": [], "label": "deprecatedKey", @@ -474,7 +466,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecateFromRoot.$2", + "id": "def-server.ConfigDeprecationFactory.deprecateFromRoot.$2", "type": "string", "tags": [], "label": "removeBy", @@ -489,7 +481,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.deprecateFromRoot.$3", + "id": "def-server.ConfigDeprecationFactory.deprecateFromRoot.$3", "type": "CompoundType", "tags": [], "label": "details", @@ -507,7 +499,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.rename", + "id": "def-server.ConfigDeprecationFactory.rename", "type": "Function", "tags": [], "label": "rename", @@ -520,9 +512,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -532,7 +524,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.rename.$1", + "id": "def-server.ConfigDeprecationFactory.rename.$1", "type": "string", "tags": [], "label": "oldKey", @@ -547,7 +539,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.rename.$2", + "id": "def-server.ConfigDeprecationFactory.rename.$2", "type": "string", "tags": [], "label": "newKey", @@ -562,7 +554,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.rename.$3", + "id": "def-server.ConfigDeprecationFactory.rename.$3", "type": "CompoundType", "tags": [], "label": "details", @@ -580,7 +572,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.renameFromRoot", + "id": "def-server.ConfigDeprecationFactory.renameFromRoot", "type": "Function", "tags": [], "label": "renameFromRoot", @@ -593,9 +585,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -605,7 +597,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.renameFromRoot.$1", + "id": "def-server.ConfigDeprecationFactory.renameFromRoot.$1", "type": "string", "tags": [], "label": "oldKey", @@ -620,7 +612,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.renameFromRoot.$2", + "id": "def-server.ConfigDeprecationFactory.renameFromRoot.$2", "type": "string", "tags": [], "label": "newKey", @@ -635,7 +627,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.renameFromRoot.$3", + "id": "def-server.ConfigDeprecationFactory.renameFromRoot.$3", "type": "CompoundType", "tags": [], "label": "details", @@ -653,7 +645,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unused", + "id": "def-server.ConfigDeprecationFactory.unused", "type": "Function", "tags": [], "label": "unused", @@ -666,9 +658,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -678,7 +670,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unused.$1", + "id": "def-server.ConfigDeprecationFactory.unused.$1", "type": "string", "tags": [], "label": "unusedKey", @@ -693,7 +685,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unused.$2", + "id": "def-server.ConfigDeprecationFactory.unused.$2", "type": "CompoundType", "tags": [], "label": "details", @@ -711,7 +703,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unusedFromRoot", + "id": "def-server.ConfigDeprecationFactory.unusedFromRoot", "type": "Function", "tags": [], "label": "unusedFromRoot", @@ -724,9 +716,9 @@ ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" } ], @@ -736,7 +728,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unusedFromRoot.$1", + "id": "def-server.ConfigDeprecationFactory.unusedFromRoot.$1", "type": "string", "tags": [], "label": "unusedKey", @@ -751,7 +743,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationFactory.unusedFromRoot.$2", + "id": "def-server.ConfigDeprecationFactory.unusedFromRoot.$2", "type": "CompoundType", "tags": [], "label": "details", @@ -772,7 +764,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails", + "id": "def-server.DeprecatedConfigDetails", "type": "Interface", "tags": [], "label": "DeprecatedConfigDetails", @@ -785,7 +777,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.configPath", + "id": "def-server.DeprecatedConfigDetails.configPath", "type": "string", "tags": [], "label": "configPath", @@ -798,7 +790,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.title", + "id": "def-server.DeprecatedConfigDetails.title", "type": "string", "tags": [], "label": "title", @@ -814,7 +806,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.message", + "id": "def-server.DeprecatedConfigDetails.message", "type": "string", "tags": [], "label": "message", @@ -827,7 +819,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.level", + "id": "def-server.DeprecatedConfigDetails.level", "type": "CompoundType", "tags": [], "label": "level", @@ -843,7 +835,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.silent", + "id": "def-server.DeprecatedConfigDetails.silent", "type": "CompoundType", "tags": [], "label": "silent", @@ -859,7 +851,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.documentationUrl", + "id": "def-server.DeprecatedConfigDetails.documentationUrl", "type": "string", "tags": [], "label": "documentationUrl", @@ -875,7 +867,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.DeprecatedConfigDetails.correctiveActions", + "id": "def-server.DeprecatedConfigDetails.correctiveActions", "type": "Object", "tags": [], "label": "correctiveActions", @@ -894,7 +886,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.EnvironmentMode", + "id": "def-server.EnvironmentMode", "type": "Interface", "tags": [], "label": "EnvironmentMode", @@ -905,7 +897,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.EnvironmentMode.name", + "id": "def-server.EnvironmentMode.name", "type": "CompoundType", "tags": [], "label": "name", @@ -919,7 +911,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.EnvironmentMode.dev", + "id": "def-server.EnvironmentMode.dev", "type": "boolean", "tags": [], "label": "dev", @@ -930,7 +922,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.EnvironmentMode.prod", + "id": "def-server.EnvironmentMode.prod", "type": "boolean", "tags": [], "label": "prod", @@ -944,7 +936,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo", + "id": "def-server.PackageInfo", "type": "Interface", "tags": [], "label": "PackageInfo", @@ -955,7 +947,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.version", + "id": "def-server.PackageInfo.version", "type": "string", "tags": [], "label": "version", @@ -966,7 +958,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.branch", + "id": "def-server.PackageInfo.branch", "type": "string", "tags": [], "label": "branch", @@ -977,7 +969,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.buildNum", + "id": "def-server.PackageInfo.buildNum", "type": "number", "tags": [], "label": "buildNum", @@ -988,7 +980,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.buildSha", + "id": "def-server.PackageInfo.buildSha", "type": "string", "tags": [], "label": "buildSha", @@ -999,7 +991,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.buildShaShort", + "id": "def-server.PackageInfo.buildShaShort", "type": "string", "tags": [], "label": "buildShaShort", @@ -1010,7 +1002,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.buildDate", + "id": "def-server.PackageInfo.buildDate", "type": "Object", "tags": [], "label": "buildDate", @@ -1024,7 +1016,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.buildFlavor", + "id": "def-server.PackageInfo.buildFlavor", "type": "CompoundType", "tags": [], "label": "buildFlavor", @@ -1038,7 +1030,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.PackageInfo.dist", + "id": "def-server.PackageInfo.dist", "type": "boolean", "tags": [], "label": "dist", @@ -1055,7 +1047,7 @@ "misc": [ { "parentPluginId": "@kbn/config", - "id": "def-common.AddConfigDeprecation", + "id": "def-server.AddConfigDeprecation", "type": "Type", "tags": [], "label": "AddConfigDeprecation", @@ -1066,9 +1058,9 @@ "(details: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.DeprecatedConfigDetails", + "section": "def-server.DeprecatedConfigDetails", "text": "DeprecatedConfigDetails" }, ") => void" @@ -1080,7 +1072,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.AddConfigDeprecation.$1", + "id": "def-server.AddConfigDeprecation.$1", "type": "Object", "tags": [], "label": "details", @@ -1088,9 +1080,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.DeprecatedConfigDetails", + "section": "def-server.DeprecatedConfigDetails", "text": "DeprecatedConfigDetails" } ], @@ -1103,7 +1095,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.BuildFlavor", + "id": "def-server.BuildFlavor", "type": "Type", "tags": [], "label": "BuildFlavor", @@ -1118,7 +1110,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation", + "id": "def-server.ConfigDeprecation", "type": "Type", "tags": [], "label": "ConfigDeprecation", @@ -1129,25 +1121,25 @@ "(config: Readonly<{ [x: string]: any; }>, fromPath: string, addDeprecation: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.AddConfigDeprecation", + "section": "def-server.AddConfigDeprecation", "text": "AddConfigDeprecation" }, ", context: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationContext", + "section": "def-server.ConfigDeprecationContext", "text": "ConfigDeprecationContext" }, ") => void | ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationCommand", + "section": "def-server.ConfigDeprecationCommand", "text": "ConfigDeprecationCommand" } ], @@ -1158,7 +1150,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation.$1", + "id": "def-server.ConfigDeprecation.$1", "type": "Object", "tags": [], "label": "config", @@ -1174,7 +1166,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation.$2", + "id": "def-server.ConfigDeprecation.$2", "type": "string", "tags": [], "label": "fromPath", @@ -1185,7 +1177,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation.$3", + "id": "def-server.ConfigDeprecation.$3", "type": "Function", "tags": [], "label": "addDeprecation", @@ -1194,9 +1186,9 @@ "(details: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.DeprecatedConfigDetails", + "section": "def-server.DeprecatedConfigDetails", "text": "DeprecatedConfigDetails" }, ") => void" @@ -1208,7 +1200,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation.$3.$1", + "id": "def-server.ConfigDeprecation.$3.$1", "type": "Object", "tags": [], "label": "details", @@ -1216,9 +1208,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.DeprecatedConfigDetails", + "section": "def-server.DeprecatedConfigDetails", "text": "DeprecatedConfigDetails" } ], @@ -1230,7 +1222,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecation.$4", + "id": "def-server.ConfigDeprecation.$4", "type": "Object", "tags": [], "label": "context", @@ -1238,9 +1230,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationContext", + "section": "def-server.ConfigDeprecationContext", "text": "ConfigDeprecationContext" } ], @@ -1253,7 +1245,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationProvider", + "id": "def-server.ConfigDeprecationProvider", "type": "Type", "tags": [], "label": "ConfigDeprecationProvider", @@ -1264,17 +1256,17 @@ "(factory: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" }, ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" }, "[]" @@ -1286,7 +1278,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigDeprecationProvider.$1", + "id": "def-server.ConfigDeprecationProvider.$1", "type": "Object", "tags": [], "label": "factory", @@ -1294,9 +1286,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" } ], @@ -1309,7 +1301,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.ConfigPath", + "id": "def-server.ConfigPath", "type": "Type", "tags": [], "label": "ConfigPath", @@ -1324,7 +1316,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.RawConfigAdapter", + "id": "def-server.RawConfigAdapter", "type": "Type", "tags": [], "label": "RawConfigAdapter", @@ -1339,7 +1331,7 @@ "children": [ { "parentPluginId": "@kbn/config", - "id": "def-common.RawConfigAdapter.$1", + "id": "def-server.RawConfigAdapter.$1", "type": "Object", "tags": [], "label": "rawConfig", @@ -1356,7 +1348,7 @@ }, { "parentPluginId": "@kbn/config", - "id": "def-common.RawConfigurationProvider", + "id": "def-server.RawConfigurationProvider", "type": "Type", "tags": [], "label": "RawConfigurationProvider", @@ -1373,5 +1365,13 @@ } ], "objects": [] + }, + "common": { + "classes": [], + "functions": [], + "interfaces": [], + "enums": [], + "misc": [], + "objects": [] } } \ No newline at end of file diff --git a/api_docs/kbn_config.mdx b/api_docs/kbn_config.mdx index a5ba1e2242bf7..36fcaa786f888 100644 --- a/api_docs/kbn_config.mdx +++ b/api_docs/kbn_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config title: "@kbn/config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config'] --- import kbnConfigObj from './kbn_config.devdocs.json'; @@ -23,17 +23,17 @@ Contact [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core |-------------------|-----------|------------------------|-----------------| | 79 | 0 | 50 | 9 | -## Common +## Server ### Functions - + ### Classes - + ### Interfaces - + ### Consts, variables and types - + diff --git a/api_docs/kbn_config_mocks.devdocs.json b/api_docs/kbn_config_mocks.devdocs.json index 44c2f2ea91060..922f5422a35c3 100644 --- a/api_docs/kbn_config_mocks.devdocs.json +++ b/api_docs/kbn_config_mocks.devdocs.json @@ -34,9 +34,9 @@ " | undefined; }) => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.Env", + "section": "def-server.Env", "text": "Env" } ], @@ -203,9 +203,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationContext", + "section": "def-server.ConfigDeprecationContext", "text": "ConfigDeprecationContext" } ], @@ -225,25 +225,25 @@ "{ has: jest.MockInstance; get: jest.MockInstance; set: jest.MockInstance; getFlattenedPaths: jest.MockInstance; toRaw: jest.MockInstance, [], unknown>; } & ", @@ -271,9 +271,9 @@ ">, [], unknown>; setGlobalStripUnknownKeys: jest.MockInstance; setSchema: jest.MockInstance], unknown>; addDeprecationProvider: jest.MockInstance; getHandledDeprecatedConfigs: jest.MockInstance<[string, ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.DeprecatedConfigDetails", + "section": "def-server.DeprecatedConfigDetails", "text": "DeprecatedConfigDetails" }, "[]][], [], unknown>; atPath: jest.MockInstance<", @@ -313,25 +313,25 @@ ", [", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigPath", + "section": "def-server.ConfigPath", "text": "ConfigPath" }, ", ({ ignoreUnchanged?: boolean | undefined; } | undefined)?], unknown>; atPathSync: jest.MockInstance; isEnabledAtPath: jest.MockInstance, [path: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigPath", + "section": "def-server.ConfigPath", "text": "ConfigPath" }, "], unknown>; getUnusedPaths: jest.MockInstance, [], unknown>; getUsedPaths: jest.MockInstance, [], unknown>; getDeprecatedConfigPath$: jest.MockInstance<", @@ -339,17 +339,17 @@ "<", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ChangedDeprecatedPaths", + "section": "def-server.ChangedDeprecatedPaths", "text": "ChangedDeprecatedPaths" }, ">, [], unknown>; addDynamicConfigPaths: jest.MockInstance; setDynamicConfigOverrides: jest.MockInstance], unknown>; } & ", @@ -411,9 +411,9 @@ "() => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationContext", + "section": "def-server.ConfigDeprecationContext", "text": "ConfigDeprecationContext" } ], diff --git a/api_docs/kbn_config_mocks.mdx b/api_docs/kbn_config_mocks.mdx index d62cc89ffc3f4..a2609f7dfa2c1 100644 --- a/api_docs/kbn_config_mocks.mdx +++ b/api_docs/kbn_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-mocks title: "@kbn/config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-mocks'] --- import kbnConfigMocksObj from './kbn_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_config_schema.mdx b/api_docs/kbn_config_schema.mdx index 313cd427f4b7f..9a5cba0e5a3a7 100644 --- a/api_docs/kbn_config_schema.mdx +++ b/api_docs/kbn_config_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-config-schema title: "@kbn/config-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/config-schema plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/config-schema'] --- import kbnConfigSchemaObj from './kbn_config_schema.devdocs.json'; diff --git a/api_docs/kbn_content_management_content_editor.mdx b/api_docs/kbn_content_management_content_editor.mdx index 9bbe8c07be75c..ccf0c2dd807b2 100644 --- a/api_docs/kbn_content_management_content_editor.mdx +++ b/api_docs/kbn_content_management_content_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-content-editor title: "@kbn/content-management-content-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-content-editor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-content-editor'] --- import kbnContentManagementContentEditorObj from './kbn_content_management_content_editor.devdocs.json'; diff --git a/api_docs/kbn_content_management_tabbed_table_list_view.mdx b/api_docs/kbn_content_management_tabbed_table_list_view.mdx index 8474a5ecbf4e0..6a21a5fd776b7 100644 --- a/api_docs/kbn_content_management_tabbed_table_list_view.mdx +++ b/api_docs/kbn_content_management_tabbed_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-tabbed-table-list-view title: "@kbn/content-management-tabbed-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-tabbed-table-list-view plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-tabbed-table-list-view'] --- import kbnContentManagementTabbedTableListViewObj from './kbn_content_management_tabbed_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view.mdx b/api_docs/kbn_content_management_table_list_view.mdx index 03d7df851e457..8471a3f7dd97e 100644 --- a/api_docs/kbn_content_management_table_list_view.mdx +++ b/api_docs/kbn_content_management_table_list_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view title: "@kbn/content-management-table-list-view" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view'] --- import kbnContentManagementTableListViewObj from './kbn_content_management_table_list_view.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_common.mdx b/api_docs/kbn_content_management_table_list_view_common.mdx index 46bf1483bea9c..50c8d83754979 100644 --- a/api_docs/kbn_content_management_table_list_view_common.mdx +++ b/api_docs/kbn_content_management_table_list_view_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-common title: "@kbn/content-management-table-list-view-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-common'] --- import kbnContentManagementTableListViewCommonObj from './kbn_content_management_table_list_view_common.devdocs.json'; diff --git a/api_docs/kbn_content_management_table_list_view_table.mdx b/api_docs/kbn_content_management_table_list_view_table.mdx index 927cc08614dc0..b25e860fa3bf5 100644 --- a/api_docs/kbn_content_management_table_list_view_table.mdx +++ b/api_docs/kbn_content_management_table_list_view_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-table-list-view-table title: "@kbn/content-management-table-list-view-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-table-list-view-table plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-table-list-view-table'] --- import kbnContentManagementTableListViewTableObj from './kbn_content_management_table_list_view_table.devdocs.json'; diff --git a/api_docs/kbn_content_management_user_profiles.mdx b/api_docs/kbn_content_management_user_profiles.mdx index d3105dfcf92db..7c4172c98b453 100644 --- a/api_docs/kbn_content_management_user_profiles.mdx +++ b/api_docs/kbn_content_management_user_profiles.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-user-profiles title: "@kbn/content-management-user-profiles" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-user-profiles plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-user-profiles'] --- import kbnContentManagementUserProfilesObj from './kbn_content_management_user_profiles.devdocs.json'; diff --git a/api_docs/kbn_content_management_utils.mdx b/api_docs/kbn_content_management_utils.mdx index f9f82eb801872..e45103c8204b9 100644 --- a/api_docs/kbn_content_management_utils.mdx +++ b/api_docs/kbn_content_management_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-content-management-utils title: "@kbn/content-management-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/content-management-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/content-management-utils'] --- import kbnContentManagementUtilsObj from './kbn_content_management_utils.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser.mdx b/api_docs/kbn_core_analytics_browser.mdx index d883c1c4bcfd4..b6241ca8cb289 100644 --- a/api_docs/kbn_core_analytics_browser.mdx +++ b/api_docs/kbn_core_analytics_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser title: "@kbn/core-analytics-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser'] --- import kbnCoreAnalyticsBrowserObj from './kbn_core_analytics_browser.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_internal.mdx b/api_docs/kbn_core_analytics_browser_internal.mdx index 0c0fe471aa721..91376aa7d2855 100644 --- a/api_docs/kbn_core_analytics_browser_internal.mdx +++ b/api_docs/kbn_core_analytics_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-internal title: "@kbn/core-analytics-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-internal'] --- import kbnCoreAnalyticsBrowserInternalObj from './kbn_core_analytics_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_browser_mocks.mdx b/api_docs/kbn_core_analytics_browser_mocks.mdx index 266ecbe6c2b29..fe5210175cf62 100644 --- a/api_docs/kbn_core_analytics_browser_mocks.mdx +++ b/api_docs/kbn_core_analytics_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-browser-mocks title: "@kbn/core-analytics-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-browser-mocks'] --- import kbnCoreAnalyticsBrowserMocksObj from './kbn_core_analytics_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server.mdx b/api_docs/kbn_core_analytics_server.mdx index 663d3cd6c88c0..1a03f20dfc99d 100644 --- a/api_docs/kbn_core_analytics_server.mdx +++ b/api_docs/kbn_core_analytics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server title: "@kbn/core-analytics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server'] --- import kbnCoreAnalyticsServerObj from './kbn_core_analytics_server.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_internal.mdx b/api_docs/kbn_core_analytics_server_internal.mdx index 6d90a8c4ce769..511ecc7be6d3c 100644 --- a/api_docs/kbn_core_analytics_server_internal.mdx +++ b/api_docs/kbn_core_analytics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-internal title: "@kbn/core-analytics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-internal'] --- import kbnCoreAnalyticsServerInternalObj from './kbn_core_analytics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_analytics_server_mocks.mdx b/api_docs/kbn_core_analytics_server_mocks.mdx index f652982af6d28..a5a1631a958b5 100644 --- a/api_docs/kbn_core_analytics_server_mocks.mdx +++ b/api_docs/kbn_core_analytics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-analytics-server-mocks title: "@kbn/core-analytics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-analytics-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-analytics-server-mocks'] --- import kbnCoreAnalyticsServerMocksObj from './kbn_core_analytics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser.mdx b/api_docs/kbn_core_application_browser.mdx index 1a8928f2aa723..b12ed025c58e2 100644 --- a/api_docs/kbn_core_application_browser.mdx +++ b/api_docs/kbn_core_application_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser title: "@kbn/core-application-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser'] --- import kbnCoreApplicationBrowserObj from './kbn_core_application_browser.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_internal.mdx b/api_docs/kbn_core_application_browser_internal.mdx index abc9819ede038..8d7373f033145 100644 --- a/api_docs/kbn_core_application_browser_internal.mdx +++ b/api_docs/kbn_core_application_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-internal title: "@kbn/core-application-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-internal'] --- import kbnCoreApplicationBrowserInternalObj from './kbn_core_application_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_application_browser_mocks.mdx b/api_docs/kbn_core_application_browser_mocks.mdx index 78608ff9841cb..e98d295208ca7 100644 --- a/api_docs/kbn_core_application_browser_mocks.mdx +++ b/api_docs/kbn_core_application_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-browser-mocks title: "@kbn/core-application-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-browser-mocks'] --- import kbnCoreApplicationBrowserMocksObj from './kbn_core_application_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_application_common.mdx b/api_docs/kbn_core_application_common.mdx index 6d80e401077bd..14ad05dc499fb 100644 --- a/api_docs/kbn_core_application_common.mdx +++ b/api_docs/kbn_core_application_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-application-common title: "@kbn/core-application-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-application-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-application-common'] --- import kbnCoreApplicationCommonObj from './kbn_core_application_common.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_internal.mdx b/api_docs/kbn_core_apps_browser_internal.mdx index 428f54f8c56e5..eda5c7fbbf4bf 100644 --- a/api_docs/kbn_core_apps_browser_internal.mdx +++ b/api_docs/kbn_core_apps_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-internal title: "@kbn/core-apps-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-internal'] --- import kbnCoreAppsBrowserInternalObj from './kbn_core_apps_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_apps_browser_mocks.mdx b/api_docs/kbn_core_apps_browser_mocks.mdx index e9ee53337dc73..31adc7add0377 100644 --- a/api_docs/kbn_core_apps_browser_mocks.mdx +++ b/api_docs/kbn_core_apps_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-browser-mocks title: "@kbn/core-apps-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-browser-mocks'] --- import kbnCoreAppsBrowserMocksObj from './kbn_core_apps_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_apps_server_internal.mdx b/api_docs/kbn_core_apps_server_internal.mdx index 22a0a08d3974c..5801e6c4c51ca 100644 --- a/api_docs/kbn_core_apps_server_internal.mdx +++ b/api_docs/kbn_core_apps_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-apps-server-internal title: "@kbn/core-apps-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-apps-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-apps-server-internal'] --- import kbnCoreAppsServerInternalObj from './kbn_core_apps_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_browser_mocks.mdx b/api_docs/kbn_core_base_browser_mocks.mdx index 6022e576a0f7e..f5cea3950f34e 100644 --- a/api_docs/kbn_core_base_browser_mocks.mdx +++ b/api_docs/kbn_core_base_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-browser-mocks title: "@kbn/core-base-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-browser-mocks'] --- import kbnCoreBaseBrowserMocksObj from './kbn_core_base_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_base_common.mdx b/api_docs/kbn_core_base_common.mdx index 8a7a534d258c3..081488ab4b896 100644 --- a/api_docs/kbn_core_base_common.mdx +++ b/api_docs/kbn_core_base_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-common title: "@kbn/core-base-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-common'] --- import kbnCoreBaseCommonObj from './kbn_core_base_common.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_internal.mdx b/api_docs/kbn_core_base_server_internal.mdx index 7e7b219da7529..50a36b006ece5 100644 --- a/api_docs/kbn_core_base_server_internal.mdx +++ b/api_docs/kbn_core_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-internal title: "@kbn/core-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-internal'] --- import kbnCoreBaseServerInternalObj from './kbn_core_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_base_server_mocks.devdocs.json b/api_docs/kbn_core_base_server_mocks.devdocs.json index 1f4bd13864064..948c932369a7b 100644 --- a/api_docs/kbn_core_base_server_mocks.devdocs.json +++ b/api_docs/kbn_core_base_server_mocks.devdocs.json @@ -37,9 +37,9 @@ "({ env, logger, configService, }?: { env?: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.Env", + "section": "def-server.Env", "text": "Env" }, " | undefined; logger?: jest.Mocked<", @@ -80,9 +80,9 @@ "{ env?: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.Env", + "section": "def-server.Env", "text": "Env" }, " | undefined; logger?: jest.Mocked<", diff --git a/api_docs/kbn_core_base_server_mocks.mdx b/api_docs/kbn_core_base_server_mocks.mdx index b141b2778690f..e01206b59bbd3 100644 --- a/api_docs/kbn_core_base_server_mocks.mdx +++ b/api_docs/kbn_core_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-base-server-mocks title: "@kbn/core-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-base-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-base-server-mocks'] --- import kbnCoreBaseServerMocksObj from './kbn_core_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_browser_mocks.mdx b/api_docs/kbn_core_capabilities_browser_mocks.mdx index b6f96a90c70ae..6759ac841d615 100644 --- a/api_docs/kbn_core_capabilities_browser_mocks.mdx +++ b/api_docs/kbn_core_capabilities_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-browser-mocks title: "@kbn/core-capabilities-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-browser-mocks'] --- import kbnCoreCapabilitiesBrowserMocksObj from './kbn_core_capabilities_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_common.mdx b/api_docs/kbn_core_capabilities_common.mdx index b7649bd9f4490..d23c6e92f38bc 100644 --- a/api_docs/kbn_core_capabilities_common.mdx +++ b/api_docs/kbn_core_capabilities_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-common title: "@kbn/core-capabilities-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-common'] --- import kbnCoreCapabilitiesCommonObj from './kbn_core_capabilities_common.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server.mdx b/api_docs/kbn_core_capabilities_server.mdx index 21f6c5cb73ec6..5a486731b17ad 100644 --- a/api_docs/kbn_core_capabilities_server.mdx +++ b/api_docs/kbn_core_capabilities_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server title: "@kbn/core-capabilities-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server'] --- import kbnCoreCapabilitiesServerObj from './kbn_core_capabilities_server.devdocs.json'; diff --git a/api_docs/kbn_core_capabilities_server_mocks.mdx b/api_docs/kbn_core_capabilities_server_mocks.mdx index 6570543dc4fb1..3ed8988623a57 100644 --- a/api_docs/kbn_core_capabilities_server_mocks.mdx +++ b/api_docs/kbn_core_capabilities_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-capabilities-server-mocks title: "@kbn/core-capabilities-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-capabilities-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-capabilities-server-mocks'] --- import kbnCoreCapabilitiesServerMocksObj from './kbn_core_capabilities_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser.mdx b/api_docs/kbn_core_chrome_browser.mdx index 027c5344b172a..7190d2a20f0d5 100644 --- a/api_docs/kbn_core_chrome_browser.mdx +++ b/api_docs/kbn_core_chrome_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser title: "@kbn/core-chrome-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser'] --- import kbnCoreChromeBrowserObj from './kbn_core_chrome_browser.devdocs.json'; diff --git a/api_docs/kbn_core_chrome_browser_mocks.mdx b/api_docs/kbn_core_chrome_browser_mocks.mdx index 1fd30bef398ad..01a3252c8a762 100644 --- a/api_docs/kbn_core_chrome_browser_mocks.mdx +++ b/api_docs/kbn_core_chrome_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-chrome-browser-mocks title: "@kbn/core-chrome-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-chrome-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-chrome-browser-mocks'] --- import kbnCoreChromeBrowserMocksObj from './kbn_core_chrome_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_config_server_internal.devdocs.json b/api_docs/kbn_core_config_server_internal.devdocs.json index b8e9f014ad528..cc33b0fc5a6d8 100644 --- a/api_docs/kbn_core_config_server_internal.devdocs.json +++ b/api_docs/kbn_core_config_server_internal.devdocs.json @@ -22,9 +22,9 @@ "() => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" }, "[]" diff --git a/api_docs/kbn_core_config_server_internal.mdx b/api_docs/kbn_core_config_server_internal.mdx index 9879a8c3b484e..6b0654b0cc29b 100644 --- a/api_docs/kbn_core_config_server_internal.mdx +++ b/api_docs/kbn_core_config_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-config-server-internal title: "@kbn/core-config-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-config-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-config-server-internal'] --- import kbnCoreConfigServerInternalObj from './kbn_core_config_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser.mdx b/api_docs/kbn_core_custom_branding_browser.mdx index 253ac63260294..f3851859bc80f 100644 --- a/api_docs/kbn_core_custom_branding_browser.mdx +++ b/api_docs/kbn_core_custom_branding_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser title: "@kbn/core-custom-branding-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser'] --- import kbnCoreCustomBrandingBrowserObj from './kbn_core_custom_branding_browser.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_internal.mdx b/api_docs/kbn_core_custom_branding_browser_internal.mdx index d4549dd55311a..ccf61dcfd8cb5 100644 --- a/api_docs/kbn_core_custom_branding_browser_internal.mdx +++ b/api_docs/kbn_core_custom_branding_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-internal title: "@kbn/core-custom-branding-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-internal'] --- import kbnCoreCustomBrandingBrowserInternalObj from './kbn_core_custom_branding_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_browser_mocks.mdx b/api_docs/kbn_core_custom_branding_browser_mocks.mdx index d1d25ab8f6d83..f9ce5e189764e 100644 --- a/api_docs/kbn_core_custom_branding_browser_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-browser-mocks title: "@kbn/core-custom-branding-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-browser-mocks'] --- import kbnCoreCustomBrandingBrowserMocksObj from './kbn_core_custom_branding_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_common.mdx b/api_docs/kbn_core_custom_branding_common.mdx index 3a860fd1bb83d..761cfad051b1d 100644 --- a/api_docs/kbn_core_custom_branding_common.mdx +++ b/api_docs/kbn_core_custom_branding_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-common title: "@kbn/core-custom-branding-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-common'] --- import kbnCoreCustomBrandingCommonObj from './kbn_core_custom_branding_common.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server.mdx b/api_docs/kbn_core_custom_branding_server.mdx index 27b5f33417768..1ef494137a049 100644 --- a/api_docs/kbn_core_custom_branding_server.mdx +++ b/api_docs/kbn_core_custom_branding_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server title: "@kbn/core-custom-branding-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server'] --- import kbnCoreCustomBrandingServerObj from './kbn_core_custom_branding_server.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_internal.mdx b/api_docs/kbn_core_custom_branding_server_internal.mdx index 3de355bd6a0e7..2e955f2ab66a4 100644 --- a/api_docs/kbn_core_custom_branding_server_internal.mdx +++ b/api_docs/kbn_core_custom_branding_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-internal title: "@kbn/core-custom-branding-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-internal'] --- import kbnCoreCustomBrandingServerInternalObj from './kbn_core_custom_branding_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_custom_branding_server_mocks.mdx b/api_docs/kbn_core_custom_branding_server_mocks.mdx index a09db2255e297..e2f65f0746144 100644 --- a/api_docs/kbn_core_custom_branding_server_mocks.mdx +++ b/api_docs/kbn_core_custom_branding_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-custom-branding-server-mocks title: "@kbn/core-custom-branding-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-custom-branding-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-custom-branding-server-mocks'] --- import kbnCoreCustomBrandingServerMocksObj from './kbn_core_custom_branding_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser.mdx b/api_docs/kbn_core_deprecations_browser.mdx index 6afd8a082bea0..07d289e9d0c60 100644 --- a/api_docs/kbn_core_deprecations_browser.mdx +++ b/api_docs/kbn_core_deprecations_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser title: "@kbn/core-deprecations-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser'] --- import kbnCoreDeprecationsBrowserObj from './kbn_core_deprecations_browser.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_internal.mdx b/api_docs/kbn_core_deprecations_browser_internal.mdx index ce9be377e8af2..327e94bc0a23a 100644 --- a/api_docs/kbn_core_deprecations_browser_internal.mdx +++ b/api_docs/kbn_core_deprecations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-internal title: "@kbn/core-deprecations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-internal'] --- import kbnCoreDeprecationsBrowserInternalObj from './kbn_core_deprecations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_browser_mocks.mdx b/api_docs/kbn_core_deprecations_browser_mocks.mdx index af474d2741b15..70421a30b8dca 100644 --- a/api_docs/kbn_core_deprecations_browser_mocks.mdx +++ b/api_docs/kbn_core_deprecations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-browser-mocks title: "@kbn/core-deprecations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-browser-mocks'] --- import kbnCoreDeprecationsBrowserMocksObj from './kbn_core_deprecations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_common.mdx b/api_docs/kbn_core_deprecations_common.mdx index d4c849dbe4aa1..6567c4bb9dc31 100644 --- a/api_docs/kbn_core_deprecations_common.mdx +++ b/api_docs/kbn_core_deprecations_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-common title: "@kbn/core-deprecations-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-common'] --- import kbnCoreDeprecationsCommonObj from './kbn_core_deprecations_common.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server.mdx b/api_docs/kbn_core_deprecations_server.mdx index 8668d85cb9164..18f12bf471715 100644 --- a/api_docs/kbn_core_deprecations_server.mdx +++ b/api_docs/kbn_core_deprecations_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server title: "@kbn/core-deprecations-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server'] --- import kbnCoreDeprecationsServerObj from './kbn_core_deprecations_server.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_internal.mdx b/api_docs/kbn_core_deprecations_server_internal.mdx index 706b504ec80b3..8b79d7beda3ca 100644 --- a/api_docs/kbn_core_deprecations_server_internal.mdx +++ b/api_docs/kbn_core_deprecations_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-internal title: "@kbn/core-deprecations-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-internal'] --- import kbnCoreDeprecationsServerInternalObj from './kbn_core_deprecations_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_deprecations_server_mocks.mdx b/api_docs/kbn_core_deprecations_server_mocks.mdx index 1820ed857cc58..7cad7c4115700 100644 --- a/api_docs/kbn_core_deprecations_server_mocks.mdx +++ b/api_docs/kbn_core_deprecations_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-deprecations-server-mocks title: "@kbn/core-deprecations-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-deprecations-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-deprecations-server-mocks'] --- import kbnCoreDeprecationsServerMocksObj from './kbn_core_deprecations_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser.mdx b/api_docs/kbn_core_doc_links_browser.mdx index 29ba3c43380b3..931d550ff5faf 100644 --- a/api_docs/kbn_core_doc_links_browser.mdx +++ b/api_docs/kbn_core_doc_links_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser title: "@kbn/core-doc-links-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser'] --- import kbnCoreDocLinksBrowserObj from './kbn_core_doc_links_browser.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_browser_mocks.mdx b/api_docs/kbn_core_doc_links_browser_mocks.mdx index 9630dce294eca..65f4b362e4c53 100644 --- a/api_docs/kbn_core_doc_links_browser_mocks.mdx +++ b/api_docs/kbn_core_doc_links_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-browser-mocks title: "@kbn/core-doc-links-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-browser-mocks'] --- import kbnCoreDocLinksBrowserMocksObj from './kbn_core_doc_links_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server.mdx b/api_docs/kbn_core_doc_links_server.mdx index bd0f9529e409c..854a1a6a1538f 100644 --- a/api_docs/kbn_core_doc_links_server.mdx +++ b/api_docs/kbn_core_doc_links_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server title: "@kbn/core-doc-links-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server'] --- import kbnCoreDocLinksServerObj from './kbn_core_doc_links_server.devdocs.json'; diff --git a/api_docs/kbn_core_doc_links_server_mocks.mdx b/api_docs/kbn_core_doc_links_server_mocks.mdx index 0aa8f649b4dbc..360a64ca5d767 100644 --- a/api_docs/kbn_core_doc_links_server_mocks.mdx +++ b/api_docs/kbn_core_doc_links_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-doc-links-server-mocks title: "@kbn/core-doc-links-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-doc-links-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-doc-links-server-mocks'] --- import kbnCoreDocLinksServerMocksObj from './kbn_core_doc_links_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx index f1b289e87ab0e..19632ff6dba2b 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-internal title: "@kbn/core-elasticsearch-client-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-internal'] --- import kbnCoreElasticsearchClientServerInternalObj from './kbn_core_elasticsearch_client_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx index 4cd7df5dd7371..6ecc522559d7a 100644 --- a/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_client_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-client-server-mocks title: "@kbn/core-elasticsearch-client-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-client-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-client-server-mocks'] --- import kbnCoreElasticsearchClientServerMocksObj from './kbn_core_elasticsearch_client_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server.mdx b/api_docs/kbn_core_elasticsearch_server.mdx index d4ded368c2a49..f979d572ec62d 100644 --- a/api_docs/kbn_core_elasticsearch_server.mdx +++ b/api_docs/kbn_core_elasticsearch_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server title: "@kbn/core-elasticsearch-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server'] --- import kbnCoreElasticsearchServerObj from './kbn_core_elasticsearch_server.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_internal.mdx b/api_docs/kbn_core_elasticsearch_server_internal.mdx index 269d49ac2bdc1..49151ecc4f18d 100644 --- a/api_docs/kbn_core_elasticsearch_server_internal.mdx +++ b/api_docs/kbn_core_elasticsearch_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-internal title: "@kbn/core-elasticsearch-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-internal'] --- import kbnCoreElasticsearchServerInternalObj from './kbn_core_elasticsearch_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_elasticsearch_server_mocks.mdx b/api_docs/kbn_core_elasticsearch_server_mocks.mdx index 4e21516c56804..c8ea31162da51 100644 --- a/api_docs/kbn_core_elasticsearch_server_mocks.mdx +++ b/api_docs/kbn_core_elasticsearch_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-elasticsearch-server-mocks title: "@kbn/core-elasticsearch-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-elasticsearch-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-elasticsearch-server-mocks'] --- import kbnCoreElasticsearchServerMocksObj from './kbn_core_elasticsearch_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_internal.mdx b/api_docs/kbn_core_environment_server_internal.mdx index 965ce28e1ac6b..95e16d5e7b40d 100644 --- a/api_docs/kbn_core_environment_server_internal.mdx +++ b/api_docs/kbn_core_environment_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-internal title: "@kbn/core-environment-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-internal'] --- import kbnCoreEnvironmentServerInternalObj from './kbn_core_environment_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_environment_server_mocks.mdx b/api_docs/kbn_core_environment_server_mocks.mdx index 9e3629383de6e..da7299c93558d 100644 --- a/api_docs/kbn_core_environment_server_mocks.mdx +++ b/api_docs/kbn_core_environment_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-environment-server-mocks title: "@kbn/core-environment-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-environment-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-environment-server-mocks'] --- import kbnCoreEnvironmentServerMocksObj from './kbn_core_environment_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser.mdx b/api_docs/kbn_core_execution_context_browser.mdx index 669c546f6a9e8..c80d4fd932288 100644 --- a/api_docs/kbn_core_execution_context_browser.mdx +++ b/api_docs/kbn_core_execution_context_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser title: "@kbn/core-execution-context-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser'] --- import kbnCoreExecutionContextBrowserObj from './kbn_core_execution_context_browser.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_internal.mdx b/api_docs/kbn_core_execution_context_browser_internal.mdx index d3336b0026175..64db3639ff354 100644 --- a/api_docs/kbn_core_execution_context_browser_internal.mdx +++ b/api_docs/kbn_core_execution_context_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-internal title: "@kbn/core-execution-context-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-internal'] --- import kbnCoreExecutionContextBrowserInternalObj from './kbn_core_execution_context_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_browser_mocks.mdx b/api_docs/kbn_core_execution_context_browser_mocks.mdx index 165da61333a81..7fdcb6435c9a9 100644 --- a/api_docs/kbn_core_execution_context_browser_mocks.mdx +++ b/api_docs/kbn_core_execution_context_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-browser-mocks title: "@kbn/core-execution-context-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-browser-mocks'] --- import kbnCoreExecutionContextBrowserMocksObj from './kbn_core_execution_context_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_common.mdx b/api_docs/kbn_core_execution_context_common.mdx index e5dcb85846392..610f65e8db71e 100644 --- a/api_docs/kbn_core_execution_context_common.mdx +++ b/api_docs/kbn_core_execution_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-common title: "@kbn/core-execution-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-common'] --- import kbnCoreExecutionContextCommonObj from './kbn_core_execution_context_common.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server.mdx b/api_docs/kbn_core_execution_context_server.mdx index cdbb96c7daf07..1882a64591529 100644 --- a/api_docs/kbn_core_execution_context_server.mdx +++ b/api_docs/kbn_core_execution_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server title: "@kbn/core-execution-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server'] --- import kbnCoreExecutionContextServerObj from './kbn_core_execution_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_internal.mdx b/api_docs/kbn_core_execution_context_server_internal.mdx index dea1072ac72b3..3e176be3eddbf 100644 --- a/api_docs/kbn_core_execution_context_server_internal.mdx +++ b/api_docs/kbn_core_execution_context_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-internal title: "@kbn/core-execution-context-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-internal'] --- import kbnCoreExecutionContextServerInternalObj from './kbn_core_execution_context_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_execution_context_server_mocks.mdx b/api_docs/kbn_core_execution_context_server_mocks.mdx index 3b27241f4d8fa..029cfa86fc6cc 100644 --- a/api_docs/kbn_core_execution_context_server_mocks.mdx +++ b/api_docs/kbn_core_execution_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-execution-context-server-mocks title: "@kbn/core-execution-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-execution-context-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-execution-context-server-mocks'] --- import kbnCoreExecutionContextServerMocksObj from './kbn_core_execution_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser.mdx b/api_docs/kbn_core_fatal_errors_browser.mdx index 8cc65068ff048..2ca16f2d8cec9 100644 --- a/api_docs/kbn_core_fatal_errors_browser.mdx +++ b/api_docs/kbn_core_fatal_errors_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser title: "@kbn/core-fatal-errors-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser'] --- import kbnCoreFatalErrorsBrowserObj from './kbn_core_fatal_errors_browser.devdocs.json'; diff --git a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx index 28689cc22171f..813bf0cb3b674 100644 --- a/api_docs/kbn_core_fatal_errors_browser_mocks.mdx +++ b/api_docs/kbn_core_fatal_errors_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-fatal-errors-browser-mocks title: "@kbn/core-fatal-errors-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-fatal-errors-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-fatal-errors-browser-mocks'] --- import kbnCoreFatalErrorsBrowserMocksObj from './kbn_core_fatal_errors_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser.mdx b/api_docs/kbn_core_http_browser.mdx index c73914fe967e8..c8eeef99cd18c 100644 --- a/api_docs/kbn_core_http_browser.mdx +++ b/api_docs/kbn_core_http_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser title: "@kbn/core-http-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser'] --- import kbnCoreHttpBrowserObj from './kbn_core_http_browser.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_internal.mdx b/api_docs/kbn_core_http_browser_internal.mdx index a78ce80d6af93..99d3c64bcd234 100644 --- a/api_docs/kbn_core_http_browser_internal.mdx +++ b/api_docs/kbn_core_http_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-internal title: "@kbn/core-http-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-internal'] --- import kbnCoreHttpBrowserInternalObj from './kbn_core_http_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_browser_mocks.mdx b/api_docs/kbn_core_http_browser_mocks.mdx index c62199e3d2690..7cd9de70db514 100644 --- a/api_docs/kbn_core_http_browser_mocks.mdx +++ b/api_docs/kbn_core_http_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-browser-mocks title: "@kbn/core-http-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-browser-mocks'] --- import kbnCoreHttpBrowserMocksObj from './kbn_core_http_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_common.mdx b/api_docs/kbn_core_http_common.mdx index 2b62a696631ec..f6fa63616a341 100644 --- a/api_docs/kbn_core_http_common.mdx +++ b/api_docs/kbn_core_http_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-common title: "@kbn/core-http-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-common'] --- import kbnCoreHttpCommonObj from './kbn_core_http_common.devdocs.json'; diff --git a/api_docs/kbn_core_http_context_server_mocks.mdx b/api_docs/kbn_core_http_context_server_mocks.mdx index e70b1a960cbcc..3db3fbab28446 100644 --- a/api_docs/kbn_core_http_context_server_mocks.mdx +++ b/api_docs/kbn_core_http_context_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-context-server-mocks title: "@kbn/core-http-context-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-context-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-context-server-mocks'] --- import kbnCoreHttpContextServerMocksObj from './kbn_core_http_context_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_request_handler_context_server.mdx b/api_docs/kbn_core_http_request_handler_context_server.mdx index 1b86ce8f1e701..5fb212a11d89e 100644 --- a/api_docs/kbn_core_http_request_handler_context_server.mdx +++ b/api_docs/kbn_core_http_request_handler_context_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-request-handler-context-server title: "@kbn/core-http-request-handler-context-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-request-handler-context-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-request-handler-context-server'] --- import kbnCoreHttpRequestHandlerContextServerObj from './kbn_core_http_request_handler_context_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server.mdx b/api_docs/kbn_core_http_resources_server.mdx index de5cf64e896ad..cef994502e444 100644 --- a/api_docs/kbn_core_http_resources_server.mdx +++ b/api_docs/kbn_core_http_resources_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server title: "@kbn/core-http-resources-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server'] --- import kbnCoreHttpResourcesServerObj from './kbn_core_http_resources_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_internal.mdx b/api_docs/kbn_core_http_resources_server_internal.mdx index bf241241fb97c..3e373606d15a4 100644 --- a/api_docs/kbn_core_http_resources_server_internal.mdx +++ b/api_docs/kbn_core_http_resources_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-internal title: "@kbn/core-http-resources-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-internal'] --- import kbnCoreHttpResourcesServerInternalObj from './kbn_core_http_resources_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_resources_server_mocks.mdx b/api_docs/kbn_core_http_resources_server_mocks.mdx index 6d9856ec64a21..7a57728a3b396 100644 --- a/api_docs/kbn_core_http_resources_server_mocks.mdx +++ b/api_docs/kbn_core_http_resources_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-resources-server-mocks title: "@kbn/core-http-resources-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-resources-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-resources-server-mocks'] --- import kbnCoreHttpResourcesServerMocksObj from './kbn_core_http_resources_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_internal.mdx b/api_docs/kbn_core_http_router_server_internal.mdx index a6276328c5282..8e08360e695a4 100644 --- a/api_docs/kbn_core_http_router_server_internal.mdx +++ b/api_docs/kbn_core_http_router_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-internal title: "@kbn/core-http-router-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-internal'] --- import kbnCoreHttpRouterServerInternalObj from './kbn_core_http_router_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_router_server_mocks.mdx b/api_docs/kbn_core_http_router_server_mocks.mdx index 450e32cc13e6f..431d7030eaef8 100644 --- a/api_docs/kbn_core_http_router_server_mocks.mdx +++ b/api_docs/kbn_core_http_router_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-router-server-mocks title: "@kbn/core-http-router-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-router-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-router-server-mocks'] --- import kbnCoreHttpRouterServerMocksObj from './kbn_core_http_router_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_http_server.devdocs.json b/api_docs/kbn_core_http_server.devdocs.json index f553c6e28d2f8..8751c6033f8fe 100644 --- a/api_docs/kbn_core_http_server.devdocs.json +++ b/api_docs/kbn_core_http_server.devdocs.json @@ -6236,10 +6236,6 @@ "plugin": "spaces", "path": "x-pack/plugins/spaces/server/routes/api/external/update_objects_spaces.ts" }, - { - "plugin": "serverless", - "path": "x-pack/plugins/serverless/server/plugin.ts" - }, { "plugin": "security", "path": "x-pack/plugins/security/server/routes/api_keys/create.ts" @@ -6324,6 +6320,10 @@ "plugin": "encryptedSavedObjects", "path": "x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts" }, + { + "plugin": "serverless", + "path": "x-pack/plugins/serverless/server/plugin.ts" + }, { "plugin": "actions", "path": "x-pack/plugins/actions/server/routes/get_oauth_access_token.ts" @@ -6426,7 +6426,7 @@ }, { "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/routes/unmute_alert.ts" + "path": "x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts" }, { "plugin": "alerting", @@ -7632,14 +7632,6 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/run_soon.test.ts" }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/routes/unmute_alert.test.ts" - }, - { - "plugin": "alerting", - "path": "x-pack/plugins/alerting/server/routes/unmute_alert.test.ts" - }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/unmute_all_rule.test.ts" @@ -8140,6 +8132,14 @@ "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/snooze/snooze_rule_route.test.ts" }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.test.ts" + }, + { + "plugin": "alerting", + "path": "x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.test.ts" + }, { "plugin": "alerting", "path": "x-pack/plugins/alerting/server/routes/rule/apis/unsnooze/unsnooze_rule_route.test.ts" @@ -15672,6 +15672,10 @@ "plugin": "unifiedSearch", "path": "src/plugins/unified_search/server/autocomplete/value_suggestions_route.ts" }, + { + "plugin": "aiops", + "path": "x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/define_route.ts" + }, { "plugin": "aiops", "path": "x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts" diff --git a/api_docs/kbn_core_http_server.mdx b/api_docs/kbn_core_http_server.mdx index 4154602c8cdf5..4a72bb1b0944a 100644 --- a/api_docs/kbn_core_http_server.mdx +++ b/api_docs/kbn_core_http_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server title: "@kbn/core-http-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server'] --- import kbnCoreHttpServerObj from './kbn_core_http_server.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_internal.mdx b/api_docs/kbn_core_http_server_internal.mdx index 416f471e654c4..3d5fb301f8f1b 100644 --- a/api_docs/kbn_core_http_server_internal.mdx +++ b/api_docs/kbn_core_http_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-internal title: "@kbn/core-http-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-internal'] --- import kbnCoreHttpServerInternalObj from './kbn_core_http_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_http_server_mocks.mdx b/api_docs/kbn_core_http_server_mocks.mdx index 6343a4dc6c1c1..c2e129b450bb1 100644 --- a/api_docs/kbn_core_http_server_mocks.mdx +++ b/api_docs/kbn_core_http_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-http-server-mocks title: "@kbn/core-http-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-http-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-http-server-mocks'] --- import kbnCoreHttpServerMocksObj from './kbn_core_http_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser.mdx b/api_docs/kbn_core_i18n_browser.mdx index b333f1b8af032..47ded96f6288e 100644 --- a/api_docs/kbn_core_i18n_browser.mdx +++ b/api_docs/kbn_core_i18n_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser title: "@kbn/core-i18n-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser'] --- import kbnCoreI18nBrowserObj from './kbn_core_i18n_browser.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_browser_mocks.mdx b/api_docs/kbn_core_i18n_browser_mocks.mdx index 3bae26ca672fb..2a204db8ffeaa 100644 --- a/api_docs/kbn_core_i18n_browser_mocks.mdx +++ b/api_docs/kbn_core_i18n_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-browser-mocks title: "@kbn/core-i18n-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-browser-mocks'] --- import kbnCoreI18nBrowserMocksObj from './kbn_core_i18n_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server.mdx b/api_docs/kbn_core_i18n_server.mdx index 7862d5c10a6c6..f70f85c071b6b 100644 --- a/api_docs/kbn_core_i18n_server.mdx +++ b/api_docs/kbn_core_i18n_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server title: "@kbn/core-i18n-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server'] --- import kbnCoreI18nServerObj from './kbn_core_i18n_server.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_internal.mdx b/api_docs/kbn_core_i18n_server_internal.mdx index 142f962e78f0c..285b53ea71e0e 100644 --- a/api_docs/kbn_core_i18n_server_internal.mdx +++ b/api_docs/kbn_core_i18n_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-internal title: "@kbn/core-i18n-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-internal'] --- import kbnCoreI18nServerInternalObj from './kbn_core_i18n_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_i18n_server_mocks.mdx b/api_docs/kbn_core_i18n_server_mocks.mdx index 6a0099b7c3566..3a9217dbe9732 100644 --- a/api_docs/kbn_core_i18n_server_mocks.mdx +++ b/api_docs/kbn_core_i18n_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-i18n-server-mocks title: "@kbn/core-i18n-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-i18n-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-i18n-server-mocks'] --- import kbnCoreI18nServerMocksObj from './kbn_core_i18n_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx index 827edd34b74bd..861fa65377f30 100644 --- a/api_docs/kbn_core_injected_metadata_browser_mocks.mdx +++ b/api_docs/kbn_core_injected_metadata_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-injected-metadata-browser-mocks title: "@kbn/core-injected-metadata-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-injected-metadata-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-injected-metadata-browser-mocks'] --- import kbnCoreInjectedMetadataBrowserMocksObj from './kbn_core_injected_metadata_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_internal.mdx b/api_docs/kbn_core_integrations_browser_internal.mdx index dd5e9190a3e08..d70746e4df9bd 100644 --- a/api_docs/kbn_core_integrations_browser_internal.mdx +++ b/api_docs/kbn_core_integrations_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-internal title: "@kbn/core-integrations-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-internal'] --- import kbnCoreIntegrationsBrowserInternalObj from './kbn_core_integrations_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_integrations_browser_mocks.mdx b/api_docs/kbn_core_integrations_browser_mocks.mdx index f3c7c01112432..804d859c0a4f5 100644 --- a/api_docs/kbn_core_integrations_browser_mocks.mdx +++ b/api_docs/kbn_core_integrations_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-integrations-browser-mocks title: "@kbn/core-integrations-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-integrations-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-integrations-browser-mocks'] --- import kbnCoreIntegrationsBrowserMocksObj from './kbn_core_integrations_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser.mdx b/api_docs/kbn_core_lifecycle_browser.mdx index 003f97836e279..6dd50692711e4 100644 --- a/api_docs/kbn_core_lifecycle_browser.mdx +++ b/api_docs/kbn_core_lifecycle_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser title: "@kbn/core-lifecycle-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser'] --- import kbnCoreLifecycleBrowserObj from './kbn_core_lifecycle_browser.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_browser_mocks.mdx b/api_docs/kbn_core_lifecycle_browser_mocks.mdx index 3038bb17c83ee..b6d5d7da93e67 100644 --- a/api_docs/kbn_core_lifecycle_browser_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-browser-mocks title: "@kbn/core-lifecycle-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-browser-mocks'] --- import kbnCoreLifecycleBrowserMocksObj from './kbn_core_lifecycle_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server.mdx b/api_docs/kbn_core_lifecycle_server.mdx index 22246f4f1f453..2128422256f0c 100644 --- a/api_docs/kbn_core_lifecycle_server.mdx +++ b/api_docs/kbn_core_lifecycle_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server title: "@kbn/core-lifecycle-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server'] --- import kbnCoreLifecycleServerObj from './kbn_core_lifecycle_server.devdocs.json'; diff --git a/api_docs/kbn_core_lifecycle_server_mocks.mdx b/api_docs/kbn_core_lifecycle_server_mocks.mdx index 27ca4d003d158..abc667c047000 100644 --- a/api_docs/kbn_core_lifecycle_server_mocks.mdx +++ b/api_docs/kbn_core_lifecycle_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-lifecycle-server-mocks title: "@kbn/core-lifecycle-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-lifecycle-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-lifecycle-server-mocks'] --- import kbnCoreLifecycleServerMocksObj from './kbn_core_lifecycle_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_browser_mocks.mdx b/api_docs/kbn_core_logging_browser_mocks.mdx index ab556a4196f11..97575cdaf8c04 100644 --- a/api_docs/kbn_core_logging_browser_mocks.mdx +++ b/api_docs/kbn_core_logging_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-browser-mocks title: "@kbn/core-logging-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-browser-mocks'] --- import kbnCoreLoggingBrowserMocksObj from './kbn_core_logging_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_logging_common_internal.mdx b/api_docs/kbn_core_logging_common_internal.mdx index baf747cd817ff..cf17cbd49cfff 100644 --- a/api_docs/kbn_core_logging_common_internal.mdx +++ b/api_docs/kbn_core_logging_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-common-internal title: "@kbn/core-logging-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-common-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-common-internal'] --- import kbnCoreLoggingCommonInternalObj from './kbn_core_logging_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server.mdx b/api_docs/kbn_core_logging_server.mdx index ef87520420092..782f8d6542561 100644 --- a/api_docs/kbn_core_logging_server.mdx +++ b/api_docs/kbn_core_logging_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server title: "@kbn/core-logging-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server'] --- import kbnCoreLoggingServerObj from './kbn_core_logging_server.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_internal.mdx b/api_docs/kbn_core_logging_server_internal.mdx index b61b5e6df215f..d65f211942c45 100644 --- a/api_docs/kbn_core_logging_server_internal.mdx +++ b/api_docs/kbn_core_logging_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-internal title: "@kbn/core-logging-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-internal'] --- import kbnCoreLoggingServerInternalObj from './kbn_core_logging_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_logging_server_mocks.mdx b/api_docs/kbn_core_logging_server_mocks.mdx index 8c0f50b247164..5f6ec51418fa0 100644 --- a/api_docs/kbn_core_logging_server_mocks.mdx +++ b/api_docs/kbn_core_logging_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-logging-server-mocks title: "@kbn/core-logging-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-logging-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-logging-server-mocks'] --- import kbnCoreLoggingServerMocksObj from './kbn_core_logging_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_internal.mdx b/api_docs/kbn_core_metrics_collectors_server_internal.mdx index 687a4488ff13a..9fbe1b4fa3738 100644 --- a/api_docs/kbn_core_metrics_collectors_server_internal.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-internal title: "@kbn/core-metrics-collectors-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-internal'] --- import kbnCoreMetricsCollectorsServerInternalObj from './kbn_core_metrics_collectors_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx index 0dcf61f6fdadc..414689dfd3402 100644 --- a/api_docs/kbn_core_metrics_collectors_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_collectors_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-collectors-server-mocks title: "@kbn/core-metrics-collectors-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-collectors-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-collectors-server-mocks'] --- import kbnCoreMetricsCollectorsServerMocksObj from './kbn_core_metrics_collectors_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server.mdx b/api_docs/kbn_core_metrics_server.mdx index aab9c1e0cb895..8b5177351f11c 100644 --- a/api_docs/kbn_core_metrics_server.mdx +++ b/api_docs/kbn_core_metrics_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server title: "@kbn/core-metrics-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server'] --- import kbnCoreMetricsServerObj from './kbn_core_metrics_server.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_internal.mdx b/api_docs/kbn_core_metrics_server_internal.mdx index 3ba7a2f3d9763..a3fd35284ae13 100644 --- a/api_docs/kbn_core_metrics_server_internal.mdx +++ b/api_docs/kbn_core_metrics_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-internal title: "@kbn/core-metrics-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-internal'] --- import kbnCoreMetricsServerInternalObj from './kbn_core_metrics_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_metrics_server_mocks.mdx b/api_docs/kbn_core_metrics_server_mocks.mdx index 9f39d05083ab0..aeca2bcde1d8b 100644 --- a/api_docs/kbn_core_metrics_server_mocks.mdx +++ b/api_docs/kbn_core_metrics_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-metrics-server-mocks title: "@kbn/core-metrics-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-metrics-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-metrics-server-mocks'] --- import kbnCoreMetricsServerMocksObj from './kbn_core_metrics_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_mount_utils_browser.mdx b/api_docs/kbn_core_mount_utils_browser.mdx index b332d0c3ac36b..54ad2bb55f3b2 100644 --- a/api_docs/kbn_core_mount_utils_browser.mdx +++ b/api_docs/kbn_core_mount_utils_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-mount-utils-browser title: "@kbn/core-mount-utils-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-mount-utils-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-mount-utils-browser'] --- import kbnCoreMountUtilsBrowserObj from './kbn_core_mount_utils_browser.devdocs.json'; diff --git a/api_docs/kbn_core_node_server.mdx b/api_docs/kbn_core_node_server.mdx index 4250b7fca4a51..1f5b50c809af3 100644 --- a/api_docs/kbn_core_node_server.mdx +++ b/api_docs/kbn_core_node_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server title: "@kbn/core-node-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server'] --- import kbnCoreNodeServerObj from './kbn_core_node_server.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_internal.mdx b/api_docs/kbn_core_node_server_internal.mdx index bec4c2ac2d80b..57b5ec43dea23 100644 --- a/api_docs/kbn_core_node_server_internal.mdx +++ b/api_docs/kbn_core_node_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-internal title: "@kbn/core-node-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-internal'] --- import kbnCoreNodeServerInternalObj from './kbn_core_node_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_node_server_mocks.mdx b/api_docs/kbn_core_node_server_mocks.mdx index c6c4216edbf82..dad22974c3106 100644 --- a/api_docs/kbn_core_node_server_mocks.mdx +++ b/api_docs/kbn_core_node_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-node-server-mocks title: "@kbn/core-node-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-node-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-node-server-mocks'] --- import kbnCoreNodeServerMocksObj from './kbn_core_node_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser.mdx b/api_docs/kbn_core_notifications_browser.mdx index 227e901bba14b..f4974322986ea 100644 --- a/api_docs/kbn_core_notifications_browser.mdx +++ b/api_docs/kbn_core_notifications_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser title: "@kbn/core-notifications-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser'] --- import kbnCoreNotificationsBrowserObj from './kbn_core_notifications_browser.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_internal.mdx b/api_docs/kbn_core_notifications_browser_internal.mdx index 38780beeefbb9..5665e226f51c2 100644 --- a/api_docs/kbn_core_notifications_browser_internal.mdx +++ b/api_docs/kbn_core_notifications_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-internal title: "@kbn/core-notifications-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-internal'] --- import kbnCoreNotificationsBrowserInternalObj from './kbn_core_notifications_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_notifications_browser_mocks.mdx b/api_docs/kbn_core_notifications_browser_mocks.mdx index 0787478292abf..3d4b7bc5e2ac3 100644 --- a/api_docs/kbn_core_notifications_browser_mocks.mdx +++ b/api_docs/kbn_core_notifications_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-notifications-browser-mocks title: "@kbn/core-notifications-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-notifications-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-notifications-browser-mocks'] --- import kbnCoreNotificationsBrowserMocksObj from './kbn_core_notifications_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser.devdocs.json b/api_docs/kbn_core_overlays_browser.devdocs.json index 626a14191f5fa..e5c1fc4d6353d 100644 --- a/api_docs/kbn_core_overlays_browser.devdocs.json +++ b/api_docs/kbn_core_overlays_browser.devdocs.json @@ -1070,7 +1070,9 @@ "signature": [ "Omit<", "EuiFlyoutProps", - "<\"div\">, \"onClose\"> & { onClose?: ((flyout: ", + "<\"div\"> | ", + "EuiFlyoutResizableProps", + ", \"onClose\"> & { onClose?: ((flyout: ", { "pluginId": "@kbn/core-mount-utils-browser", "scope": "public", @@ -1078,7 +1080,7 @@ "section": "def-public.OverlayRef", "text": "OverlayRef" }, - ") => void) | undefined; }" + ") => void) | undefined; isResizable?: boolean | undefined; }" ], "path": "packages/core/overlays/core-overlays-browser/src/flyout.ts", "deprecated": false, diff --git a/api_docs/kbn_core_overlays_browser.mdx b/api_docs/kbn_core_overlays_browser.mdx index 644c16f6f15df..da1e72b64af81 100644 --- a/api_docs/kbn_core_overlays_browser.mdx +++ b/api_docs/kbn_core_overlays_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser title: "@kbn/core-overlays-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser'] --- import kbnCoreOverlaysBrowserObj from './kbn_core_overlays_browser.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_internal.mdx b/api_docs/kbn_core_overlays_browser_internal.mdx index 5d07aa3474062..0bb269573d411 100644 --- a/api_docs/kbn_core_overlays_browser_internal.mdx +++ b/api_docs/kbn_core_overlays_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-internal title: "@kbn/core-overlays-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-internal'] --- import kbnCoreOverlaysBrowserInternalObj from './kbn_core_overlays_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_overlays_browser_mocks.mdx b/api_docs/kbn_core_overlays_browser_mocks.mdx index feae7e5befe2d..1b024ad77bd36 100644 --- a/api_docs/kbn_core_overlays_browser_mocks.mdx +++ b/api_docs/kbn_core_overlays_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-overlays-browser-mocks title: "@kbn/core-overlays-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-overlays-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-overlays-browser-mocks'] --- import kbnCoreOverlaysBrowserMocksObj from './kbn_core_overlays_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser.devdocs.json b/api_docs/kbn_core_plugins_browser.devdocs.json index b6348a9176e6d..c6a2d1dc4b9e6 100644 --- a/api_docs/kbn_core_plugins_browser.devdocs.json +++ b/api_docs/kbn_core_plugins_browser.devdocs.json @@ -227,17 +227,17 @@ "{ mode: Readonly<", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.EnvironmentMode", + "section": "def-server.EnvironmentMode", "text": "EnvironmentMode" }, ">; packageInfo: Readonly<", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.PackageInfo", + "section": "def-server.PackageInfo", "text": "PackageInfo" }, ">; }" diff --git a/api_docs/kbn_core_plugins_browser.mdx b/api_docs/kbn_core_plugins_browser.mdx index ccc2b59da843f..6ea47f6456f8c 100644 --- a/api_docs/kbn_core_plugins_browser.mdx +++ b/api_docs/kbn_core_plugins_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser title: "@kbn/core-plugins-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser'] --- import kbnCorePluginsBrowserObj from './kbn_core_plugins_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_browser_mocks.devdocs.json b/api_docs/kbn_core_plugins_browser_mocks.devdocs.json index 52a4ab88445e1..d426362803488 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.devdocs.json +++ b/api_docs/kbn_core_plugins_browser_mocks.devdocs.json @@ -79,9 +79,9 @@ "(config?: unknown, { buildFlavor }?: { buildFlavor?: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.BuildFlavor", + "section": "def-server.BuildFlavor", "text": "BuildFlavor" }, " | undefined; }) => ", @@ -124,9 +124,9 @@ "{ buildFlavor?: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.BuildFlavor", + "section": "def-server.BuildFlavor", "text": "BuildFlavor" }, " | undefined; }" diff --git a/api_docs/kbn_core_plugins_browser_mocks.mdx b/api_docs/kbn_core_plugins_browser_mocks.mdx index 776e367052d19..95e27629a1223 100644 --- a/api_docs/kbn_core_plugins_browser_mocks.mdx +++ b/api_docs/kbn_core_plugins_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-browser-mocks title: "@kbn/core-plugins-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-browser-mocks'] --- import kbnCorePluginsBrowserMocksObj from './kbn_core_plugins_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_browser.mdx b/api_docs/kbn_core_plugins_contracts_browser.mdx index d4318a386e4b0..0e0ab116f5343 100644 --- a/api_docs/kbn_core_plugins_contracts_browser.mdx +++ b/api_docs/kbn_core_plugins_contracts_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-browser title: "@kbn/core-plugins-contracts-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-browser'] --- import kbnCorePluginsContractsBrowserObj from './kbn_core_plugins_contracts_browser.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_contracts_server.mdx b/api_docs/kbn_core_plugins_contracts_server.mdx index 8c4a7fbc3d041..628bd4b04b8cd 100644 --- a/api_docs/kbn_core_plugins_contracts_server.mdx +++ b/api_docs/kbn_core_plugins_contracts_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-contracts-server title: "@kbn/core-plugins-contracts-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-contracts-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-contracts-server'] --- import kbnCorePluginsContractsServerObj from './kbn_core_plugins_contracts_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server.devdocs.json b/api_docs/kbn_core_plugins_server.devdocs.json index 83fb7bac7f377..142c285574d59 100644 --- a/api_docs/kbn_core_plugins_server.devdocs.json +++ b/api_docs/kbn_core_plugins_server.devdocs.json @@ -410,9 +410,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationProvider", + "section": "def-server.ConfigDeprecationProvider", "text": "ConfigDeprecationProvider" }, " | undefined" @@ -564,17 +564,17 @@ "{ mode: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.EnvironmentMode", + "section": "def-server.EnvironmentMode", "text": "EnvironmentMode" }, "; packageInfo: Readonly<", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.PackageInfo", + "section": "def-server.PackageInfo", "text": "PackageInfo" }, ">; instanceUuid: string; configs: readonly string[]; }" diff --git a/api_docs/kbn_core_plugins_server.mdx b/api_docs/kbn_core_plugins_server.mdx index 4e823031703ce..a478dcbf9465a 100644 --- a/api_docs/kbn_core_plugins_server.mdx +++ b/api_docs/kbn_core_plugins_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server title: "@kbn/core-plugins-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server'] --- import kbnCorePluginsServerObj from './kbn_core_plugins_server.devdocs.json'; diff --git a/api_docs/kbn_core_plugins_server_mocks.mdx b/api_docs/kbn_core_plugins_server_mocks.mdx index 7d5430ed2b8ee..3543f9ba58209 100644 --- a/api_docs/kbn_core_plugins_server_mocks.mdx +++ b/api_docs/kbn_core_plugins_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-plugins-server-mocks title: "@kbn/core-plugins-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-plugins-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-plugins-server-mocks'] --- import kbnCorePluginsServerMocksObj from './kbn_core_plugins_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server.mdx b/api_docs/kbn_core_preboot_server.mdx index 15bbd09ed39d5..e7bee47ccd548 100644 --- a/api_docs/kbn_core_preboot_server.mdx +++ b/api_docs/kbn_core_preboot_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server title: "@kbn/core-preboot-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server'] --- import kbnCorePrebootServerObj from './kbn_core_preboot_server.devdocs.json'; diff --git a/api_docs/kbn_core_preboot_server_mocks.mdx b/api_docs/kbn_core_preboot_server_mocks.mdx index a2fbdc2528d01..1be698bbc5721 100644 --- a/api_docs/kbn_core_preboot_server_mocks.mdx +++ b/api_docs/kbn_core_preboot_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-preboot-server-mocks title: "@kbn/core-preboot-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-preboot-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-preboot-server-mocks'] --- import kbnCorePrebootServerMocksObj from './kbn_core_preboot_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_browser_mocks.mdx b/api_docs/kbn_core_rendering_browser_mocks.mdx index 9ecbb01fc4ff1..8be561c1b75ad 100644 --- a/api_docs/kbn_core_rendering_browser_mocks.mdx +++ b/api_docs/kbn_core_rendering_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-browser-mocks title: "@kbn/core-rendering-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-browser-mocks'] --- import kbnCoreRenderingBrowserMocksObj from './kbn_core_rendering_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_internal.mdx b/api_docs/kbn_core_rendering_server_internal.mdx index 2da687e63bce2..3051e30695647 100644 --- a/api_docs/kbn_core_rendering_server_internal.mdx +++ b/api_docs/kbn_core_rendering_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-internal title: "@kbn/core-rendering-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-internal'] --- import kbnCoreRenderingServerInternalObj from './kbn_core_rendering_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_rendering_server_mocks.mdx b/api_docs/kbn_core_rendering_server_mocks.mdx index fad1ff39a8a2f..7b5933882fae8 100644 --- a/api_docs/kbn_core_rendering_server_mocks.mdx +++ b/api_docs/kbn_core_rendering_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-rendering-server-mocks title: "@kbn/core-rendering-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-rendering-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-rendering-server-mocks'] --- import kbnCoreRenderingServerMocksObj from './kbn_core_rendering_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_root_server_internal.devdocs.json b/api_docs/kbn_core_root_server_internal.devdocs.json index c60f896b2ce2d..85b7cca2fbf1a 100644 --- a/api_docs/kbn_core_root_server_internal.devdocs.json +++ b/api_docs/kbn_core_root_server_internal.devdocs.json @@ -67,9 +67,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.RawConfigurationProvider", + "section": "def-server.RawConfigurationProvider", "text": "RawConfigurationProvider" } ], @@ -88,9 +88,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.Env", + "section": "def-server.Env", "text": "Env" } ], diff --git a/api_docs/kbn_core_root_server_internal.mdx b/api_docs/kbn_core_root_server_internal.mdx index 5f78ddd935aa8..7cea7b9bdecb7 100644 --- a/api_docs/kbn_core_root_server_internal.mdx +++ b/api_docs/kbn_core_root_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-root-server-internal title: "@kbn/core-root-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-root-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-root-server-internal'] --- import kbnCoreRootServerInternalObj from './kbn_core_root_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_browser.mdx b/api_docs/kbn_core_saved_objects_api_browser.mdx index ed42c97efb515..559f79042b838 100644 --- a/api_docs/kbn_core_saved_objects_api_browser.mdx +++ b/api_docs/kbn_core_saved_objects_api_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-browser title: "@kbn/core-saved-objects-api-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-browser'] --- import kbnCoreSavedObjectsApiBrowserObj from './kbn_core_saved_objects_api_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server.mdx b/api_docs/kbn_core_saved_objects_api_server.mdx index 819b7a072266a..7eb95c62b312f 100644 --- a/api_docs/kbn_core_saved_objects_api_server.mdx +++ b/api_docs/kbn_core_saved_objects_api_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server title: "@kbn/core-saved-objects-api-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server'] --- import kbnCoreSavedObjectsApiServerObj from './kbn_core_saved_objects_api_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx index 892e1f71e7424..d8b0364a63dcc 100644 --- a/api_docs/kbn_core_saved_objects_api_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_api_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-api-server-mocks title: "@kbn/core-saved-objects-api-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-api-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-api-server-mocks'] --- import kbnCoreSavedObjectsApiServerMocksObj from './kbn_core_saved_objects_api_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_internal.mdx b/api_docs/kbn_core_saved_objects_base_server_internal.mdx index bc858dcd903c3..a330f3fc0db4a 100644 --- a/api_docs/kbn_core_saved_objects_base_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-internal title: "@kbn/core-saved-objects-base-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-internal'] --- import kbnCoreSavedObjectsBaseServerInternalObj from './kbn_core_saved_objects_base_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx index 18696cda4327e..fcc8595bbb859 100644 --- a/api_docs/kbn_core_saved_objects_base_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_base_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-base-server-mocks title: "@kbn/core-saved-objects-base-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-base-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-base-server-mocks'] --- import kbnCoreSavedObjectsBaseServerMocksObj from './kbn_core_saved_objects_base_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser.mdx b/api_docs/kbn_core_saved_objects_browser.mdx index ef61dc2a97ac6..ad7cdc2315c30 100644 --- a/api_docs/kbn_core_saved_objects_browser.mdx +++ b/api_docs/kbn_core_saved_objects_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser title: "@kbn/core-saved-objects-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser'] --- import kbnCoreSavedObjectsBrowserObj from './kbn_core_saved_objects_browser.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_internal.mdx b/api_docs/kbn_core_saved_objects_browser_internal.mdx index ccbb8a5d3ba27..ca48f329f0b01 100644 --- a/api_docs/kbn_core_saved_objects_browser_internal.mdx +++ b/api_docs/kbn_core_saved_objects_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-internal title: "@kbn/core-saved-objects-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-internal'] --- import kbnCoreSavedObjectsBrowserInternalObj from './kbn_core_saved_objects_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_browser_mocks.mdx b/api_docs/kbn_core_saved_objects_browser_mocks.mdx index 44235c63241f4..d8c558adc9487 100644 --- a/api_docs/kbn_core_saved_objects_browser_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-browser-mocks title: "@kbn/core-saved-objects-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-browser-mocks'] --- import kbnCoreSavedObjectsBrowserMocksObj from './kbn_core_saved_objects_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_common.mdx b/api_docs/kbn_core_saved_objects_common.mdx index e3b93700cabdd..75ebd577f1cf7 100644 --- a/api_docs/kbn_core_saved_objects_common.mdx +++ b/api_docs/kbn_core_saved_objects_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-common title: "@kbn/core-saved-objects-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-common'] --- import kbnCoreSavedObjectsCommonObj from './kbn_core_saved_objects_common.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx index 332dc2336a9a6..c991313f038c5 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-internal title: "@kbn/core-saved-objects-import-export-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-internal'] --- import kbnCoreSavedObjectsImportExportServerInternalObj from './kbn_core_saved_objects_import_export_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx index b42782e216e71..113b5d3c5f479 100644 --- a/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_import_export_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-import-export-server-mocks title: "@kbn/core-saved-objects-import-export-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-import-export-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-import-export-server-mocks'] --- import kbnCoreSavedObjectsImportExportServerMocksObj from './kbn_core_saved_objects_import_export_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx index aeed82b398445..cc0aee6ac01f1 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-internal title: "@kbn/core-saved-objects-migration-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-internal'] --- import kbnCoreSavedObjectsMigrationServerInternalObj from './kbn_core_saved_objects_migration_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx index 9848e11313b4f..d8d4e255be39a 100644 --- a/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_migration_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-migration-server-mocks title: "@kbn/core-saved-objects-migration-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-migration-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-migration-server-mocks'] --- import kbnCoreSavedObjectsMigrationServerMocksObj from './kbn_core_saved_objects_migration_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server.mdx b/api_docs/kbn_core_saved_objects_server.mdx index 997eb8966fdc3..6ea999727dbda 100644 --- a/api_docs/kbn_core_saved_objects_server.mdx +++ b/api_docs/kbn_core_saved_objects_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server title: "@kbn/core-saved-objects-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server'] --- import kbnCoreSavedObjectsServerObj from './kbn_core_saved_objects_server.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_internal.mdx b/api_docs/kbn_core_saved_objects_server_internal.mdx index dbb4c6cb1ce0e..5de7b4a4c3b75 100644 --- a/api_docs/kbn_core_saved_objects_server_internal.mdx +++ b/api_docs/kbn_core_saved_objects_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-internal title: "@kbn/core-saved-objects-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-internal'] --- import kbnCoreSavedObjectsServerInternalObj from './kbn_core_saved_objects_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_server_mocks.mdx b/api_docs/kbn_core_saved_objects_server_mocks.mdx index 6a04829d5a417..78671c2123532 100644 --- a/api_docs/kbn_core_saved_objects_server_mocks.mdx +++ b/api_docs/kbn_core_saved_objects_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-server-mocks title: "@kbn/core-saved-objects-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-server-mocks'] --- import kbnCoreSavedObjectsServerMocksObj from './kbn_core_saved_objects_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_saved_objects_utils_server.mdx b/api_docs/kbn_core_saved_objects_utils_server.mdx index 5c5154957ad9f..d860bd85f9cf3 100644 --- a/api_docs/kbn_core_saved_objects_utils_server.mdx +++ b/api_docs/kbn_core_saved_objects_utils_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-saved-objects-utils-server title: "@kbn/core-saved-objects-utils-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-saved-objects-utils-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-saved-objects-utils-server'] --- import kbnCoreSavedObjectsUtilsServerObj from './kbn_core_saved_objects_utils_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser.mdx b/api_docs/kbn_core_security_browser.mdx index 7f1ae05fd5f80..0e4b476a178de 100644 --- a/api_docs/kbn_core_security_browser.mdx +++ b/api_docs/kbn_core_security_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser title: "@kbn/core-security-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser'] --- import kbnCoreSecurityBrowserObj from './kbn_core_security_browser.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_internal.mdx b/api_docs/kbn_core_security_browser_internal.mdx index e639341e0b304..81340f13d8486 100644 --- a/api_docs/kbn_core_security_browser_internal.mdx +++ b/api_docs/kbn_core_security_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-internal title: "@kbn/core-security-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-internal'] --- import kbnCoreSecurityBrowserInternalObj from './kbn_core_security_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_browser_mocks.mdx b/api_docs/kbn_core_security_browser_mocks.mdx index 7c6eae63e813c..12537a361d603 100644 --- a/api_docs/kbn_core_security_browser_mocks.mdx +++ b/api_docs/kbn_core_security_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-browser-mocks title: "@kbn/core-security-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-browser-mocks'] --- import kbnCoreSecurityBrowserMocksObj from './kbn_core_security_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_security_common.mdx b/api_docs/kbn_core_security_common.mdx index fc1f348d7db4a..d70ed4cf4c1d2 100644 --- a/api_docs/kbn_core_security_common.mdx +++ b/api_docs/kbn_core_security_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-common title: "@kbn/core-security-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-common'] --- import kbnCoreSecurityCommonObj from './kbn_core_security_common.devdocs.json'; diff --git a/api_docs/kbn_core_security_server.mdx b/api_docs/kbn_core_security_server.mdx index a1288d85357ce..6ea17270993bb 100644 --- a/api_docs/kbn_core_security_server.mdx +++ b/api_docs/kbn_core_security_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server title: "@kbn/core-security-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server'] --- import kbnCoreSecurityServerObj from './kbn_core_security_server.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_internal.mdx b/api_docs/kbn_core_security_server_internal.mdx index 4865efd9178b7..f8ef237f37c84 100644 --- a/api_docs/kbn_core_security_server_internal.mdx +++ b/api_docs/kbn_core_security_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-internal title: "@kbn/core-security-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-internal'] --- import kbnCoreSecurityServerInternalObj from './kbn_core_security_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_security_server_mocks.mdx b/api_docs/kbn_core_security_server_mocks.mdx index 343b3ce19a773..3a2b394039903 100644 --- a/api_docs/kbn_core_security_server_mocks.mdx +++ b/api_docs/kbn_core_security_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-security-server-mocks title: "@kbn/core-security-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-security-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-security-server-mocks'] --- import kbnCoreSecurityServerMocksObj from './kbn_core_security_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_status_common.mdx b/api_docs/kbn_core_status_common.mdx index 062a7da171ccd..f9adabb4acacf 100644 --- a/api_docs/kbn_core_status_common.mdx +++ b/api_docs/kbn_core_status_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common title: "@kbn/core-status-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common'] --- import kbnCoreStatusCommonObj from './kbn_core_status_common.devdocs.json'; diff --git a/api_docs/kbn_core_status_common_internal.mdx b/api_docs/kbn_core_status_common_internal.mdx index 0e57433315657..91dd4db504cc1 100644 --- a/api_docs/kbn_core_status_common_internal.mdx +++ b/api_docs/kbn_core_status_common_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-common-internal title: "@kbn/core-status-common-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-common-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-common-internal'] --- import kbnCoreStatusCommonInternalObj from './kbn_core_status_common_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server.mdx b/api_docs/kbn_core_status_server.mdx index 33cb93fb9344b..0992bb0e6c218 100644 --- a/api_docs/kbn_core_status_server.mdx +++ b/api_docs/kbn_core_status_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server title: "@kbn/core-status-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server'] --- import kbnCoreStatusServerObj from './kbn_core_status_server.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_internal.mdx b/api_docs/kbn_core_status_server_internal.mdx index 9106095d91893..2b8f03057d7d6 100644 --- a/api_docs/kbn_core_status_server_internal.mdx +++ b/api_docs/kbn_core_status_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-internal title: "@kbn/core-status-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-internal'] --- import kbnCoreStatusServerInternalObj from './kbn_core_status_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_status_server_mocks.mdx b/api_docs/kbn_core_status_server_mocks.mdx index 11bb4a473a943..59ca40efcd57d 100644 --- a/api_docs/kbn_core_status_server_mocks.mdx +++ b/api_docs/kbn_core_status_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-status-server-mocks title: "@kbn/core-status-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-status-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-status-server-mocks'] --- import kbnCoreStatusServerMocksObj from './kbn_core_status_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json b/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json index 0ef892f765ed5..3205388600f03 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.devdocs.json @@ -30,9 +30,9 @@ "({ provider, settings, path, }: { provider: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationProvider", + "section": "def-server.ConfigDeprecationProvider", "text": "ConfigDeprecationProvider" }, "; settings?: Record | undefined; path: string; }) => { messages: string[]; levels: string[]; migrated: Record; }" @@ -63,17 +63,17 @@ "(factory: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" }, ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" }, "[]" @@ -93,9 +93,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" } ], @@ -147,9 +147,9 @@ "({ provider, settings, }: { provider: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationProvider", + "section": "def-server.ConfigDeprecationProvider", "text": "ConfigDeprecationProvider" }, "; settings?: Record | undefined; }) => { messages: string[]; levels: string[]; migrated: Record; }" @@ -180,17 +180,17 @@ "(factory: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" }, ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" }, "[]" @@ -210,9 +210,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" } ], diff --git a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx index 1f5ba3ecc4a1e..ec0f8b225d7b3 100644 --- a/api_docs/kbn_core_test_helpers_deprecations_getters.mdx +++ b/api_docs/kbn_core_test_helpers_deprecations_getters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-deprecations-getters title: "@kbn/core-test-helpers-deprecations-getters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-deprecations-getters plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-deprecations-getters'] --- import kbnCoreTestHelpersDeprecationsGettersObj from './kbn_core_test_helpers_deprecations_getters.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx index bf44e93e6e4f6..95c3b396f80a4 100644 --- a/api_docs/kbn_core_test_helpers_http_setup_browser.mdx +++ b/api_docs/kbn_core_test_helpers_http_setup_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-http-setup-browser title: "@kbn/core-test-helpers-http-setup-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-http-setup-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-http-setup-browser'] --- import kbnCoreTestHelpersHttpSetupBrowserObj from './kbn_core_test_helpers_http_setup_browser.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_kbn_server.mdx b/api_docs/kbn_core_test_helpers_kbn_server.mdx index a22e5119f1c83..e32f4ae455f44 100644 --- a/api_docs/kbn_core_test_helpers_kbn_server.mdx +++ b/api_docs/kbn_core_test_helpers_kbn_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-kbn-server title: "@kbn/core-test-helpers-kbn-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-kbn-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-kbn-server'] --- import kbnCoreTestHelpersKbnServerObj from './kbn_core_test_helpers_kbn_server.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_model_versions.mdx b/api_docs/kbn_core_test_helpers_model_versions.mdx index a63a87c75e64a..87453fd21b01b 100644 --- a/api_docs/kbn_core_test_helpers_model_versions.mdx +++ b/api_docs/kbn_core_test_helpers_model_versions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-model-versions title: "@kbn/core-test-helpers-model-versions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-model-versions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-model-versions'] --- import kbnCoreTestHelpersModelVersionsObj from './kbn_core_test_helpers_model_versions.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx index a876e2f9614e3..d5177d2436814 100644 --- a/api_docs/kbn_core_test_helpers_so_type_serializer.mdx +++ b/api_docs/kbn_core_test_helpers_so_type_serializer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-so-type-serializer title: "@kbn/core-test-helpers-so-type-serializer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-so-type-serializer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-so-type-serializer'] --- import kbnCoreTestHelpersSoTypeSerializerObj from './kbn_core_test_helpers_so_type_serializer.devdocs.json'; diff --git a/api_docs/kbn_core_test_helpers_test_utils.mdx b/api_docs/kbn_core_test_helpers_test_utils.mdx index 15130aaa99c29..2b6f52ca52eb7 100644 --- a/api_docs/kbn_core_test_helpers_test_utils.mdx +++ b/api_docs/kbn_core_test_helpers_test_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-test-helpers-test-utils title: "@kbn/core-test-helpers-test-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-test-helpers-test-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-test-helpers-test-utils'] --- import kbnCoreTestHelpersTestUtilsObj from './kbn_core_test_helpers_test_utils.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser.mdx b/api_docs/kbn_core_theme_browser.mdx index 97c7526bc3dfd..159801e5100cc 100644 --- a/api_docs/kbn_core_theme_browser.mdx +++ b/api_docs/kbn_core_theme_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser title: "@kbn/core-theme-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser'] --- import kbnCoreThemeBrowserObj from './kbn_core_theme_browser.devdocs.json'; diff --git a/api_docs/kbn_core_theme_browser_mocks.mdx b/api_docs/kbn_core_theme_browser_mocks.mdx index d51a5f91ea1f5..fdfab56df8a35 100644 --- a/api_docs/kbn_core_theme_browser_mocks.mdx +++ b/api_docs/kbn_core_theme_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-theme-browser-mocks title: "@kbn/core-theme-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-theme-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-theme-browser-mocks'] --- import kbnCoreThemeBrowserMocksObj from './kbn_core_theme_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser.mdx b/api_docs/kbn_core_ui_settings_browser.mdx index 25091fc4f7343..ef3ac3938bb76 100644 --- a/api_docs/kbn_core_ui_settings_browser.mdx +++ b/api_docs/kbn_core_ui_settings_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser title: "@kbn/core-ui-settings-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser'] --- import kbnCoreUiSettingsBrowserObj from './kbn_core_ui_settings_browser.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_internal.mdx b/api_docs/kbn_core_ui_settings_browser_internal.mdx index 65d7d2fbb08fc..55797d5ac7776 100644 --- a/api_docs/kbn_core_ui_settings_browser_internal.mdx +++ b/api_docs/kbn_core_ui_settings_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-internal title: "@kbn/core-ui-settings-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-internal'] --- import kbnCoreUiSettingsBrowserInternalObj from './kbn_core_ui_settings_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_browser_mocks.mdx b/api_docs/kbn_core_ui_settings_browser_mocks.mdx index 4557399025ed0..c92c310a40b3d 100644 --- a/api_docs/kbn_core_ui_settings_browser_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-browser-mocks title: "@kbn/core-ui-settings-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-browser-mocks'] --- import kbnCoreUiSettingsBrowserMocksObj from './kbn_core_ui_settings_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_common.mdx b/api_docs/kbn_core_ui_settings_common.mdx index c490d3445ef8a..bfebfb7f3e814 100644 --- a/api_docs/kbn_core_ui_settings_common.mdx +++ b/api_docs/kbn_core_ui_settings_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-common title: "@kbn/core-ui-settings-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-common'] --- import kbnCoreUiSettingsCommonObj from './kbn_core_ui_settings_common.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server.mdx b/api_docs/kbn_core_ui_settings_server.mdx index e9c5f129f9147..00389a16eb260 100644 --- a/api_docs/kbn_core_ui_settings_server.mdx +++ b/api_docs/kbn_core_ui_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server title: "@kbn/core-ui-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server'] --- import kbnCoreUiSettingsServerObj from './kbn_core_ui_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_internal.devdocs.json b/api_docs/kbn_core_ui_settings_server_internal.devdocs.json index 5b281b398dc45..f07afb4f2d383 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.devdocs.json +++ b/api_docs/kbn_core_ui_settings_server_internal.devdocs.json @@ -342,17 +342,17 @@ "(factory: ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" }, ") => ", { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecation", + "section": "def-server.ConfigDeprecation", "text": "ConfigDeprecation" }, "[]" @@ -372,9 +372,9 @@ "signature": [ { "pluginId": "@kbn/config", - "scope": "common", + "scope": "server", "docId": "kibKbnConfigPluginApi", - "section": "def-common.ConfigDeprecationFactory", + "section": "def-server.ConfigDeprecationFactory", "text": "ConfigDeprecationFactory" } ], diff --git a/api_docs/kbn_core_ui_settings_server_internal.mdx b/api_docs/kbn_core_ui_settings_server_internal.mdx index b5eb1863821f9..9532d204c0fa1 100644 --- a/api_docs/kbn_core_ui_settings_server_internal.mdx +++ b/api_docs/kbn_core_ui_settings_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-internal title: "@kbn/core-ui-settings-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-internal'] --- import kbnCoreUiSettingsServerInternalObj from './kbn_core_ui_settings_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_ui_settings_server_mocks.mdx b/api_docs/kbn_core_ui_settings_server_mocks.mdx index 989b8bb0e5224..9de8decbd2a62 100644 --- a/api_docs/kbn_core_ui_settings_server_mocks.mdx +++ b/api_docs/kbn_core_ui_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-ui-settings-server-mocks title: "@kbn/core-ui-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-ui-settings-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-ui-settings-server-mocks'] --- import kbnCoreUiSettingsServerMocksObj from './kbn_core_ui_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server.mdx b/api_docs/kbn_core_usage_data_server.mdx index 8ac8b4dca7857..818b91a232963 100644 --- a/api_docs/kbn_core_usage_data_server.mdx +++ b/api_docs/kbn_core_usage_data_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server title: "@kbn/core-usage-data-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server'] --- import kbnCoreUsageDataServerObj from './kbn_core_usage_data_server.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_internal.mdx b/api_docs/kbn_core_usage_data_server_internal.mdx index 9ed7e93b247ca..67b118638d65e 100644 --- a/api_docs/kbn_core_usage_data_server_internal.mdx +++ b/api_docs/kbn_core_usage_data_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-internal title: "@kbn/core-usage-data-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-internal'] --- import kbnCoreUsageDataServerInternalObj from './kbn_core_usage_data_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_usage_data_server_mocks.mdx b/api_docs/kbn_core_usage_data_server_mocks.mdx index 32d8aaeff0fd2..d201a37c9db39 100644 --- a/api_docs/kbn_core_usage_data_server_mocks.mdx +++ b/api_docs/kbn_core_usage_data_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-usage-data-server-mocks title: "@kbn/core-usage-data-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-usage-data-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-usage-data-server-mocks'] --- import kbnCoreUsageDataServerMocksObj from './kbn_core_usage_data_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser.mdx b/api_docs/kbn_core_user_profile_browser.mdx index f492220754ffb..b79c6ed7b2ad8 100644 --- a/api_docs/kbn_core_user_profile_browser.mdx +++ b/api_docs/kbn_core_user_profile_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser title: "@kbn/core-user-profile-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser'] --- import kbnCoreUserProfileBrowserObj from './kbn_core_user_profile_browser.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_internal.mdx b/api_docs/kbn_core_user_profile_browser_internal.mdx index 1de9aed7cfb7e..68e0443eabaca 100644 --- a/api_docs/kbn_core_user_profile_browser_internal.mdx +++ b/api_docs/kbn_core_user_profile_browser_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-internal title: "@kbn/core-user-profile-browser-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-internal'] --- import kbnCoreUserProfileBrowserInternalObj from './kbn_core_user_profile_browser_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_browser_mocks.mdx b/api_docs/kbn_core_user_profile_browser_mocks.mdx index c88354d0cfda2..2fd7844d8b667 100644 --- a/api_docs/kbn_core_user_profile_browser_mocks.mdx +++ b/api_docs/kbn_core_user_profile_browser_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-browser-mocks title: "@kbn/core-user-profile-browser-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-browser-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-browser-mocks'] --- import kbnCoreUserProfileBrowserMocksObj from './kbn_core_user_profile_browser_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_common.mdx b/api_docs/kbn_core_user_profile_common.mdx index dc1ecdb354af6..445046bcfb406 100644 --- a/api_docs/kbn_core_user_profile_common.mdx +++ b/api_docs/kbn_core_user_profile_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-common title: "@kbn/core-user-profile-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-common'] --- import kbnCoreUserProfileCommonObj from './kbn_core_user_profile_common.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server.mdx b/api_docs/kbn_core_user_profile_server.mdx index c9796dd05458f..bb2b4d1d98b85 100644 --- a/api_docs/kbn_core_user_profile_server.mdx +++ b/api_docs/kbn_core_user_profile_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server title: "@kbn/core-user-profile-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server'] --- import kbnCoreUserProfileServerObj from './kbn_core_user_profile_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_internal.mdx b/api_docs/kbn_core_user_profile_server_internal.mdx index afbd09ee0880b..648145a300e39 100644 --- a/api_docs/kbn_core_user_profile_server_internal.mdx +++ b/api_docs/kbn_core_user_profile_server_internal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-internal title: "@kbn/core-user-profile-server-internal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-internal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-internal'] --- import kbnCoreUserProfileServerInternalObj from './kbn_core_user_profile_server_internal.devdocs.json'; diff --git a/api_docs/kbn_core_user_profile_server_mocks.mdx b/api_docs/kbn_core_user_profile_server_mocks.mdx index 12c687c7a3ec3..b17e8b714cc1b 100644 --- a/api_docs/kbn_core_user_profile_server_mocks.mdx +++ b/api_docs/kbn_core_user_profile_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-profile-server-mocks title: "@kbn/core-user-profile-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-profile-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-profile-server-mocks'] --- import kbnCoreUserProfileServerMocksObj from './kbn_core_user_profile_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server.mdx b/api_docs/kbn_core_user_settings_server.mdx index 8feccbd569c9d..e552a3d3eaeaa 100644 --- a/api_docs/kbn_core_user_settings_server.mdx +++ b/api_docs/kbn_core_user_settings_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server title: "@kbn/core-user-settings-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server'] --- import kbnCoreUserSettingsServerObj from './kbn_core_user_settings_server.devdocs.json'; diff --git a/api_docs/kbn_core_user_settings_server_mocks.mdx b/api_docs/kbn_core_user_settings_server_mocks.mdx index 18fb5f3290913..39eefe243f208 100644 --- a/api_docs/kbn_core_user_settings_server_mocks.mdx +++ b/api_docs/kbn_core_user_settings_server_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-core-user-settings-server-mocks title: "@kbn/core-user-settings-server-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/core-user-settings-server-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/core-user-settings-server-mocks'] --- import kbnCoreUserSettingsServerMocksObj from './kbn_core_user_settings_server_mocks.devdocs.json'; diff --git a/api_docs/kbn_crypto.mdx b/api_docs/kbn_crypto.mdx index cf45ae7352f6f..b8a0cc2d5f766 100644 --- a/api_docs/kbn_crypto.mdx +++ b/api_docs/kbn_crypto.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto title: "@kbn/crypto" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto'] --- import kbnCryptoObj from './kbn_crypto.devdocs.json'; diff --git a/api_docs/kbn_crypto_browser.mdx b/api_docs/kbn_crypto_browser.mdx index 4f4df96dc058a..a6434ae5fc75b 100644 --- a/api_docs/kbn_crypto_browser.mdx +++ b/api_docs/kbn_crypto_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-crypto-browser title: "@kbn/crypto-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/crypto-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/crypto-browser'] --- import kbnCryptoBrowserObj from './kbn_crypto_browser.devdocs.json'; diff --git a/api_docs/kbn_custom_icons.mdx b/api_docs/kbn_custom_icons.mdx index 3656307aa3169..7b08c4ac57e1d 100644 --- a/api_docs/kbn_custom_icons.mdx +++ b/api_docs/kbn_custom_icons.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-icons title: "@kbn/custom-icons" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-icons plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-icons'] --- import kbnCustomIconsObj from './kbn_custom_icons.devdocs.json'; diff --git a/api_docs/kbn_custom_integrations.mdx b/api_docs/kbn_custom_integrations.mdx index 33a4fc36aa951..f7542d8729623 100644 --- a/api_docs/kbn_custom_integrations.mdx +++ b/api_docs/kbn_custom_integrations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-custom-integrations title: "@kbn/custom-integrations" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/custom-integrations plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/custom-integrations'] --- import kbnCustomIntegrationsObj from './kbn_custom_integrations.devdocs.json'; diff --git a/api_docs/kbn_cypress_config.mdx b/api_docs/kbn_cypress_config.mdx index 8338c1566fe14..33cca2139dac4 100644 --- a/api_docs/kbn_cypress_config.mdx +++ b/api_docs/kbn_cypress_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-cypress-config title: "@kbn/cypress-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/cypress-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/cypress-config'] --- import kbnCypressConfigObj from './kbn_cypress_config.devdocs.json'; diff --git a/api_docs/kbn_data_forge.mdx b/api_docs/kbn_data_forge.mdx index ec67616da44be..4f39850c75424 100644 --- a/api_docs/kbn_data_forge.mdx +++ b/api_docs/kbn_data_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-forge title: "@kbn/data-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-forge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-forge'] --- import kbnDataForgeObj from './kbn_data_forge.devdocs.json'; diff --git a/api_docs/kbn_data_service.mdx b/api_docs/kbn_data_service.mdx index 0a8804e3254ad..44981977919b5 100644 --- a/api_docs/kbn_data_service.mdx +++ b/api_docs/kbn_data_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-service title: "@kbn/data-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-service plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-service'] --- import kbnDataServiceObj from './kbn_data_service.devdocs.json'; diff --git a/api_docs/kbn_data_stream_adapter.mdx b/api_docs/kbn_data_stream_adapter.mdx index b61e72a504b87..1acfdf6490d1d 100644 --- a/api_docs/kbn_data_stream_adapter.mdx +++ b/api_docs/kbn_data_stream_adapter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-stream-adapter title: "@kbn/data-stream-adapter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-stream-adapter plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-stream-adapter'] --- import kbnDataStreamAdapterObj from './kbn_data_stream_adapter.devdocs.json'; diff --git a/api_docs/kbn_data_view_utils.mdx b/api_docs/kbn_data_view_utils.mdx index 350a63de1c200..902777dcf3e38 100644 --- a/api_docs/kbn_data_view_utils.mdx +++ b/api_docs/kbn_data_view_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-data-view-utils title: "@kbn/data-view-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/data-view-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/data-view-utils'] --- import kbnDataViewUtilsObj from './kbn_data_view_utils.devdocs.json'; diff --git a/api_docs/kbn_datemath.mdx b/api_docs/kbn_datemath.mdx index ab1f4beb20355..904c026e73bc0 100644 --- a/api_docs/kbn_datemath.mdx +++ b/api_docs/kbn_datemath.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-datemath title: "@kbn/datemath" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/datemath plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/datemath'] --- import kbnDatemathObj from './kbn_datemath.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_analytics.mdx b/api_docs/kbn_deeplinks_analytics.mdx index 6a79517353f93..523faf00e20a8 100644 --- a/api_docs/kbn_deeplinks_analytics.mdx +++ b/api_docs/kbn_deeplinks_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-analytics title: "@kbn/deeplinks-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-analytics plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-analytics'] --- import kbnDeeplinksAnalyticsObj from './kbn_deeplinks_analytics.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_devtools.mdx b/api_docs/kbn_deeplinks_devtools.mdx index 49d2cf5bba999..1df804579b87f 100644 --- a/api_docs/kbn_deeplinks_devtools.mdx +++ b/api_docs/kbn_deeplinks_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-devtools title: "@kbn/deeplinks-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-devtools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-devtools'] --- import kbnDeeplinksDevtoolsObj from './kbn_deeplinks_devtools.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_fleet.mdx b/api_docs/kbn_deeplinks_fleet.mdx index d8893663836c2..5ef95ed7ed41f 100644 --- a/api_docs/kbn_deeplinks_fleet.mdx +++ b/api_docs/kbn_deeplinks_fleet.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-fleet title: "@kbn/deeplinks-fleet" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-fleet plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-fleet'] --- import kbnDeeplinksFleetObj from './kbn_deeplinks_fleet.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_management.mdx b/api_docs/kbn_deeplinks_management.mdx index deceabb187ea3..2db9a33551eca 100644 --- a/api_docs/kbn_deeplinks_management.mdx +++ b/api_docs/kbn_deeplinks_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-management title: "@kbn/deeplinks-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-management plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-management'] --- import kbnDeeplinksManagementObj from './kbn_deeplinks_management.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_ml.mdx b/api_docs/kbn_deeplinks_ml.mdx index d39000f177b65..50690bc0236ec 100644 --- a/api_docs/kbn_deeplinks_ml.mdx +++ b/api_docs/kbn_deeplinks_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-ml title: "@kbn/deeplinks-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-ml plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-ml'] --- import kbnDeeplinksMlObj from './kbn_deeplinks_ml.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_observability.mdx b/api_docs/kbn_deeplinks_observability.mdx index c5627292935c9..b269a81c0d3d0 100644 --- a/api_docs/kbn_deeplinks_observability.mdx +++ b/api_docs/kbn_deeplinks_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-observability title: "@kbn/deeplinks-observability" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-observability plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-observability'] --- import kbnDeeplinksObservabilityObj from './kbn_deeplinks_observability.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_search.mdx b/api_docs/kbn_deeplinks_search.mdx index 668632c443f04..34d9608a369b2 100644 --- a/api_docs/kbn_deeplinks_search.mdx +++ b/api_docs/kbn_deeplinks_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-search title: "@kbn/deeplinks-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-search plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-search'] --- import kbnDeeplinksSearchObj from './kbn_deeplinks_search.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_security.mdx b/api_docs/kbn_deeplinks_security.mdx index d9d84085de2ea..3fcd5ad29e59e 100644 --- a/api_docs/kbn_deeplinks_security.mdx +++ b/api_docs/kbn_deeplinks_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-security title: "@kbn/deeplinks-security" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-security plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-security'] --- import kbnDeeplinksSecurityObj from './kbn_deeplinks_security.devdocs.json'; diff --git a/api_docs/kbn_deeplinks_shared.mdx b/api_docs/kbn_deeplinks_shared.mdx index 02646cc5498a5..fc6dcf2fd9210 100644 --- a/api_docs/kbn_deeplinks_shared.mdx +++ b/api_docs/kbn_deeplinks_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-deeplinks-shared title: "@kbn/deeplinks-shared" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/deeplinks-shared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/deeplinks-shared'] --- import kbnDeeplinksSharedObj from './kbn_deeplinks_shared.devdocs.json'; diff --git a/api_docs/kbn_default_nav_analytics.mdx b/api_docs/kbn_default_nav_analytics.mdx index 01766ea6d2e1e..d01c598379102 100644 --- a/api_docs/kbn_default_nav_analytics.mdx +++ b/api_docs/kbn_default_nav_analytics.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-analytics title: "@kbn/default-nav-analytics" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-analytics plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-analytics'] --- import kbnDefaultNavAnalyticsObj from './kbn_default_nav_analytics.devdocs.json'; diff --git a/api_docs/kbn_default_nav_devtools.mdx b/api_docs/kbn_default_nav_devtools.mdx index f84d6b4ef130b..74e469f21d33f 100644 --- a/api_docs/kbn_default_nav_devtools.mdx +++ b/api_docs/kbn_default_nav_devtools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-devtools title: "@kbn/default-nav-devtools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-devtools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-devtools'] --- import kbnDefaultNavDevtoolsObj from './kbn_default_nav_devtools.devdocs.json'; diff --git a/api_docs/kbn_default_nav_management.mdx b/api_docs/kbn_default_nav_management.mdx index 2907d109b82a2..486aacb1058bd 100644 --- a/api_docs/kbn_default_nav_management.mdx +++ b/api_docs/kbn_default_nav_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-management title: "@kbn/default-nav-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-management plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-management'] --- import kbnDefaultNavManagementObj from './kbn_default_nav_management.devdocs.json'; diff --git a/api_docs/kbn_default_nav_ml.mdx b/api_docs/kbn_default_nav_ml.mdx index a1640483bb55d..8e278606ef5c5 100644 --- a/api_docs/kbn_default_nav_ml.mdx +++ b/api_docs/kbn_default_nav_ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-default-nav-ml title: "@kbn/default-nav-ml" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/default-nav-ml plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/default-nav-ml'] --- import kbnDefaultNavMlObj from './kbn_default_nav_ml.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_errors.mdx b/api_docs/kbn_dev_cli_errors.mdx index c367e2a24159a..5cb51db937593 100644 --- a/api_docs/kbn_dev_cli_errors.mdx +++ b/api_docs/kbn_dev_cli_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-errors title: "@kbn/dev-cli-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-errors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-errors'] --- import kbnDevCliErrorsObj from './kbn_dev_cli_errors.devdocs.json'; diff --git a/api_docs/kbn_dev_cli_runner.mdx b/api_docs/kbn_dev_cli_runner.mdx index 9a4dbbdc0ba1f..93fca28e724e1 100644 --- a/api_docs/kbn_dev_cli_runner.mdx +++ b/api_docs/kbn_dev_cli_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-cli-runner title: "@kbn/dev-cli-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-cli-runner plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-cli-runner'] --- import kbnDevCliRunnerObj from './kbn_dev_cli_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_proc_runner.mdx b/api_docs/kbn_dev_proc_runner.mdx index 87fadad7315e0..97cb166861df6 100644 --- a/api_docs/kbn_dev_proc_runner.mdx +++ b/api_docs/kbn_dev_proc_runner.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-proc-runner title: "@kbn/dev-proc-runner" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-proc-runner plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-proc-runner'] --- import kbnDevProcRunnerObj from './kbn_dev_proc_runner.devdocs.json'; diff --git a/api_docs/kbn_dev_utils.mdx b/api_docs/kbn_dev_utils.mdx index 1cc92fbd7b6f7..bac986a33549d 100644 --- a/api_docs/kbn_dev_utils.mdx +++ b/api_docs/kbn_dev_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dev-utils title: "@kbn/dev-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dev-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dev-utils'] --- import kbnDevUtilsObj from './kbn_dev_utils.devdocs.json'; diff --git a/api_docs/kbn_discover_utils.mdx b/api_docs/kbn_discover_utils.mdx index ae860bdd81f04..4383e3ca9e60a 100644 --- a/api_docs/kbn_discover_utils.mdx +++ b/api_docs/kbn_discover_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-discover-utils title: "@kbn/discover-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/discover-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/discover-utils'] --- import kbnDiscoverUtilsObj from './kbn_discover_utils.devdocs.json'; diff --git a/api_docs/kbn_doc_links.mdx b/api_docs/kbn_doc_links.mdx index fac12be5cbdd8..9398b9da2b34b 100644 --- a/api_docs/kbn_doc_links.mdx +++ b/api_docs/kbn_doc_links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-doc-links title: "@kbn/doc-links" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/doc-links plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/doc-links'] --- import kbnDocLinksObj from './kbn_doc_links.devdocs.json'; diff --git a/api_docs/kbn_docs_utils.mdx b/api_docs/kbn_docs_utils.mdx index d6752d9764c52..8b19ce5140ade 100644 --- a/api_docs/kbn_docs_utils.mdx +++ b/api_docs/kbn_docs_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-docs-utils title: "@kbn/docs-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/docs-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/docs-utils'] --- import kbnDocsUtilsObj from './kbn_docs_utils.devdocs.json'; diff --git a/api_docs/kbn_dom_drag_drop.mdx b/api_docs/kbn_dom_drag_drop.mdx index 6703932518c0c..ec06d911e71dd 100644 --- a/api_docs/kbn_dom_drag_drop.mdx +++ b/api_docs/kbn_dom_drag_drop.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-dom-drag-drop title: "@kbn/dom-drag-drop" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/dom-drag-drop plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/dom-drag-drop'] --- import kbnDomDragDropObj from './kbn_dom_drag_drop.devdocs.json'; diff --git a/api_docs/kbn_ebt.mdx b/api_docs/kbn_ebt.mdx index e825e553407c3..a205229653380 100644 --- a/api_docs/kbn_ebt.mdx +++ b/api_docs/kbn_ebt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt title: "@kbn/ebt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt'] --- import kbnEbtObj from './kbn_ebt.devdocs.json'; diff --git a/api_docs/kbn_ebt_tools.mdx b/api_docs/kbn_ebt_tools.mdx index 028ac1f15b769..20c2d479d7132 100644 --- a/api_docs/kbn_ebt_tools.mdx +++ b/api_docs/kbn_ebt_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ebt-tools title: "@kbn/ebt-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ebt-tools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ebt-tools'] --- import kbnEbtToolsObj from './kbn_ebt_tools.devdocs.json'; diff --git a/api_docs/kbn_ecs_data_quality_dashboard.mdx b/api_docs/kbn_ecs_data_quality_dashboard.mdx index 7dae2becc4f1d..57eca41526b8e 100644 --- a/api_docs/kbn_ecs_data_quality_dashboard.mdx +++ b/api_docs/kbn_ecs_data_quality_dashboard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ecs-data-quality-dashboard title: "@kbn/ecs-data-quality-dashboard" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ecs-data-quality-dashboard plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ecs-data-quality-dashboard'] --- import kbnEcsDataQualityDashboardObj from './kbn_ecs_data_quality_dashboard.devdocs.json'; diff --git a/api_docs/kbn_elastic_agent_utils.mdx b/api_docs/kbn_elastic_agent_utils.mdx index e9beb5fe7f3f5..278dcd540da9d 100644 --- a/api_docs/kbn_elastic_agent_utils.mdx +++ b/api_docs/kbn_elastic_agent_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-agent-utils title: "@kbn/elastic-agent-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-agent-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-agent-utils'] --- import kbnElasticAgentUtilsObj from './kbn_elastic_agent_utils.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant.mdx b/api_docs/kbn_elastic_assistant.mdx index f397b7724d5ea..9f2d48fb85bdf 100644 --- a/api_docs/kbn_elastic_assistant.mdx +++ b/api_docs/kbn_elastic_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant title: "@kbn/elastic-assistant" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant'] --- import kbnElasticAssistantObj from './kbn_elastic_assistant.devdocs.json'; diff --git a/api_docs/kbn_elastic_assistant_common.mdx b/api_docs/kbn_elastic_assistant_common.mdx index d96f3a87acb32..d09ea433dfe84 100644 --- a/api_docs/kbn_elastic_assistant_common.mdx +++ b/api_docs/kbn_elastic_assistant_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-elastic-assistant-common title: "@kbn/elastic-assistant-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/elastic-assistant-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/elastic-assistant-common'] --- import kbnElasticAssistantCommonObj from './kbn_elastic_assistant_common.devdocs.json'; diff --git a/api_docs/kbn_entities_schema.mdx b/api_docs/kbn_entities_schema.mdx index 28e449ac36dcc..7c817b8381226 100644 --- a/api_docs/kbn_entities_schema.mdx +++ b/api_docs/kbn_entities_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-entities-schema title: "@kbn/entities-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/entities-schema plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/entities-schema'] --- import kbnEntitiesSchemaObj from './kbn_entities_schema.devdocs.json'; diff --git a/api_docs/kbn_es.mdx b/api_docs/kbn_es.mdx index 3741d90dbfb40..a271f46def043 100644 --- a/api_docs/kbn_es.mdx +++ b/api_docs/kbn_es.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es title: "@kbn/es" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es'] --- import kbnEsObj from './kbn_es.devdocs.json'; diff --git a/api_docs/kbn_es_archiver.mdx b/api_docs/kbn_es_archiver.mdx index 0ce84c2bd3f9a..fe3b02e1c0dc8 100644 --- a/api_docs/kbn_es_archiver.mdx +++ b/api_docs/kbn_es_archiver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-archiver title: "@kbn/es-archiver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-archiver plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-archiver'] --- import kbnEsArchiverObj from './kbn_es_archiver.devdocs.json'; diff --git a/api_docs/kbn_es_errors.mdx b/api_docs/kbn_es_errors.mdx index 16fe81f5e6610..39c3f2ec4badd 100644 --- a/api_docs/kbn_es_errors.mdx +++ b/api_docs/kbn_es_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-errors title: "@kbn/es-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-errors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-errors'] --- import kbnEsErrorsObj from './kbn_es_errors.devdocs.json'; diff --git a/api_docs/kbn_es_query.mdx b/api_docs/kbn_es_query.mdx index 9a6485000b800..0c289846574ee 100644 --- a/api_docs/kbn_es_query.mdx +++ b/api_docs/kbn_es_query.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-query title: "@kbn/es-query" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-query plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-query'] --- import kbnEsQueryObj from './kbn_es_query.devdocs.json'; diff --git a/api_docs/kbn_es_types.mdx b/api_docs/kbn_es_types.mdx index 6ec771de3757d..d311d2550b77d 100644 --- a/api_docs/kbn_es_types.mdx +++ b/api_docs/kbn_es_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-es-types title: "@kbn/es-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/es-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/es-types'] --- import kbnEsTypesObj from './kbn_es_types.devdocs.json'; diff --git a/api_docs/kbn_eslint_plugin_imports.mdx b/api_docs/kbn_eslint_plugin_imports.mdx index b51b1adf4a827..21e23b12943a4 100644 --- a/api_docs/kbn_eslint_plugin_imports.mdx +++ b/api_docs/kbn_eslint_plugin_imports.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-eslint-plugin-imports title: "@kbn/eslint-plugin-imports" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/eslint-plugin-imports plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/eslint-plugin-imports'] --- import kbnEslintPluginImportsObj from './kbn_eslint_plugin_imports.devdocs.json'; diff --git a/api_docs/kbn_esql_ast.mdx b/api_docs/kbn_esql_ast.mdx index b3fe2cb3cc01d..e502b160b9ff5 100644 --- a/api_docs/kbn_esql_ast.mdx +++ b/api_docs/kbn_esql_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-ast title: "@kbn/esql-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-ast plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-ast'] --- import kbnEsqlAstObj from './kbn_esql_ast.devdocs.json'; diff --git a/api_docs/kbn_esql_utils.devdocs.json b/api_docs/kbn_esql_utils.devdocs.json index 5ac4aecf1acdf..6423998036e33 100644 --- a/api_docs/kbn_esql_utils.devdocs.json +++ b/api_docs/kbn_esql_utils.devdocs.json @@ -160,6 +160,62 @@ "returnComment": [], "initialIsOpen": false }, + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.formatESQLColumns", + "type": "Function", + "tags": [], + "label": "formatESQLColumns", + "description": [], + "signature": [ + "(columns: ", + { + "pluginId": "@kbn/es-types", + "scope": "common", + "docId": "kibKbnEsTypesPluginApi", + "section": "def-common.ESQLColumn", + "text": "ESQLColumn" + }, + "[]) => ", + { + "pluginId": "expressions", + "scope": "common", + "docId": "kibExpressionsPluginApi", + "section": "def-common.DatatableColumn", + "text": "DatatableColumn" + }, + "[]" + ], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "@kbn/esql-utils", + "id": "def-common.formatESQLColumns.$1", + "type": "Array", + "tags": [], + "label": "columns", + "description": [], + "signature": [ + { + "pluginId": "@kbn/es-types", + "scope": "common", + "docId": "kibKbnEsTypesPluginApi", + "section": "def-common.ESQLColumn", + "text": "ESQLColumn" + }, + "[]" + ], + "path": "packages/kbn-esql-utils/src/utils/run_query.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [], + "initialIsOpen": false + }, { "parentPluginId": "@kbn/esql-utils", "id": "def-common.getESQLAdHocDataview", diff --git a/api_docs/kbn_esql_utils.mdx b/api_docs/kbn_esql_utils.mdx index 0b4bb34704723..bf4b7665b7797 100644 --- a/api_docs/kbn_esql_utils.mdx +++ b/api_docs/kbn_esql_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-utils title: "@kbn/esql-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-utils'] --- import kbnEsqlUtilsObj from './kbn_esql_utils.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 63 | 0 | 59 | 0 | +| 65 | 0 | 61 | 0 | ## Common diff --git a/api_docs/kbn_esql_validation_autocomplete.mdx b/api_docs/kbn_esql_validation_autocomplete.mdx index 7524fb40d93d3..6aaab51bcdff2 100644 --- a/api_docs/kbn_esql_validation_autocomplete.mdx +++ b/api_docs/kbn_esql_validation_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-esql-validation-autocomplete title: "@kbn/esql-validation-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/esql-validation-autocomplete plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/esql-validation-autocomplete'] --- import kbnEsqlValidationAutocompleteObj from './kbn_esql_validation_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_common.mdx b/api_docs/kbn_event_annotation_common.mdx index 7adc41bb2d365..0a48132690e74 100644 --- a/api_docs/kbn_event_annotation_common.mdx +++ b/api_docs/kbn_event_annotation_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-common title: "@kbn/event-annotation-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-common'] --- import kbnEventAnnotationCommonObj from './kbn_event_annotation_common.devdocs.json'; diff --git a/api_docs/kbn_event_annotation_components.mdx b/api_docs/kbn_event_annotation_components.mdx index e162e8f683b99..48af2667571b7 100644 --- a/api_docs/kbn_event_annotation_components.mdx +++ b/api_docs/kbn_event_annotation_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-event-annotation-components title: "@kbn/event-annotation-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/event-annotation-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/event-annotation-components'] --- import kbnEventAnnotationComponentsObj from './kbn_event_annotation_components.devdocs.json'; diff --git a/api_docs/kbn_expandable_flyout.mdx b/api_docs/kbn_expandable_flyout.mdx index 54d3d59a26f2f..bfc01bbba333b 100644 --- a/api_docs/kbn_expandable_flyout.mdx +++ b/api_docs/kbn_expandable_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-expandable-flyout title: "@kbn/expandable-flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/expandable-flyout plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/expandable-flyout'] --- import kbnExpandableFlyoutObj from './kbn_expandable_flyout.devdocs.json'; diff --git a/api_docs/kbn_field_types.mdx b/api_docs/kbn_field_types.mdx index 0ac5958a62ffe..c7473b6186af5 100644 --- a/api_docs/kbn_field_types.mdx +++ b/api_docs/kbn_field_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-types title: "@kbn/field-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-types'] --- import kbnFieldTypesObj from './kbn_field_types.devdocs.json'; diff --git a/api_docs/kbn_field_utils.mdx b/api_docs/kbn_field_utils.mdx index 39ddf2b1b30d6..ef16b59aafc46 100644 --- a/api_docs/kbn_field_utils.mdx +++ b/api_docs/kbn_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-field-utils title: "@kbn/field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/field-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/field-utils'] --- import kbnFieldUtilsObj from './kbn_field_utils.devdocs.json'; diff --git a/api_docs/kbn_find_used_node_modules.mdx b/api_docs/kbn_find_used_node_modules.mdx index f06f9fe91c939..f1a04c25c8d04 100644 --- a/api_docs/kbn_find_used_node_modules.mdx +++ b/api_docs/kbn_find_used_node_modules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-find-used-node-modules title: "@kbn/find-used-node-modules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/find-used-node-modules plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/find-used-node-modules'] --- import kbnFindUsedNodeModulesObj from './kbn_find_used_node_modules.devdocs.json'; diff --git a/api_docs/kbn_formatters.mdx b/api_docs/kbn_formatters.mdx index 0bfcc21b863b2..100c126e5fa13 100644 --- a/api_docs/kbn_formatters.mdx +++ b/api_docs/kbn_formatters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-formatters title: "@kbn/formatters" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/formatters plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/formatters'] --- import kbnFormattersObj from './kbn_formatters.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_services.mdx b/api_docs/kbn_ftr_common_functional_services.mdx index 07b6c73e8d784..de9c05b48031a 100644 --- a/api_docs/kbn_ftr_common_functional_services.mdx +++ b/api_docs/kbn_ftr_common_functional_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-services title: "@kbn/ftr-common-functional-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-services plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-services'] --- import kbnFtrCommonFunctionalServicesObj from './kbn_ftr_common_functional_services.devdocs.json'; diff --git a/api_docs/kbn_ftr_common_functional_ui_services.mdx b/api_docs/kbn_ftr_common_functional_ui_services.mdx index 463b02da480e3..3093134dc68ea 100644 --- a/api_docs/kbn_ftr_common_functional_ui_services.mdx +++ b/api_docs/kbn_ftr_common_functional_ui_services.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ftr-common-functional-ui-services title: "@kbn/ftr-common-functional-ui-services" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ftr-common-functional-ui-services plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ftr-common-functional-ui-services'] --- import kbnFtrCommonFunctionalUiServicesObj from './kbn_ftr_common_functional_ui_services.devdocs.json'; diff --git a/api_docs/kbn_generate.mdx b/api_docs/kbn_generate.mdx index cba6d292f4a09..e65436c9b7199 100644 --- a/api_docs/kbn_generate.mdx +++ b/api_docs/kbn_generate.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate title: "@kbn/generate" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate'] --- import kbnGenerateObj from './kbn_generate.devdocs.json'; diff --git a/api_docs/kbn_generate_console_definitions.mdx b/api_docs/kbn_generate_console_definitions.mdx index 1e7038202483b..5faf8b64345da 100644 --- a/api_docs/kbn_generate_console_definitions.mdx +++ b/api_docs/kbn_generate_console_definitions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-console-definitions title: "@kbn/generate-console-definitions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-console-definitions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-console-definitions'] --- import kbnGenerateConsoleDefinitionsObj from './kbn_generate_console_definitions.devdocs.json'; diff --git a/api_docs/kbn_generate_csv.mdx b/api_docs/kbn_generate_csv.mdx index 5bfd89555b096..b70c342917440 100644 --- a/api_docs/kbn_generate_csv.mdx +++ b/api_docs/kbn_generate_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-generate-csv title: "@kbn/generate-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/generate-csv plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/generate-csv'] --- import kbnGenerateCsvObj from './kbn_generate_csv.devdocs.json'; diff --git a/api_docs/kbn_grouping.mdx b/api_docs/kbn_grouping.mdx index 39487e88e5bd8..a5eb7dd72f378 100644 --- a/api_docs/kbn_grouping.mdx +++ b/api_docs/kbn_grouping.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-grouping title: "@kbn/grouping" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/grouping plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/grouping'] --- import kbnGroupingObj from './kbn_grouping.devdocs.json'; diff --git a/api_docs/kbn_guided_onboarding.mdx b/api_docs/kbn_guided_onboarding.mdx index 6831bbb9d35e4..6f7cbe11af0a2 100644 --- a/api_docs/kbn_guided_onboarding.mdx +++ b/api_docs/kbn_guided_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-guided-onboarding title: "@kbn/guided-onboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/guided-onboarding plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/guided-onboarding'] --- import kbnGuidedOnboardingObj from './kbn_guided_onboarding.devdocs.json'; diff --git a/api_docs/kbn_handlebars.mdx b/api_docs/kbn_handlebars.mdx index 8006a8f68b046..b9c50d7e674cd 100644 --- a/api_docs/kbn_handlebars.mdx +++ b/api_docs/kbn_handlebars.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-handlebars title: "@kbn/handlebars" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/handlebars plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/handlebars'] --- import kbnHandlebarsObj from './kbn_handlebars.devdocs.json'; diff --git a/api_docs/kbn_hapi_mocks.mdx b/api_docs/kbn_hapi_mocks.mdx index c527ec19cf439..29443897a35fd 100644 --- a/api_docs/kbn_hapi_mocks.mdx +++ b/api_docs/kbn_hapi_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-hapi-mocks title: "@kbn/hapi-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/hapi-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/hapi-mocks'] --- import kbnHapiMocksObj from './kbn_hapi_mocks.devdocs.json'; diff --git a/api_docs/kbn_health_gateway_server.mdx b/api_docs/kbn_health_gateway_server.mdx index 9f1ff3825390a..eb8ec77be9b0c 100644 --- a/api_docs/kbn_health_gateway_server.mdx +++ b/api_docs/kbn_health_gateway_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-health-gateway-server title: "@kbn/health-gateway-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/health-gateway-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/health-gateway-server'] --- import kbnHealthGatewayServerObj from './kbn_health_gateway_server.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_card.mdx b/api_docs/kbn_home_sample_data_card.mdx index f758c27f1d0b4..6b5d84df88f2a 100644 --- a/api_docs/kbn_home_sample_data_card.mdx +++ b/api_docs/kbn_home_sample_data_card.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-card title: "@kbn/home-sample-data-card" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-card plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-card'] --- import kbnHomeSampleDataCardObj from './kbn_home_sample_data_card.devdocs.json'; diff --git a/api_docs/kbn_home_sample_data_tab.mdx b/api_docs/kbn_home_sample_data_tab.mdx index c3d8f8d592816..fa228667a6e10 100644 --- a/api_docs/kbn_home_sample_data_tab.mdx +++ b/api_docs/kbn_home_sample_data_tab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-home-sample-data-tab title: "@kbn/home-sample-data-tab" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/home-sample-data-tab plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/home-sample-data-tab'] --- import kbnHomeSampleDataTabObj from './kbn_home_sample_data_tab.devdocs.json'; diff --git a/api_docs/kbn_i18n.mdx b/api_docs/kbn_i18n.mdx index 3acc9911e9055..a836477cbf880 100644 --- a/api_docs/kbn_i18n.mdx +++ b/api_docs/kbn_i18n.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n title: "@kbn/i18n" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n'] --- import kbnI18nObj from './kbn_i18n.devdocs.json'; diff --git a/api_docs/kbn_i18n_react.mdx b/api_docs/kbn_i18n_react.mdx index 518da5f7c64bf..7e83473ded804 100644 --- a/api_docs/kbn_i18n_react.mdx +++ b/api_docs/kbn_i18n_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-i18n-react title: "@kbn/i18n-react" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/i18n-react plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/i18n-react'] --- import kbnI18nReactObj from './kbn_i18n_react.devdocs.json'; diff --git a/api_docs/kbn_import_resolver.mdx b/api_docs/kbn_import_resolver.mdx index 6ab52418dd426..e10e6308767a6 100644 --- a/api_docs/kbn_import_resolver.mdx +++ b/api_docs/kbn_import_resolver.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-import-resolver title: "@kbn/import-resolver" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/import-resolver plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/import-resolver'] --- import kbnImportResolverObj from './kbn_import_resolver.devdocs.json'; diff --git a/api_docs/kbn_index_management.mdx b/api_docs/kbn_index_management.mdx index a495efdd6dee0..78f667ca3b5aa 100644 --- a/api_docs/kbn_index_management.mdx +++ b/api_docs/kbn_index_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-index-management title: "@kbn/index-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/index-management plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/index-management'] --- import kbnIndexManagementObj from './kbn_index_management.devdocs.json'; diff --git a/api_docs/kbn_inference_integration_flyout.mdx b/api_docs/kbn_inference_integration_flyout.mdx index e8f3987321994..0e5b996614bcb 100644 --- a/api_docs/kbn_inference_integration_flyout.mdx +++ b/api_docs/kbn_inference_integration_flyout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-inference_integration_flyout title: "@kbn/inference_integration_flyout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/inference_integration_flyout plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/inference_integration_flyout'] --- import kbnInferenceIntegrationFlyoutObj from './kbn_inference_integration_flyout.devdocs.json'; diff --git a/api_docs/kbn_infra_forge.mdx b/api_docs/kbn_infra_forge.mdx index a5b98138e6cd0..2f5713a560cb7 100644 --- a/api_docs/kbn_infra_forge.mdx +++ b/api_docs/kbn_infra_forge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-infra-forge title: "@kbn/infra-forge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/infra-forge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/infra-forge'] --- import kbnInfraForgeObj from './kbn_infra_forge.devdocs.json'; diff --git a/api_docs/kbn_interpreter.mdx b/api_docs/kbn_interpreter.mdx index 6cf23602107a2..375b18041dee7 100644 --- a/api_docs/kbn_interpreter.mdx +++ b/api_docs/kbn_interpreter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-interpreter title: "@kbn/interpreter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/interpreter plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/interpreter'] --- import kbnInterpreterObj from './kbn_interpreter.devdocs.json'; diff --git a/api_docs/kbn_io_ts_utils.mdx b/api_docs/kbn_io_ts_utils.mdx index ec3d050e37d64..19bad669a4907 100644 --- a/api_docs/kbn_io_ts_utils.mdx +++ b/api_docs/kbn_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-io-ts-utils title: "@kbn/io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/io-ts-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/io-ts-utils'] --- import kbnIoTsUtilsObj from './kbn_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_ipynb.mdx b/api_docs/kbn_ipynb.mdx index 90e80b5089e3a..c687476587f57 100644 --- a/api_docs/kbn_ipynb.mdx +++ b/api_docs/kbn_ipynb.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ipynb title: "@kbn/ipynb" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ipynb plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ipynb'] --- import kbnIpynbObj from './kbn_ipynb.devdocs.json'; diff --git a/api_docs/kbn_jest_serializers.mdx b/api_docs/kbn_jest_serializers.mdx index 527823332b9ec..bc7ba4c9059d8 100644 --- a/api_docs/kbn_jest_serializers.mdx +++ b/api_docs/kbn_jest_serializers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-jest-serializers title: "@kbn/jest-serializers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/jest-serializers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/jest-serializers'] --- import kbnJestSerializersObj from './kbn_jest_serializers.devdocs.json'; diff --git a/api_docs/kbn_journeys.mdx b/api_docs/kbn_journeys.mdx index bbeb9b1caa126..fbb57a16110f7 100644 --- a/api_docs/kbn_journeys.mdx +++ b/api_docs/kbn_journeys.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-journeys title: "@kbn/journeys" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/journeys plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/journeys'] --- import kbnJourneysObj from './kbn_journeys.devdocs.json'; diff --git a/api_docs/kbn_json_ast.mdx b/api_docs/kbn_json_ast.mdx index a05accb19e3ec..3fc4877551468 100644 --- a/api_docs/kbn_json_ast.mdx +++ b/api_docs/kbn_json_ast.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-ast title: "@kbn/json-ast" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-ast plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-ast'] --- import kbnJsonAstObj from './kbn_json_ast.devdocs.json'; diff --git a/api_docs/kbn_json_schemas.mdx b/api_docs/kbn_json_schemas.mdx index 96889fefc6a7a..b340ed96bc5f3 100644 --- a/api_docs/kbn_json_schemas.mdx +++ b/api_docs/kbn_json_schemas.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-json-schemas title: "@kbn/json-schemas" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/json-schemas plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/json-schemas'] --- import kbnJsonSchemasObj from './kbn_json_schemas.devdocs.json'; diff --git a/api_docs/kbn_kibana_manifest_schema.mdx b/api_docs/kbn_kibana_manifest_schema.mdx index a28e09f59c0d5..63b30528b6c16 100644 --- a/api_docs/kbn_kibana_manifest_schema.mdx +++ b/api_docs/kbn_kibana_manifest_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-kibana-manifest-schema title: "@kbn/kibana-manifest-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/kibana-manifest-schema plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/kibana-manifest-schema'] --- import kbnKibanaManifestSchemaObj from './kbn_kibana_manifest_schema.devdocs.json'; diff --git a/api_docs/kbn_language_documentation_popover.mdx b/api_docs/kbn_language_documentation_popover.mdx index fde59ef7756b6..95737e90d1f4a 100644 --- a/api_docs/kbn_language_documentation_popover.mdx +++ b/api_docs/kbn_language_documentation_popover.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-language-documentation-popover title: "@kbn/language-documentation-popover" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/language-documentation-popover plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/language-documentation-popover'] --- import kbnLanguageDocumentationPopoverObj from './kbn_language_documentation_popover.devdocs.json'; diff --git a/api_docs/kbn_lens_embeddable_utils.mdx b/api_docs/kbn_lens_embeddable_utils.mdx index 53152ff1695ce..0947e84df8a5d 100644 --- a/api_docs/kbn_lens_embeddable_utils.mdx +++ b/api_docs/kbn_lens_embeddable_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-embeddable-utils title: "@kbn/lens-embeddable-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-embeddable-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-embeddable-utils'] --- import kbnLensEmbeddableUtilsObj from './kbn_lens_embeddable_utils.devdocs.json'; diff --git a/api_docs/kbn_lens_formula_docs.mdx b/api_docs/kbn_lens_formula_docs.mdx index 63249f34599c0..c55d2157d3856 100644 --- a/api_docs/kbn_lens_formula_docs.mdx +++ b/api_docs/kbn_lens_formula_docs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-lens-formula-docs title: "@kbn/lens-formula-docs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/lens-formula-docs plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/lens-formula-docs'] --- import kbnLensFormulaDocsObj from './kbn_lens_formula_docs.devdocs.json'; diff --git a/api_docs/kbn_logging.mdx b/api_docs/kbn_logging.mdx index e5ce3d8bdaaff..517e89359c988 100644 --- a/api_docs/kbn_logging.mdx +++ b/api_docs/kbn_logging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging title: "@kbn/logging" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging'] --- import kbnLoggingObj from './kbn_logging.devdocs.json'; diff --git a/api_docs/kbn_logging_mocks.mdx b/api_docs/kbn_logging_mocks.mdx index a0212de91d3cb..be848204da64d 100644 --- a/api_docs/kbn_logging_mocks.mdx +++ b/api_docs/kbn_logging_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-logging-mocks title: "@kbn/logging-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/logging-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/logging-mocks'] --- import kbnLoggingMocksObj from './kbn_logging_mocks.devdocs.json'; diff --git a/api_docs/kbn_managed_content_badge.mdx b/api_docs/kbn_managed_content_badge.mdx index c7cccc81b7c89..7e1b6808281f3 100644 --- a/api_docs/kbn_managed_content_badge.mdx +++ b/api_docs/kbn_managed_content_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-content-badge title: "@kbn/managed-content-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-content-badge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-content-badge'] --- import kbnManagedContentBadgeObj from './kbn_managed_content_badge.devdocs.json'; diff --git a/api_docs/kbn_managed_vscode_config.mdx b/api_docs/kbn_managed_vscode_config.mdx index 2ee6b9f37481b..07e0b131490ad 100644 --- a/api_docs/kbn_managed_vscode_config.mdx +++ b/api_docs/kbn_managed_vscode_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-managed-vscode-config title: "@kbn/managed-vscode-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/managed-vscode-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/managed-vscode-config'] --- import kbnManagedVscodeConfigObj from './kbn_managed_vscode_config.devdocs.json'; diff --git a/api_docs/kbn_management_cards_navigation.mdx b/api_docs/kbn_management_cards_navigation.mdx index 477f69979cd83..4c7fdde6e16e8 100644 --- a/api_docs/kbn_management_cards_navigation.mdx +++ b/api_docs/kbn_management_cards_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-cards-navigation title: "@kbn/management-cards-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-cards-navigation plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-cards-navigation'] --- import kbnManagementCardsNavigationObj from './kbn_management_cards_navigation.devdocs.json'; diff --git a/api_docs/kbn_management_settings_application.mdx b/api_docs/kbn_management_settings_application.mdx index 0b4b39112dd49..d329595d4105d 100644 --- a/api_docs/kbn_management_settings_application.mdx +++ b/api_docs/kbn_management_settings_application.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-application title: "@kbn/management-settings-application" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-application plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-application'] --- import kbnManagementSettingsApplicationObj from './kbn_management_settings_application.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_category.mdx b/api_docs/kbn_management_settings_components_field_category.mdx index f9523b14733db..aeced829bc8ef 100644 --- a/api_docs/kbn_management_settings_components_field_category.mdx +++ b/api_docs/kbn_management_settings_components_field_category.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-category title: "@kbn/management-settings-components-field-category" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-category plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-category'] --- import kbnManagementSettingsComponentsFieldCategoryObj from './kbn_management_settings_components_field_category.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_input.mdx b/api_docs/kbn_management_settings_components_field_input.mdx index 43ecd63b82a0d..cf057f90d2e7f 100644 --- a/api_docs/kbn_management_settings_components_field_input.mdx +++ b/api_docs/kbn_management_settings_components_field_input.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-input title: "@kbn/management-settings-components-field-input" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-input plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-input'] --- import kbnManagementSettingsComponentsFieldInputObj from './kbn_management_settings_components_field_input.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_field_row.mdx b/api_docs/kbn_management_settings_components_field_row.mdx index 9b76cc6ac9712..324ca6a3720ce 100644 --- a/api_docs/kbn_management_settings_components_field_row.mdx +++ b/api_docs/kbn_management_settings_components_field_row.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-field-row title: "@kbn/management-settings-components-field-row" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-field-row plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-field-row'] --- import kbnManagementSettingsComponentsFieldRowObj from './kbn_management_settings_components_field_row.devdocs.json'; diff --git a/api_docs/kbn_management_settings_components_form.mdx b/api_docs/kbn_management_settings_components_form.mdx index 835af503e1698..5545c7ed0a820 100644 --- a/api_docs/kbn_management_settings_components_form.mdx +++ b/api_docs/kbn_management_settings_components_form.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-components-form title: "@kbn/management-settings-components-form" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-components-form plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-components-form'] --- import kbnManagementSettingsComponentsFormObj from './kbn_management_settings_components_form.devdocs.json'; diff --git a/api_docs/kbn_management_settings_field_definition.mdx b/api_docs/kbn_management_settings_field_definition.mdx index 6b0529faa2437..88900122ca9bd 100644 --- a/api_docs/kbn_management_settings_field_definition.mdx +++ b/api_docs/kbn_management_settings_field_definition.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-field-definition title: "@kbn/management-settings-field-definition" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-field-definition plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-field-definition'] --- import kbnManagementSettingsFieldDefinitionObj from './kbn_management_settings_field_definition.devdocs.json'; diff --git a/api_docs/kbn_management_settings_ids.mdx b/api_docs/kbn_management_settings_ids.mdx index 8acc03b273087..0f93901a5854a 100644 --- a/api_docs/kbn_management_settings_ids.mdx +++ b/api_docs/kbn_management_settings_ids.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-ids title: "@kbn/management-settings-ids" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-ids plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-ids'] --- import kbnManagementSettingsIdsObj from './kbn_management_settings_ids.devdocs.json'; diff --git a/api_docs/kbn_management_settings_section_registry.mdx b/api_docs/kbn_management_settings_section_registry.mdx index 6af5bf8b2821e..159bac4f7118d 100644 --- a/api_docs/kbn_management_settings_section_registry.mdx +++ b/api_docs/kbn_management_settings_section_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-section-registry title: "@kbn/management-settings-section-registry" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-section-registry plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-section-registry'] --- import kbnManagementSettingsSectionRegistryObj from './kbn_management_settings_section_registry.devdocs.json'; diff --git a/api_docs/kbn_management_settings_types.mdx b/api_docs/kbn_management_settings_types.mdx index c3b277d5c2133..ec11d18de12f7 100644 --- a/api_docs/kbn_management_settings_types.mdx +++ b/api_docs/kbn_management_settings_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-types title: "@kbn/management-settings-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-types'] --- import kbnManagementSettingsTypesObj from './kbn_management_settings_types.devdocs.json'; diff --git a/api_docs/kbn_management_settings_utilities.mdx b/api_docs/kbn_management_settings_utilities.mdx index 18d3b7b6669c5..0f0e12cc8fbb0 100644 --- a/api_docs/kbn_management_settings_utilities.mdx +++ b/api_docs/kbn_management_settings_utilities.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-settings-utilities title: "@kbn/management-settings-utilities" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-settings-utilities plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-settings-utilities'] --- import kbnManagementSettingsUtilitiesObj from './kbn_management_settings_utilities.devdocs.json'; diff --git a/api_docs/kbn_management_storybook_config.mdx b/api_docs/kbn_management_storybook_config.mdx index 817d0e0d4dba0..07ecec37d32e0 100644 --- a/api_docs/kbn_management_storybook_config.mdx +++ b/api_docs/kbn_management_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-management-storybook-config title: "@kbn/management-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/management-storybook-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/management-storybook-config'] --- import kbnManagementStorybookConfigObj from './kbn_management_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_mapbox_gl.mdx b/api_docs/kbn_mapbox_gl.mdx index 568be497d64c3..36bdad273646b 100644 --- a/api_docs/kbn_mapbox_gl.mdx +++ b/api_docs/kbn_mapbox_gl.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mapbox-gl title: "@kbn/mapbox-gl" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mapbox-gl plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mapbox-gl'] --- import kbnMapboxGlObj from './kbn_mapbox_gl.devdocs.json'; diff --git a/api_docs/kbn_maps_vector_tile_utils.mdx b/api_docs/kbn_maps_vector_tile_utils.mdx index eb91be891e0d6..1aed3d15aa103 100644 --- a/api_docs/kbn_maps_vector_tile_utils.mdx +++ b/api_docs/kbn_maps_vector_tile_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-maps-vector-tile-utils title: "@kbn/maps-vector-tile-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/maps-vector-tile-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/maps-vector-tile-utils'] --- import kbnMapsVectorTileUtilsObj from './kbn_maps_vector_tile_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_agg_utils.mdx b/api_docs/kbn_ml_agg_utils.mdx index 4a1dced5d0be5..f111626328740 100644 --- a/api_docs/kbn_ml_agg_utils.mdx +++ b/api_docs/kbn_ml_agg_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-agg-utils title: "@kbn/ml-agg-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-agg-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-agg-utils'] --- import kbnMlAggUtilsObj from './kbn_ml_agg_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_anomaly_utils.mdx b/api_docs/kbn_ml_anomaly_utils.mdx index 5fa59874cc31c..07ca3a4cd8bc0 100644 --- a/api_docs/kbn_ml_anomaly_utils.mdx +++ b/api_docs/kbn_ml_anomaly_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-anomaly-utils title: "@kbn/ml-anomaly-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-anomaly-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-anomaly-utils'] --- import kbnMlAnomalyUtilsObj from './kbn_ml_anomaly_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_cancellable_search.mdx b/api_docs/kbn_ml_cancellable_search.mdx index a81a9dd9a020b..63f8011ddd6df 100644 --- a/api_docs/kbn_ml_cancellable_search.mdx +++ b/api_docs/kbn_ml_cancellable_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-cancellable-search title: "@kbn/ml-cancellable-search" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-cancellable-search plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-cancellable-search'] --- import kbnMlCancellableSearchObj from './kbn_ml_cancellable_search.devdocs.json'; diff --git a/api_docs/kbn_ml_category_validator.mdx b/api_docs/kbn_ml_category_validator.mdx index 48bc0f2f2c82e..7bef7dcbd56cd 100644 --- a/api_docs/kbn_ml_category_validator.mdx +++ b/api_docs/kbn_ml_category_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-category-validator title: "@kbn/ml-category-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-category-validator plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-category-validator'] --- import kbnMlCategoryValidatorObj from './kbn_ml_category_validator.devdocs.json'; diff --git a/api_docs/kbn_ml_chi2test.mdx b/api_docs/kbn_ml_chi2test.mdx index 5953aaae49da4..5a3c2b9acb8f9 100644 --- a/api_docs/kbn_ml_chi2test.mdx +++ b/api_docs/kbn_ml_chi2test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-chi2test title: "@kbn/ml-chi2test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-chi2test plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-chi2test'] --- import kbnMlChi2testObj from './kbn_ml_chi2test.devdocs.json'; diff --git a/api_docs/kbn_ml_data_frame_analytics_utils.mdx b/api_docs/kbn_ml_data_frame_analytics_utils.mdx index 92052f202d30c..c1308977a1a5f 100644 --- a/api_docs/kbn_ml_data_frame_analytics_utils.mdx +++ b/api_docs/kbn_ml_data_frame_analytics_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-frame-analytics-utils title: "@kbn/ml-data-frame-analytics-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-frame-analytics-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-frame-analytics-utils'] --- import kbnMlDataFrameAnalyticsUtilsObj from './kbn_ml_data_frame_analytics_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_data_grid.mdx b/api_docs/kbn_ml_data_grid.mdx index 2f3a154543fb2..d4294b7a56337 100644 --- a/api_docs/kbn_ml_data_grid.mdx +++ b/api_docs/kbn_ml_data_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-data-grid title: "@kbn/ml-data-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-data-grid plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-data-grid'] --- import kbnMlDataGridObj from './kbn_ml_data_grid.devdocs.json'; diff --git a/api_docs/kbn_ml_date_picker.mdx b/api_docs/kbn_ml_date_picker.mdx index 15e8e31cc4929..ad669b61d48c9 100644 --- a/api_docs/kbn_ml_date_picker.mdx +++ b/api_docs/kbn_ml_date_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-picker title: "@kbn/ml-date-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-picker plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-picker'] --- import kbnMlDatePickerObj from './kbn_ml_date_picker.devdocs.json'; diff --git a/api_docs/kbn_ml_date_utils.mdx b/api_docs/kbn_ml_date_utils.mdx index 0820902eebf50..8c44aceb446f9 100644 --- a/api_docs/kbn_ml_date_utils.mdx +++ b/api_docs/kbn_ml_date_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-date-utils title: "@kbn/ml-date-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-date-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-date-utils'] --- import kbnMlDateUtilsObj from './kbn_ml_date_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_error_utils.mdx b/api_docs/kbn_ml_error_utils.mdx index 91cde24aa1572..1440e21ad6309 100644 --- a/api_docs/kbn_ml_error_utils.mdx +++ b/api_docs/kbn_ml_error_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-error-utils title: "@kbn/ml-error-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-error-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-error-utils'] --- import kbnMlErrorUtilsObj from './kbn_ml_error_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_in_memory_table.mdx b/api_docs/kbn_ml_in_memory_table.mdx index 0492a8c4d55dc..4b81f36a8ae27 100644 --- a/api_docs/kbn_ml_in_memory_table.mdx +++ b/api_docs/kbn_ml_in_memory_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-in-memory-table title: "@kbn/ml-in-memory-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-in-memory-table plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-in-memory-table'] --- import kbnMlInMemoryTableObj from './kbn_ml_in_memory_table.devdocs.json'; diff --git a/api_docs/kbn_ml_is_defined.mdx b/api_docs/kbn_ml_is_defined.mdx index 52d46119bb597..f1e03f2258d67 100644 --- a/api_docs/kbn_ml_is_defined.mdx +++ b/api_docs/kbn_ml_is_defined.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-defined title: "@kbn/ml-is-defined" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-defined plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-defined'] --- import kbnMlIsDefinedObj from './kbn_ml_is_defined.devdocs.json'; diff --git a/api_docs/kbn_ml_is_populated_object.mdx b/api_docs/kbn_ml_is_populated_object.mdx index 3f729c19edea1..044db1fca16c7 100644 --- a/api_docs/kbn_ml_is_populated_object.mdx +++ b/api_docs/kbn_ml_is_populated_object.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-is-populated-object title: "@kbn/ml-is-populated-object" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-is-populated-object plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-is-populated-object'] --- import kbnMlIsPopulatedObjectObj from './kbn_ml_is_populated_object.devdocs.json'; diff --git a/api_docs/kbn_ml_kibana_theme.mdx b/api_docs/kbn_ml_kibana_theme.mdx index 05acf92620392..91bfac7e5e409 100644 --- a/api_docs/kbn_ml_kibana_theme.mdx +++ b/api_docs/kbn_ml_kibana_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-kibana-theme title: "@kbn/ml-kibana-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-kibana-theme plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-kibana-theme'] --- import kbnMlKibanaThemeObj from './kbn_ml_kibana_theme.devdocs.json'; diff --git a/api_docs/kbn_ml_local_storage.mdx b/api_docs/kbn_ml_local_storage.mdx index 35c0cdcaf1fba..4e45555b68565 100644 --- a/api_docs/kbn_ml_local_storage.mdx +++ b/api_docs/kbn_ml_local_storage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-local-storage title: "@kbn/ml-local-storage" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-local-storage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-local-storage'] --- import kbnMlLocalStorageObj from './kbn_ml_local_storage.devdocs.json'; diff --git a/api_docs/kbn_ml_nested_property.mdx b/api_docs/kbn_ml_nested_property.mdx index e43404163b252..8eb0bb825352a 100644 --- a/api_docs/kbn_ml_nested_property.mdx +++ b/api_docs/kbn_ml_nested_property.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-nested-property title: "@kbn/ml-nested-property" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-nested-property plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-nested-property'] --- import kbnMlNestedPropertyObj from './kbn_ml_nested_property.devdocs.json'; diff --git a/api_docs/kbn_ml_number_utils.mdx b/api_docs/kbn_ml_number_utils.mdx index cbe095e8f6776..d4484218862ae 100644 --- a/api_docs/kbn_ml_number_utils.mdx +++ b/api_docs/kbn_ml_number_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-number-utils title: "@kbn/ml-number-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-number-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-number-utils'] --- import kbnMlNumberUtilsObj from './kbn_ml_number_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_query_utils.mdx b/api_docs/kbn_ml_query_utils.mdx index 4160c05104e8a..fc667de3cb96e 100644 --- a/api_docs/kbn_ml_query_utils.mdx +++ b/api_docs/kbn_ml_query_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-query-utils title: "@kbn/ml-query-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-query-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-query-utils'] --- import kbnMlQueryUtilsObj from './kbn_ml_query_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_random_sampler_utils.mdx b/api_docs/kbn_ml_random_sampler_utils.mdx index d781f8d1fd695..9a64aa0240097 100644 --- a/api_docs/kbn_ml_random_sampler_utils.mdx +++ b/api_docs/kbn_ml_random_sampler_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-random-sampler-utils title: "@kbn/ml-random-sampler-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-random-sampler-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-random-sampler-utils'] --- import kbnMlRandomSamplerUtilsObj from './kbn_ml_random_sampler_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_route_utils.mdx b/api_docs/kbn_ml_route_utils.mdx index 6ac9948b64e5a..7495d7f88b6a5 100644 --- a/api_docs/kbn_ml_route_utils.mdx +++ b/api_docs/kbn_ml_route_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-route-utils title: "@kbn/ml-route-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-route-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-route-utils'] --- import kbnMlRouteUtilsObj from './kbn_ml_route_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_runtime_field_utils.mdx b/api_docs/kbn_ml_runtime_field_utils.mdx index 802f112e5b786..c1aa39132a3c5 100644 --- a/api_docs/kbn_ml_runtime_field_utils.mdx +++ b/api_docs/kbn_ml_runtime_field_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-runtime-field-utils title: "@kbn/ml-runtime-field-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-runtime-field-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-runtime-field-utils'] --- import kbnMlRuntimeFieldUtilsObj from './kbn_ml_runtime_field_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_string_hash.mdx b/api_docs/kbn_ml_string_hash.mdx index 089cb9d26cc77..eb591caba86f0 100644 --- a/api_docs/kbn_ml_string_hash.mdx +++ b/api_docs/kbn_ml_string_hash.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-string-hash title: "@kbn/ml-string-hash" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-string-hash plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-string-hash'] --- import kbnMlStringHashObj from './kbn_ml_string_hash.devdocs.json'; diff --git a/api_docs/kbn_ml_time_buckets.mdx b/api_docs/kbn_ml_time_buckets.mdx index 3a2589c1e09d6..c8877f11557ec 100644 --- a/api_docs/kbn_ml_time_buckets.mdx +++ b/api_docs/kbn_ml_time_buckets.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-time-buckets title: "@kbn/ml-time-buckets" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-time-buckets plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-time-buckets'] --- import kbnMlTimeBucketsObj from './kbn_ml_time_buckets.devdocs.json'; diff --git a/api_docs/kbn_ml_trained_models_utils.mdx b/api_docs/kbn_ml_trained_models_utils.mdx index 33ba67927f01f..9e319294ce668 100644 --- a/api_docs/kbn_ml_trained_models_utils.mdx +++ b/api_docs/kbn_ml_trained_models_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-trained-models-utils title: "@kbn/ml-trained-models-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-trained-models-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-trained-models-utils'] --- import kbnMlTrainedModelsUtilsObj from './kbn_ml_trained_models_utils.devdocs.json'; diff --git a/api_docs/kbn_ml_ui_actions.mdx b/api_docs/kbn_ml_ui_actions.mdx index 7923d043bfe56..6b4b3598b9042 100644 --- a/api_docs/kbn_ml_ui_actions.mdx +++ b/api_docs/kbn_ml_ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-ui-actions title: "@kbn/ml-ui-actions" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-ui-actions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-ui-actions'] --- import kbnMlUiActionsObj from './kbn_ml_ui_actions.devdocs.json'; diff --git a/api_docs/kbn_ml_url_state.mdx b/api_docs/kbn_ml_url_state.mdx index e619bec88b297..d6285e2d73708 100644 --- a/api_docs/kbn_ml_url_state.mdx +++ b/api_docs/kbn_ml_url_state.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ml-url-state title: "@kbn/ml-url-state" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ml-url-state plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ml-url-state'] --- import kbnMlUrlStateObj from './kbn_ml_url_state.devdocs.json'; diff --git a/api_docs/kbn_mock_idp_utils.mdx b/api_docs/kbn_mock_idp_utils.mdx index e494c022fda3e..cd97aa589cf1c 100644 --- a/api_docs/kbn_mock_idp_utils.mdx +++ b/api_docs/kbn_mock_idp_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-mock-idp-utils title: "@kbn/mock-idp-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/mock-idp-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/mock-idp-utils'] --- import kbnMockIdpUtilsObj from './kbn_mock_idp_utils.devdocs.json'; diff --git a/api_docs/kbn_monaco.mdx b/api_docs/kbn_monaco.mdx index a169f6d3eaea4..22cf7b21798a8 100644 --- a/api_docs/kbn_monaco.mdx +++ b/api_docs/kbn_monaco.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-monaco title: "@kbn/monaco" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/monaco plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/monaco'] --- import kbnMonacoObj from './kbn_monaco.devdocs.json'; diff --git a/api_docs/kbn_object_versioning.mdx b/api_docs/kbn_object_versioning.mdx index 74677a50f0f9d..35540943db54e 100644 --- a/api_docs/kbn_object_versioning.mdx +++ b/api_docs/kbn_object_versioning.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-object-versioning title: "@kbn/object-versioning" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/object-versioning plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/object-versioning'] --- import kbnObjectVersioningObj from './kbn_object_versioning.devdocs.json'; diff --git a/api_docs/kbn_observability_alert_details.mdx b/api_docs/kbn_observability_alert_details.mdx index aed9c57e4429d..7e78fae26a19e 100644 --- a/api_docs/kbn_observability_alert_details.mdx +++ b/api_docs/kbn_observability_alert_details.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alert-details title: "@kbn/observability-alert-details" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alert-details plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alert-details'] --- import kbnObservabilityAlertDetailsObj from './kbn_observability_alert_details.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_rule_utils.mdx b/api_docs/kbn_observability_alerting_rule_utils.mdx index 61a06badbcfcd..cdb6f37acbde2 100644 --- a/api_docs/kbn_observability_alerting_rule_utils.mdx +++ b/api_docs/kbn_observability_alerting_rule_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-rule-utils title: "@kbn/observability-alerting-rule-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-rule-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-rule-utils'] --- import kbnObservabilityAlertingRuleUtilsObj from './kbn_observability_alerting_rule_utils.devdocs.json'; diff --git a/api_docs/kbn_observability_alerting_test_data.mdx b/api_docs/kbn_observability_alerting_test_data.mdx index 8befee371b647..62715488ea384 100644 --- a/api_docs/kbn_observability_alerting_test_data.mdx +++ b/api_docs/kbn_observability_alerting_test_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-alerting-test-data title: "@kbn/observability-alerting-test-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-alerting-test-data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-alerting-test-data'] --- import kbnObservabilityAlertingTestDataObj from './kbn_observability_alerting_test_data.devdocs.json'; diff --git a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx index fd9a44e6e4870..fad3b2e3c122a 100644 --- a/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx +++ b/api_docs/kbn_observability_get_padded_alert_time_range_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-observability-get-padded-alert-time-range-util title: "@kbn/observability-get-padded-alert-time-range-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/observability-get-padded-alert-time-range-util plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/observability-get-padded-alert-time-range-util'] --- import kbnObservabilityGetPaddedAlertTimeRangeUtilObj from './kbn_observability_get_padded_alert_time_range_util.devdocs.json'; diff --git a/api_docs/kbn_openapi_bundler.devdocs.json b/api_docs/kbn_openapi_bundler.devdocs.json index 88416712a8dda..dd50a60833f72 100644 --- a/api_docs/kbn_openapi_bundler.devdocs.json +++ b/api_docs/kbn_openapi_bundler.devdocs.json @@ -211,7 +211,7 @@ "signature": [ "{ mergedSpecInfo?: Partial<", "OpenAPIV3", - ".InfoObject> | undefined; conflictsResolution?: { prependComponentsWith: \"title\"; } | undefined; } | undefined" + ".InfoObject> | undefined; } | undefined" ], "path": "packages/kbn-openapi-bundler/src/openapi_merger.ts", "deprecated": false, diff --git a/api_docs/kbn_openapi_bundler.mdx b/api_docs/kbn_openapi_bundler.mdx index c96e1227f6630..8a121034c3140 100644 --- a/api_docs/kbn_openapi_bundler.mdx +++ b/api_docs/kbn_openapi_bundler.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-bundler title: "@kbn/openapi-bundler" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-bundler plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-bundler'] --- import kbnOpenapiBundlerObj from './kbn_openapi_bundler.devdocs.json'; diff --git a/api_docs/kbn_openapi_generator.mdx b/api_docs/kbn_openapi_generator.mdx index 52db2e344d696..ce0bd2c505dac 100644 --- a/api_docs/kbn_openapi_generator.mdx +++ b/api_docs/kbn_openapi_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-openapi-generator title: "@kbn/openapi-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/openapi-generator plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/openapi-generator'] --- import kbnOpenapiGeneratorObj from './kbn_openapi_generator.devdocs.json'; diff --git a/api_docs/kbn_optimizer.mdx b/api_docs/kbn_optimizer.mdx index e9c631e0fcdb6..88891905f3227 100644 --- a/api_docs/kbn_optimizer.mdx +++ b/api_docs/kbn_optimizer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer title: "@kbn/optimizer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer'] --- import kbnOptimizerObj from './kbn_optimizer.devdocs.json'; diff --git a/api_docs/kbn_optimizer_webpack_helpers.mdx b/api_docs/kbn_optimizer_webpack_helpers.mdx index aaf34a043360c..13dc97e915ffb 100644 --- a/api_docs/kbn_optimizer_webpack_helpers.mdx +++ b/api_docs/kbn_optimizer_webpack_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-optimizer-webpack-helpers title: "@kbn/optimizer-webpack-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/optimizer-webpack-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/optimizer-webpack-helpers'] --- import kbnOptimizerWebpackHelpersObj from './kbn_optimizer_webpack_helpers.devdocs.json'; diff --git a/api_docs/kbn_osquery_io_ts_types.mdx b/api_docs/kbn_osquery_io_ts_types.mdx index 23de28ae427d0..afa97bbb88cd7 100644 --- a/api_docs/kbn_osquery_io_ts_types.mdx +++ b/api_docs/kbn_osquery_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-osquery-io-ts-types title: "@kbn/osquery-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/osquery-io-ts-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/osquery-io-ts-types'] --- import kbnOsqueryIoTsTypesObj from './kbn_osquery_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_panel_loader.mdx b/api_docs/kbn_panel_loader.mdx index 74c9bc0d8f95a..f27e8c87612c8 100644 --- a/api_docs/kbn_panel_loader.mdx +++ b/api_docs/kbn_panel_loader.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-panel-loader title: "@kbn/panel-loader" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/panel-loader plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/panel-loader'] --- import kbnPanelLoaderObj from './kbn_panel_loader.devdocs.json'; diff --git a/api_docs/kbn_performance_testing_dataset_extractor.mdx b/api_docs/kbn_performance_testing_dataset_extractor.mdx index e96e23af38a86..972c14dbf3bcf 100644 --- a/api_docs/kbn_performance_testing_dataset_extractor.mdx +++ b/api_docs/kbn_performance_testing_dataset_extractor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-performance-testing-dataset-extractor title: "@kbn/performance-testing-dataset-extractor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/performance-testing-dataset-extractor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/performance-testing-dataset-extractor'] --- import kbnPerformanceTestingDatasetExtractorObj from './kbn_performance_testing_dataset_extractor.devdocs.json'; diff --git a/api_docs/kbn_plugin_check.mdx b/api_docs/kbn_plugin_check.mdx index c931fce0bd6f9..d38e52315ac85 100644 --- a/api_docs/kbn_plugin_check.mdx +++ b/api_docs/kbn_plugin_check.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-check title: "@kbn/plugin-check" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-check plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-check'] --- import kbnPluginCheckObj from './kbn_plugin_check.devdocs.json'; diff --git a/api_docs/kbn_plugin_generator.mdx b/api_docs/kbn_plugin_generator.mdx index 7e18755c7f970..44029ed794bd4 100644 --- a/api_docs/kbn_plugin_generator.mdx +++ b/api_docs/kbn_plugin_generator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-generator title: "@kbn/plugin-generator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-generator plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-generator'] --- import kbnPluginGeneratorObj from './kbn_plugin_generator.devdocs.json'; diff --git a/api_docs/kbn_plugin_helpers.mdx b/api_docs/kbn_plugin_helpers.mdx index 2512de06ab7c7..cb8e508211b59 100644 --- a/api_docs/kbn_plugin_helpers.mdx +++ b/api_docs/kbn_plugin_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-plugin-helpers title: "@kbn/plugin-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/plugin-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/plugin-helpers'] --- import kbnPluginHelpersObj from './kbn_plugin_helpers.devdocs.json'; diff --git a/api_docs/kbn_presentation_containers.mdx b/api_docs/kbn_presentation_containers.mdx index 5efbf5383f768..6217bb699b25c 100644 --- a/api_docs/kbn_presentation_containers.mdx +++ b/api_docs/kbn_presentation_containers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-containers title: "@kbn/presentation-containers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-containers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-containers'] --- import kbnPresentationContainersObj from './kbn_presentation_containers.devdocs.json'; diff --git a/api_docs/kbn_presentation_publishing.mdx b/api_docs/kbn_presentation_publishing.mdx index d22bb4bb5b15c..bc7fe94ff1495 100644 --- a/api_docs/kbn_presentation_publishing.mdx +++ b/api_docs/kbn_presentation_publishing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-presentation-publishing title: "@kbn/presentation-publishing" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/presentation-publishing plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/presentation-publishing'] --- import kbnPresentationPublishingObj from './kbn_presentation_publishing.devdocs.json'; diff --git a/api_docs/kbn_profiling_utils.mdx b/api_docs/kbn_profiling_utils.mdx index 5e4664ebef5be..f44bfa36edafa 100644 --- a/api_docs/kbn_profiling_utils.mdx +++ b/api_docs/kbn_profiling_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-profiling-utils title: "@kbn/profiling-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/profiling-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/profiling-utils'] --- import kbnProfilingUtilsObj from './kbn_profiling_utils.devdocs.json'; diff --git a/api_docs/kbn_random_sampling.mdx b/api_docs/kbn_random_sampling.mdx index f1e6943b74537..d0317fb886b8d 100644 --- a/api_docs/kbn_random_sampling.mdx +++ b/api_docs/kbn_random_sampling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-random-sampling title: "@kbn/random-sampling" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/random-sampling plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/random-sampling'] --- import kbnRandomSamplingObj from './kbn_random_sampling.devdocs.json'; diff --git a/api_docs/kbn_react_field.mdx b/api_docs/kbn_react_field.mdx index 06245468a9446..c67cee09b34f0 100644 --- a/api_docs/kbn_react_field.mdx +++ b/api_docs/kbn_react_field.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-field title: "@kbn/react-field" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-field plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-field'] --- import kbnReactFieldObj from './kbn_react_field.devdocs.json'; diff --git a/api_docs/kbn_react_hooks.mdx b/api_docs/kbn_react_hooks.mdx index 5f5f8c00062ef..6c09de91e2e03 100644 --- a/api_docs/kbn_react_hooks.mdx +++ b/api_docs/kbn_react_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-hooks title: "@kbn/react-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-hooks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-hooks'] --- import kbnReactHooksObj from './kbn_react_hooks.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_common.mdx b/api_docs/kbn_react_kibana_context_common.mdx index 87bfdf8fbfa62..eacf24e2ff5a4 100644 --- a/api_docs/kbn_react_kibana_context_common.mdx +++ b/api_docs/kbn_react_kibana_context_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-common title: "@kbn/react-kibana-context-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-common'] --- import kbnReactKibanaContextCommonObj from './kbn_react_kibana_context_common.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_render.mdx b/api_docs/kbn_react_kibana_context_render.mdx index 828d9c34639d5..f84e3a0ac4ff9 100644 --- a/api_docs/kbn_react_kibana_context_render.mdx +++ b/api_docs/kbn_react_kibana_context_render.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-render title: "@kbn/react-kibana-context-render" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-render plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-render'] --- import kbnReactKibanaContextRenderObj from './kbn_react_kibana_context_render.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_root.mdx b/api_docs/kbn_react_kibana_context_root.mdx index d903430276fc8..33a83393e1057 100644 --- a/api_docs/kbn_react_kibana_context_root.mdx +++ b/api_docs/kbn_react_kibana_context_root.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-root title: "@kbn/react-kibana-context-root" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-root plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-root'] --- import kbnReactKibanaContextRootObj from './kbn_react_kibana_context_root.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_styled.mdx b/api_docs/kbn_react_kibana_context_styled.mdx index d4d79a59d3500..f842545a09b73 100644 --- a/api_docs/kbn_react_kibana_context_styled.mdx +++ b/api_docs/kbn_react_kibana_context_styled.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-styled title: "@kbn/react-kibana-context-styled" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-styled plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-styled'] --- import kbnReactKibanaContextStyledObj from './kbn_react_kibana_context_styled.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_context_theme.mdx b/api_docs/kbn_react_kibana_context_theme.mdx index 50d5930dd7498..38a9d4bc4945a 100644 --- a/api_docs/kbn_react_kibana_context_theme.mdx +++ b/api_docs/kbn_react_kibana_context_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-context-theme title: "@kbn/react-kibana-context-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-context-theme plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-context-theme'] --- import kbnReactKibanaContextThemeObj from './kbn_react_kibana_context_theme.devdocs.json'; diff --git a/api_docs/kbn_react_kibana_mount.mdx b/api_docs/kbn_react_kibana_mount.mdx index 25287d1e5121a..006305524b986 100644 --- a/api_docs/kbn_react_kibana_mount.mdx +++ b/api_docs/kbn_react_kibana_mount.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-react-kibana-mount title: "@kbn/react-kibana-mount" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/react-kibana-mount plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/react-kibana-mount'] --- import kbnReactKibanaMountObj from './kbn_react_kibana_mount.devdocs.json'; diff --git a/api_docs/kbn_recently_accessed.mdx b/api_docs/kbn_recently_accessed.mdx index 153ba757ecfba..adf8fe5077fa0 100644 --- a/api_docs/kbn_recently_accessed.mdx +++ b/api_docs/kbn_recently_accessed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-recently-accessed title: "@kbn/recently-accessed" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/recently-accessed plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/recently-accessed'] --- import kbnRecentlyAccessedObj from './kbn_recently_accessed.devdocs.json'; diff --git a/api_docs/kbn_repo_file_maps.mdx b/api_docs/kbn_repo_file_maps.mdx index 1960e76d166d9..d93d2db17f124 100644 --- a/api_docs/kbn_repo_file_maps.mdx +++ b/api_docs/kbn_repo_file_maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-file-maps title: "@kbn/repo-file-maps" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-file-maps plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-file-maps'] --- import kbnRepoFileMapsObj from './kbn_repo_file_maps.devdocs.json'; diff --git a/api_docs/kbn_repo_linter.mdx b/api_docs/kbn_repo_linter.mdx index ea46ec643dd22..812e529b58efb 100644 --- a/api_docs/kbn_repo_linter.mdx +++ b/api_docs/kbn_repo_linter.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-linter title: "@kbn/repo-linter" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-linter plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-linter'] --- import kbnRepoLinterObj from './kbn_repo_linter.devdocs.json'; diff --git a/api_docs/kbn_repo_path.mdx b/api_docs/kbn_repo_path.mdx index d0aee250e0c51..9ce6f4ea5a7a1 100644 --- a/api_docs/kbn_repo_path.mdx +++ b/api_docs/kbn_repo_path.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-path title: "@kbn/repo-path" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-path plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-path'] --- import kbnRepoPathObj from './kbn_repo_path.devdocs.json'; diff --git a/api_docs/kbn_repo_source_classifier.mdx b/api_docs/kbn_repo_source_classifier.mdx index 3c64cbb29283d..7b94869efb09a 100644 --- a/api_docs/kbn_repo_source_classifier.mdx +++ b/api_docs/kbn_repo_source_classifier.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-repo-source-classifier title: "@kbn/repo-source-classifier" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/repo-source-classifier plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/repo-source-classifier'] --- import kbnRepoSourceClassifierObj from './kbn_repo_source_classifier.devdocs.json'; diff --git a/api_docs/kbn_reporting_common.mdx b/api_docs/kbn_reporting_common.mdx index d78d79e1d7160..9ba7494da69ef 100644 --- a/api_docs/kbn_reporting_common.mdx +++ b/api_docs/kbn_reporting_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-common title: "@kbn/reporting-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-common'] --- import kbnReportingCommonObj from './kbn_reporting_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_csv_share_panel.mdx b/api_docs/kbn_reporting_csv_share_panel.mdx index f56f53b5e2903..a79dff7d86168 100644 --- a/api_docs/kbn_reporting_csv_share_panel.mdx +++ b/api_docs/kbn_reporting_csv_share_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-csv-share-panel title: "@kbn/reporting-csv-share-panel" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-csv-share-panel plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-csv-share-panel'] --- import kbnReportingCsvSharePanelObj from './kbn_reporting_csv_share_panel.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv.mdx b/api_docs/kbn_reporting_export_types_csv.mdx index fa26c2a100285..028eb8ebfb66f 100644 --- a/api_docs/kbn_reporting_export_types_csv.mdx +++ b/api_docs/kbn_reporting_export_types_csv.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv title: "@kbn/reporting-export-types-csv" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv'] --- import kbnReportingExportTypesCsvObj from './kbn_reporting_export_types_csv.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_csv_common.mdx b/api_docs/kbn_reporting_export_types_csv_common.mdx index 0fa7d009c6822..61ec22de4468d 100644 --- a/api_docs/kbn_reporting_export_types_csv_common.mdx +++ b/api_docs/kbn_reporting_export_types_csv_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-csv-common title: "@kbn/reporting-export-types-csv-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-csv-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-csv-common'] --- import kbnReportingExportTypesCsvCommonObj from './kbn_reporting_export_types_csv_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf.mdx b/api_docs/kbn_reporting_export_types_pdf.mdx index 5ad0e4c52f15f..645cdbb215dae 100644 --- a/api_docs/kbn_reporting_export_types_pdf.mdx +++ b/api_docs/kbn_reporting_export_types_pdf.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf title: "@kbn/reporting-export-types-pdf" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf'] --- import kbnReportingExportTypesPdfObj from './kbn_reporting_export_types_pdf.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_pdf_common.mdx b/api_docs/kbn_reporting_export_types_pdf_common.mdx index 152a44ba6ef65..632048c6cc368 100644 --- a/api_docs/kbn_reporting_export_types_pdf_common.mdx +++ b/api_docs/kbn_reporting_export_types_pdf_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-pdf-common title: "@kbn/reporting-export-types-pdf-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-pdf-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-pdf-common'] --- import kbnReportingExportTypesPdfCommonObj from './kbn_reporting_export_types_pdf_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png.mdx b/api_docs/kbn_reporting_export_types_png.mdx index 1788b1e47ef21..d82740a0f278d 100644 --- a/api_docs/kbn_reporting_export_types_png.mdx +++ b/api_docs/kbn_reporting_export_types_png.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png title: "@kbn/reporting-export-types-png" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png'] --- import kbnReportingExportTypesPngObj from './kbn_reporting_export_types_png.devdocs.json'; diff --git a/api_docs/kbn_reporting_export_types_png_common.mdx b/api_docs/kbn_reporting_export_types_png_common.mdx index 790c9cb7e87fc..ba95ffa1cfc0d 100644 --- a/api_docs/kbn_reporting_export_types_png_common.mdx +++ b/api_docs/kbn_reporting_export_types_png_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-export-types-png-common title: "@kbn/reporting-export-types-png-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-export-types-png-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-export-types-png-common'] --- import kbnReportingExportTypesPngCommonObj from './kbn_reporting_export_types_png_common.devdocs.json'; diff --git a/api_docs/kbn_reporting_mocks_server.mdx b/api_docs/kbn_reporting_mocks_server.mdx index 85b34a9afae6b..026322d91d840 100644 --- a/api_docs/kbn_reporting_mocks_server.mdx +++ b/api_docs/kbn_reporting_mocks_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-mocks-server title: "@kbn/reporting-mocks-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-mocks-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-mocks-server'] --- import kbnReportingMocksServerObj from './kbn_reporting_mocks_server.devdocs.json'; diff --git a/api_docs/kbn_reporting_public.mdx b/api_docs/kbn_reporting_public.mdx index 96117d9ae219b..f3591af2062cb 100644 --- a/api_docs/kbn_reporting_public.mdx +++ b/api_docs/kbn_reporting_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-public title: "@kbn/reporting-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-public plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-public'] --- import kbnReportingPublicObj from './kbn_reporting_public.devdocs.json'; diff --git a/api_docs/kbn_reporting_server.mdx b/api_docs/kbn_reporting_server.mdx index 27af5a2c3a766..fa3d83f3456be 100644 --- a/api_docs/kbn_reporting_server.mdx +++ b/api_docs/kbn_reporting_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-reporting-server title: "@kbn/reporting-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/reporting-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/reporting-server'] --- import kbnReportingServerObj from './kbn_reporting_server.devdocs.json'; diff --git a/api_docs/kbn_resizable_layout.mdx b/api_docs/kbn_resizable_layout.mdx index 1c1e5d2934a89..b37c848c7bf7e 100644 --- a/api_docs/kbn_resizable_layout.mdx +++ b/api_docs/kbn_resizable_layout.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-resizable-layout title: "@kbn/resizable-layout" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/resizable-layout plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/resizable-layout'] --- import kbnResizableLayoutObj from './kbn_resizable_layout.devdocs.json'; diff --git a/api_docs/kbn_response_ops_feature_flag_service.mdx b/api_docs/kbn_response_ops_feature_flag_service.mdx index c27839b45ea41..b08ec20208150 100644 --- a/api_docs/kbn_response_ops_feature_flag_service.mdx +++ b/api_docs/kbn_response_ops_feature_flag_service.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-response-ops-feature-flag-service title: "@kbn/response-ops-feature-flag-service" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/response-ops-feature-flag-service plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/response-ops-feature-flag-service'] --- import kbnResponseOpsFeatureFlagServiceObj from './kbn_response_ops_feature_flag_service.devdocs.json'; diff --git a/api_docs/kbn_rison.mdx b/api_docs/kbn_rison.mdx index 4bb4d9ac2b3eb..974db7be301fc 100644 --- a/api_docs/kbn_rison.mdx +++ b/api_docs/kbn_rison.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rison title: "@kbn/rison" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rison plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rison'] --- import kbnRisonObj from './kbn_rison.devdocs.json'; diff --git a/api_docs/kbn_rollup.mdx b/api_docs/kbn_rollup.mdx index 6ad738e9b689e..8da8bb52414c1 100644 --- a/api_docs/kbn_rollup.mdx +++ b/api_docs/kbn_rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rollup title: "@kbn/rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rollup plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rollup'] --- import kbnRollupObj from './kbn_rollup.devdocs.json'; diff --git a/api_docs/kbn_router_to_openapispec.mdx b/api_docs/kbn_router_to_openapispec.mdx index 7efaac95e0449..867fb75bc08bb 100644 --- a/api_docs/kbn_router_to_openapispec.mdx +++ b/api_docs/kbn_router_to_openapispec.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-to-openapispec title: "@kbn/router-to-openapispec" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-to-openapispec plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-to-openapispec'] --- import kbnRouterToOpenapispecObj from './kbn_router_to_openapispec.devdocs.json'; diff --git a/api_docs/kbn_router_utils.mdx b/api_docs/kbn_router_utils.mdx index bd47acaa7fc1d..e5c4d33708fa6 100644 --- a/api_docs/kbn_router_utils.mdx +++ b/api_docs/kbn_router_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-router-utils title: "@kbn/router-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/router-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/router-utils'] --- import kbnRouterUtilsObj from './kbn_router_utils.devdocs.json'; diff --git a/api_docs/kbn_rrule.mdx b/api_docs/kbn_rrule.mdx index 46092536c1545..a6cc8683ff9ae 100644 --- a/api_docs/kbn_rrule.mdx +++ b/api_docs/kbn_rrule.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rrule title: "@kbn/rrule" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rrule plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rrule'] --- import kbnRruleObj from './kbn_rrule.devdocs.json'; diff --git a/api_docs/kbn_rule_data_utils.mdx b/api_docs/kbn_rule_data_utils.mdx index 6af72e2e97953..95fd393e44a4f 100644 --- a/api_docs/kbn_rule_data_utils.mdx +++ b/api_docs/kbn_rule_data_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-rule-data-utils title: "@kbn/rule-data-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/rule-data-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/rule-data-utils'] --- import kbnRuleDataUtilsObj from './kbn_rule_data_utils.devdocs.json'; diff --git a/api_docs/kbn_saved_objects_settings.mdx b/api_docs/kbn_saved_objects_settings.mdx index d010c9f8fec37..a679e730118ea 100644 --- a/api_docs/kbn_saved_objects_settings.mdx +++ b/api_docs/kbn_saved_objects_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-saved-objects-settings title: "@kbn/saved-objects-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/saved-objects-settings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/saved-objects-settings'] --- import kbnSavedObjectsSettingsObj from './kbn_saved_objects_settings.devdocs.json'; diff --git a/api_docs/kbn_search_api_panels.mdx b/api_docs/kbn_search_api_panels.mdx index 254448e84b407..66282e92d3e78 100644 --- a/api_docs/kbn_search_api_panels.mdx +++ b/api_docs/kbn_search_api_panels.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-api-panels title: "@kbn/search-api-panels" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-api-panels plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-api-panels'] --- import kbnSearchApiPanelsObj from './kbn_search_api_panels.devdocs.json'; diff --git a/api_docs/kbn_search_connectors.mdx b/api_docs/kbn_search_connectors.mdx index 07836d532f632..87a453cb6f887 100644 --- a/api_docs/kbn_search_connectors.mdx +++ b/api_docs/kbn_search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-connectors title: "@kbn/search-connectors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-connectors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-connectors'] --- import kbnSearchConnectorsObj from './kbn_search_connectors.devdocs.json'; diff --git a/api_docs/kbn_search_errors.mdx b/api_docs/kbn_search_errors.mdx index aca6059f7f40e..5737a07c0c185 100644 --- a/api_docs/kbn_search_errors.mdx +++ b/api_docs/kbn_search_errors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-errors title: "@kbn/search-errors" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-errors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-errors'] --- import kbnSearchErrorsObj from './kbn_search_errors.devdocs.json'; diff --git a/api_docs/kbn_search_index_documents.mdx b/api_docs/kbn_search_index_documents.mdx index 1c67bd5f102bc..3ea0bb629272f 100644 --- a/api_docs/kbn_search_index_documents.mdx +++ b/api_docs/kbn_search_index_documents.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-index-documents title: "@kbn/search-index-documents" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-index-documents plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-index-documents'] --- import kbnSearchIndexDocumentsObj from './kbn_search_index_documents.devdocs.json'; diff --git a/api_docs/kbn_search_response_warnings.mdx b/api_docs/kbn_search_response_warnings.mdx index 1f55956fea689..5aba9be63c6dd 100644 --- a/api_docs/kbn_search_response_warnings.mdx +++ b/api_docs/kbn_search_response_warnings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-response-warnings title: "@kbn/search-response-warnings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-response-warnings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-response-warnings'] --- import kbnSearchResponseWarningsObj from './kbn_search_response_warnings.devdocs.json'; diff --git a/api_docs/kbn_search_types.mdx b/api_docs/kbn_search_types.mdx index 099488e1d80a6..12032fac42b29 100644 --- a/api_docs/kbn_search_types.mdx +++ b/api_docs/kbn_search_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-search-types title: "@kbn/search-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/search-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/search-types'] --- import kbnSearchTypesObj from './kbn_search_types.devdocs.json'; diff --git a/api_docs/kbn_security_api_key_management.mdx b/api_docs/kbn_security_api_key_management.mdx index 874e8799ab17b..c86e68d54c29d 100644 --- a/api_docs/kbn_security_api_key_management.mdx +++ b/api_docs/kbn_security_api_key_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-api-key-management title: "@kbn/security-api-key-management" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-api-key-management plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-api-key-management'] --- import kbnSecurityApiKeyManagementObj from './kbn_security_api_key_management.devdocs.json'; diff --git a/api_docs/kbn_security_form_components.mdx b/api_docs/kbn_security_form_components.mdx index 8cd10f85b12aa..7b198b475a80e 100644 --- a/api_docs/kbn_security_form_components.mdx +++ b/api_docs/kbn_security_form_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-form-components title: "@kbn/security-form-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-form-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-form-components'] --- import kbnSecurityFormComponentsObj from './kbn_security_form_components.devdocs.json'; diff --git a/api_docs/kbn_security_hardening.mdx b/api_docs/kbn_security_hardening.mdx index ea6972bdbf089..2f3f370a8ab7e 100644 --- a/api_docs/kbn_security_hardening.mdx +++ b/api_docs/kbn_security_hardening.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-hardening title: "@kbn/security-hardening" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-hardening plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-hardening'] --- import kbnSecurityHardeningObj from './kbn_security_hardening.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_common.mdx b/api_docs/kbn_security_plugin_types_common.mdx index 1307bc613d704..3780a1ccc3385 100644 --- a/api_docs/kbn_security_plugin_types_common.mdx +++ b/api_docs/kbn_security_plugin_types_common.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-common title: "@kbn/security-plugin-types-common" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-common plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-common'] --- import kbnSecurityPluginTypesCommonObj from './kbn_security_plugin_types_common.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_public.mdx b/api_docs/kbn_security_plugin_types_public.mdx index 01ff666d6d37d..1d33d2dac7e4e 100644 --- a/api_docs/kbn_security_plugin_types_public.mdx +++ b/api_docs/kbn_security_plugin_types_public.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-public title: "@kbn/security-plugin-types-public" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-public plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-public'] --- import kbnSecurityPluginTypesPublicObj from './kbn_security_plugin_types_public.devdocs.json'; diff --git a/api_docs/kbn_security_plugin_types_server.devdocs.json b/api_docs/kbn_security_plugin_types_server.devdocs.json index abb4a1d8b9e5f..2dc9cb998613d 100644 --- a/api_docs/kbn_security_plugin_types_server.devdocs.json +++ b/api_docs/kbn_security_plugin_types_server.devdocs.json @@ -4344,10 +4344,6 @@ "plugin": "entityManager", "path": "x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/disable.ts" }, - { - "plugin": "observabilityOnboarding", - "path": "x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts" - }, { "plugin": "synthetics", "path": "x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts" diff --git a/api_docs/kbn_security_plugin_types_server.mdx b/api_docs/kbn_security_plugin_types_server.mdx index e310b41df1ccb..4757c78e20b3f 100644 --- a/api_docs/kbn_security_plugin_types_server.mdx +++ b/api_docs/kbn_security_plugin_types_server.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-plugin-types-server title: "@kbn/security-plugin-types-server" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-plugin-types-server plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-plugin-types-server'] --- import kbnSecurityPluginTypesServerObj from './kbn_security_plugin_types_server.devdocs.json'; diff --git a/api_docs/kbn_security_solution_distribution_bar.mdx b/api_docs/kbn_security_solution_distribution_bar.mdx index f80d2c071c730..b77937713a907 100644 --- a/api_docs/kbn_security_solution_distribution_bar.mdx +++ b/api_docs/kbn_security_solution_distribution_bar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-distribution-bar title: "@kbn/security-solution-distribution-bar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-distribution-bar plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-distribution-bar'] --- import kbnSecuritySolutionDistributionBarObj from './kbn_security_solution_distribution_bar.devdocs.json'; diff --git a/api_docs/kbn_security_solution_features.mdx b/api_docs/kbn_security_solution_features.mdx index e19e6e1ee366c..9bbd43a24c5f9 100644 --- a/api_docs/kbn_security_solution_features.mdx +++ b/api_docs/kbn_security_solution_features.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-features title: "@kbn/security-solution-features" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-features plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-features'] --- import kbnSecuritySolutionFeaturesObj from './kbn_security_solution_features.devdocs.json'; diff --git a/api_docs/kbn_security_solution_navigation.mdx b/api_docs/kbn_security_solution_navigation.mdx index 008f23f09bdad..92584d4409be9 100644 --- a/api_docs/kbn_security_solution_navigation.mdx +++ b/api_docs/kbn_security_solution_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-navigation title: "@kbn/security-solution-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-navigation plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-navigation'] --- import kbnSecuritySolutionNavigationObj from './kbn_security_solution_navigation.devdocs.json'; diff --git a/api_docs/kbn_security_solution_side_nav.mdx b/api_docs/kbn_security_solution_side_nav.mdx index 1e402b7a54b25..3cd265269307f 100644 --- a/api_docs/kbn_security_solution_side_nav.mdx +++ b/api_docs/kbn_security_solution_side_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-side-nav title: "@kbn/security-solution-side-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-side-nav plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-side-nav'] --- import kbnSecuritySolutionSideNavObj from './kbn_security_solution_side_nav.devdocs.json'; diff --git a/api_docs/kbn_security_solution_storybook_config.mdx b/api_docs/kbn_security_solution_storybook_config.mdx index 8be0c96fffd0f..de2793747d980 100644 --- a/api_docs/kbn_security_solution_storybook_config.mdx +++ b/api_docs/kbn_security_solution_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-security-solution-storybook-config title: "@kbn/security-solution-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/security-solution-storybook-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/security-solution-storybook-config'] --- import kbnSecuritySolutionStorybookConfigObj from './kbn_security_solution_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_autocomplete.mdx b/api_docs/kbn_securitysolution_autocomplete.mdx index 3ee290e61263a..19b4a0b3e6400 100644 --- a/api_docs/kbn_securitysolution_autocomplete.mdx +++ b/api_docs/kbn_securitysolution_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-autocomplete title: "@kbn/securitysolution-autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-autocomplete plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-autocomplete'] --- import kbnSecuritysolutionAutocompleteObj from './kbn_securitysolution_autocomplete.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_data_table.mdx b/api_docs/kbn_securitysolution_data_table.mdx index 8963dbad26426..3485fc785d757 100644 --- a/api_docs/kbn_securitysolution_data_table.mdx +++ b/api_docs/kbn_securitysolution_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-data-table title: "@kbn/securitysolution-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-data-table plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-data-table'] --- import kbnSecuritysolutionDataTableObj from './kbn_securitysolution_data_table.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_ecs.mdx b/api_docs/kbn_securitysolution_ecs.mdx index 1930f04ab2a50..75b5ccd664a22 100644 --- a/api_docs/kbn_securitysolution_ecs.mdx +++ b/api_docs/kbn_securitysolution_ecs.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-ecs title: "@kbn/securitysolution-ecs" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-ecs plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-ecs'] --- import kbnSecuritysolutionEcsObj from './kbn_securitysolution_ecs.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_es_utils.mdx b/api_docs/kbn_securitysolution_es_utils.mdx index ffeefe64ce0b8..f60e142b97e7c 100644 --- a/api_docs/kbn_securitysolution_es_utils.mdx +++ b/api_docs/kbn_securitysolution_es_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-es-utils title: "@kbn/securitysolution-es-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-es-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-es-utils'] --- import kbnSecuritysolutionEsUtilsObj from './kbn_securitysolution_es_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_exception_list_components.mdx b/api_docs/kbn_securitysolution_exception_list_components.mdx index 604444088b9d3..209c3b94362b1 100644 --- a/api_docs/kbn_securitysolution_exception_list_components.mdx +++ b/api_docs/kbn_securitysolution_exception_list_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-exception-list-components title: "@kbn/securitysolution-exception-list-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-exception-list-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-exception-list-components'] --- import kbnSecuritysolutionExceptionListComponentsObj from './kbn_securitysolution_exception_list_components.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_hook_utils.mdx b/api_docs/kbn_securitysolution_hook_utils.mdx index 6a12e788897fa..9a9009639d6b2 100644 --- a/api_docs/kbn_securitysolution_hook_utils.mdx +++ b/api_docs/kbn_securitysolution_hook_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-hook-utils title: "@kbn/securitysolution-hook-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-hook-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-hook-utils'] --- import kbnSecuritysolutionHookUtilsObj from './kbn_securitysolution_hook_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx index dd9efb75883db..ab5a7ad4b3891 100644 --- a/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_alerting_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-alerting-types title: "@kbn/securitysolution-io-ts-alerting-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-alerting-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-alerting-types'] --- import kbnSecuritysolutionIoTsAlertingTypesObj from './kbn_securitysolution_io_ts_alerting_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_list_types.mdx b/api_docs/kbn_securitysolution_io_ts_list_types.mdx index b042649fa2dce..283f95e6b8938 100644 --- a/api_docs/kbn_securitysolution_io_ts_list_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_list_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-list-types title: "@kbn/securitysolution-io-ts-list-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-list-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-list-types'] --- import kbnSecuritysolutionIoTsListTypesObj from './kbn_securitysolution_io_ts_list_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_types.mdx b/api_docs/kbn_securitysolution_io_ts_types.mdx index 9df0d98a6c411..8cb9ba4f73ee6 100644 --- a/api_docs/kbn_securitysolution_io_ts_types.mdx +++ b/api_docs/kbn_securitysolution_io_ts_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-types title: "@kbn/securitysolution-io-ts-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-types'] --- import kbnSecuritysolutionIoTsTypesObj from './kbn_securitysolution_io_ts_types.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_io_ts_utils.mdx b/api_docs/kbn_securitysolution_io_ts_utils.mdx index 1105b29cb82e1..6ac434bf9620d 100644 --- a/api_docs/kbn_securitysolution_io_ts_utils.mdx +++ b/api_docs/kbn_securitysolution_io_ts_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-io-ts-utils title: "@kbn/securitysolution-io-ts-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-io-ts-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-io-ts-utils'] --- import kbnSecuritysolutionIoTsUtilsObj from './kbn_securitysolution_io_ts_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_api.mdx b/api_docs/kbn_securitysolution_list_api.mdx index c0d9290d06f0a..53590adc56bb2 100644 --- a/api_docs/kbn_securitysolution_list_api.mdx +++ b/api_docs/kbn_securitysolution_list_api.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-api title: "@kbn/securitysolution-list-api" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-api plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-api'] --- import kbnSecuritysolutionListApiObj from './kbn_securitysolution_list_api.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_constants.mdx b/api_docs/kbn_securitysolution_list_constants.mdx index 70a2cfd8354d5..16e3ce5f61dfe 100644 --- a/api_docs/kbn_securitysolution_list_constants.mdx +++ b/api_docs/kbn_securitysolution_list_constants.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-constants title: "@kbn/securitysolution-list-constants" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-constants plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-constants'] --- import kbnSecuritysolutionListConstantsObj from './kbn_securitysolution_list_constants.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_hooks.mdx b/api_docs/kbn_securitysolution_list_hooks.mdx index 9630f729db647..d8445ab2f6b3d 100644 --- a/api_docs/kbn_securitysolution_list_hooks.mdx +++ b/api_docs/kbn_securitysolution_list_hooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-hooks title: "@kbn/securitysolution-list-hooks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-hooks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-hooks'] --- import kbnSecuritysolutionListHooksObj from './kbn_securitysolution_list_hooks.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_list_utils.mdx b/api_docs/kbn_securitysolution_list_utils.mdx index 558eae3413128..8d69beb152f0c 100644 --- a/api_docs/kbn_securitysolution_list_utils.mdx +++ b/api_docs/kbn_securitysolution_list_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-list-utils title: "@kbn/securitysolution-list-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-list-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-list-utils'] --- import kbnSecuritysolutionListUtilsObj from './kbn_securitysolution_list_utils.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_rules.mdx b/api_docs/kbn_securitysolution_rules.mdx index 4d3b80ed95b2b..61c5a898e4f83 100644 --- a/api_docs/kbn_securitysolution_rules.mdx +++ b/api_docs/kbn_securitysolution_rules.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-rules title: "@kbn/securitysolution-rules" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-rules plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-rules'] --- import kbnSecuritysolutionRulesObj from './kbn_securitysolution_rules.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_t_grid.mdx b/api_docs/kbn_securitysolution_t_grid.mdx index d9663ee88241e..cced6ca3a4a8b 100644 --- a/api_docs/kbn_securitysolution_t_grid.mdx +++ b/api_docs/kbn_securitysolution_t_grid.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-t-grid title: "@kbn/securitysolution-t-grid" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-t-grid plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-t-grid'] --- import kbnSecuritysolutionTGridObj from './kbn_securitysolution_t_grid.devdocs.json'; diff --git a/api_docs/kbn_securitysolution_utils.mdx b/api_docs/kbn_securitysolution_utils.mdx index 7c5a315a5caba..a1ecb4fdbdca6 100644 --- a/api_docs/kbn_securitysolution_utils.mdx +++ b/api_docs/kbn_securitysolution_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-securitysolution-utils title: "@kbn/securitysolution-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/securitysolution-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/securitysolution-utils'] --- import kbnSecuritysolutionUtilsObj from './kbn_securitysolution_utils.devdocs.json'; diff --git a/api_docs/kbn_server_http_tools.mdx b/api_docs/kbn_server_http_tools.mdx index eb5cf4621a174..20039ef8e7788 100644 --- a/api_docs/kbn_server_http_tools.mdx +++ b/api_docs/kbn_server_http_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-http-tools title: "@kbn/server-http-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-http-tools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-http-tools'] --- import kbnServerHttpToolsObj from './kbn_server_http_tools.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository.mdx b/api_docs/kbn_server_route_repository.mdx index 7517f39dbe1b8..3736aba4bc108 100644 --- a/api_docs/kbn_server_route_repository.mdx +++ b/api_docs/kbn_server_route_repository.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository title: "@kbn/server-route-repository" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository'] --- import kbnServerRouteRepositoryObj from './kbn_server_route_repository.devdocs.json'; diff --git a/api_docs/kbn_server_route_repository_utils.mdx b/api_docs/kbn_server_route_repository_utils.mdx index 83b0a3e264edd..a941fd4c47aed 100644 --- a/api_docs/kbn_server_route_repository_utils.mdx +++ b/api_docs/kbn_server_route_repository_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-server-route-repository-utils title: "@kbn/server-route-repository-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/server-route-repository-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/server-route-repository-utils'] --- import kbnServerRouteRepositoryUtilsObj from './kbn_server_route_repository_utils.devdocs.json'; diff --git a/api_docs/kbn_serverless_common_settings.mdx b/api_docs/kbn_serverless_common_settings.mdx index 7f022b5306583..1b837eb871f5a 100644 --- a/api_docs/kbn_serverless_common_settings.mdx +++ b/api_docs/kbn_serverless_common_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-common-settings title: "@kbn/serverless-common-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-common-settings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-common-settings'] --- import kbnServerlessCommonSettingsObj from './kbn_serverless_common_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_observability_settings.mdx b/api_docs/kbn_serverless_observability_settings.mdx index 6b004d10d91c8..7ca21f443fcdf 100644 --- a/api_docs/kbn_serverless_observability_settings.mdx +++ b/api_docs/kbn_serverless_observability_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-observability-settings title: "@kbn/serverless-observability-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-observability-settings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-observability-settings'] --- import kbnServerlessObservabilitySettingsObj from './kbn_serverless_observability_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_project_switcher.mdx b/api_docs/kbn_serverless_project_switcher.mdx index c2f9b7aefce10..4dbe840bc7698 100644 --- a/api_docs/kbn_serverless_project_switcher.mdx +++ b/api_docs/kbn_serverless_project_switcher.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-project-switcher title: "@kbn/serverless-project-switcher" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-project-switcher plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-project-switcher'] --- import kbnServerlessProjectSwitcherObj from './kbn_serverless_project_switcher.devdocs.json'; diff --git a/api_docs/kbn_serverless_search_settings.mdx b/api_docs/kbn_serverless_search_settings.mdx index 19e326b5fa82f..573885b39cc53 100644 --- a/api_docs/kbn_serverless_search_settings.mdx +++ b/api_docs/kbn_serverless_search_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-search-settings title: "@kbn/serverless-search-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-search-settings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-search-settings'] --- import kbnServerlessSearchSettingsObj from './kbn_serverless_search_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_security_settings.mdx b/api_docs/kbn_serverless_security_settings.mdx index f9faa1b5ea5d2..025595e572c15 100644 --- a/api_docs/kbn_serverless_security_settings.mdx +++ b/api_docs/kbn_serverless_security_settings.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-security-settings title: "@kbn/serverless-security-settings" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-security-settings plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-security-settings'] --- import kbnServerlessSecuritySettingsObj from './kbn_serverless_security_settings.devdocs.json'; diff --git a/api_docs/kbn_serverless_storybook_config.mdx b/api_docs/kbn_serverless_storybook_config.mdx index 83bd175ccef15..698fa0856fdce 100644 --- a/api_docs/kbn_serverless_storybook_config.mdx +++ b/api_docs/kbn_serverless_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-serverless-storybook-config title: "@kbn/serverless-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/serverless-storybook-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/serverless-storybook-config'] --- import kbnServerlessStorybookConfigObj from './kbn_serverless_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_svg.mdx b/api_docs/kbn_shared_svg.mdx index 653ff2dcec448..d64bf1aee4050 100644 --- a/api_docs/kbn_shared_svg.mdx +++ b/api_docs/kbn_shared_svg.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-svg title: "@kbn/shared-svg" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-svg plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-svg'] --- import kbnSharedSvgObj from './kbn_shared_svg.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_avatar_solution.mdx b/api_docs/kbn_shared_ux_avatar_solution.mdx index 1f75fbf7b5c59..f5a5349d4638a 100644 --- a/api_docs/kbn_shared_ux_avatar_solution.mdx +++ b/api_docs/kbn_shared_ux_avatar_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-avatar-solution title: "@kbn/shared-ux-avatar-solution" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-avatar-solution plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-avatar-solution'] --- import kbnSharedUxAvatarSolutionObj from './kbn_shared_ux_avatar_solution.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx index ac518aa359a0c..a239fefd7c0dd 100644 --- a/api_docs/kbn_shared_ux_button_exit_full_screen.mdx +++ b/api_docs/kbn_shared_ux_button_exit_full_screen.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-exit-full-screen title: "@kbn/shared-ux-button-exit-full-screen" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-exit-full-screen plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-exit-full-screen'] --- import kbnSharedUxButtonExitFullScreenObj from './kbn_shared_ux_button_exit_full_screen.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_button_toolbar.mdx b/api_docs/kbn_shared_ux_button_toolbar.mdx index db99772ea5042..a5f0a4ef5332d 100644 --- a/api_docs/kbn_shared_ux_button_toolbar.mdx +++ b/api_docs/kbn_shared_ux_button_toolbar.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-button-toolbar title: "@kbn/shared-ux-button-toolbar" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-button-toolbar plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-button-toolbar'] --- import kbnSharedUxButtonToolbarObj from './kbn_shared_ux_button_toolbar.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data.mdx b/api_docs/kbn_shared_ux_card_no_data.mdx index 6978e9d4038b9..30f5e477058eb 100644 --- a/api_docs/kbn_shared_ux_card_no_data.mdx +++ b/api_docs/kbn_shared_ux_card_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data title: "@kbn/shared-ux-card-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data'] --- import kbnSharedUxCardNoDataObj from './kbn_shared_ux_card_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx index 04ec969a2bbdb..d604b6cd95066 100644 --- a/api_docs/kbn_shared_ux_card_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_card_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-card-no-data-mocks title: "@kbn/shared-ux-card-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-card-no-data-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-card-no-data-mocks'] --- import kbnSharedUxCardNoDataMocksObj from './kbn_shared_ux_card_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_chrome_navigation.mdx b/api_docs/kbn_shared_ux_chrome_navigation.mdx index 53aaa00b4991d..daed35ea7a120 100644 --- a/api_docs/kbn_shared_ux_chrome_navigation.mdx +++ b/api_docs/kbn_shared_ux_chrome_navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-chrome-navigation title: "@kbn/shared-ux-chrome-navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-chrome-navigation plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-chrome-navigation'] --- import kbnSharedUxChromeNavigationObj from './kbn_shared_ux_chrome_navigation.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_error_boundary.mdx b/api_docs/kbn_shared_ux_error_boundary.mdx index 24540524aa12d..1c506b14f754d 100644 --- a/api_docs/kbn_shared_ux_error_boundary.mdx +++ b/api_docs/kbn_shared_ux_error_boundary.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-error-boundary title: "@kbn/shared-ux-error-boundary" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-error-boundary plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-error-boundary'] --- import kbnSharedUxErrorBoundaryObj from './kbn_shared_ux_error_boundary.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_context.mdx b/api_docs/kbn_shared_ux_file_context.mdx index 8d988d8d9434d..1d66ca2e75ebd 100644 --- a/api_docs/kbn_shared_ux_file_context.mdx +++ b/api_docs/kbn_shared_ux_file_context.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-context title: "@kbn/shared-ux-file-context" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-context plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-context'] --- import kbnSharedUxFileContextObj from './kbn_shared_ux_file_context.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image.mdx b/api_docs/kbn_shared_ux_file_image.mdx index a4e91f8013304..fa6fb520e28a8 100644 --- a/api_docs/kbn_shared_ux_file_image.mdx +++ b/api_docs/kbn_shared_ux_file_image.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image title: "@kbn/shared-ux-file-image" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image'] --- import kbnSharedUxFileImageObj from './kbn_shared_ux_file_image.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_image_mocks.mdx b/api_docs/kbn_shared_ux_file_image_mocks.mdx index ea2dff3601ce4..f0b649fa9031b 100644 --- a/api_docs/kbn_shared_ux_file_image_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_image_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-image-mocks title: "@kbn/shared-ux-file-image-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-image-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-image-mocks'] --- import kbnSharedUxFileImageMocksObj from './kbn_shared_ux_file_image_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_mocks.mdx b/api_docs/kbn_shared_ux_file_mocks.mdx index 2a47150858bbb..36ecaa0275b50 100644 --- a/api_docs/kbn_shared_ux_file_mocks.mdx +++ b/api_docs/kbn_shared_ux_file_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-mocks title: "@kbn/shared-ux-file-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-mocks'] --- import kbnSharedUxFileMocksObj from './kbn_shared_ux_file_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_picker.mdx b/api_docs/kbn_shared_ux_file_picker.mdx index 709dec8877b2e..85ed33fc09dc4 100644 --- a/api_docs/kbn_shared_ux_file_picker.mdx +++ b/api_docs/kbn_shared_ux_file_picker.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-picker title: "@kbn/shared-ux-file-picker" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-picker plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-picker'] --- import kbnSharedUxFilePickerObj from './kbn_shared_ux_file_picker.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_types.mdx b/api_docs/kbn_shared_ux_file_types.mdx index af6e32e715a75..8a89c96505336 100644 --- a/api_docs/kbn_shared_ux_file_types.mdx +++ b/api_docs/kbn_shared_ux_file_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-types title: "@kbn/shared-ux-file-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-types'] --- import kbnSharedUxFileTypesObj from './kbn_shared_ux_file_types.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_upload.mdx b/api_docs/kbn_shared_ux_file_upload.mdx index fc6d5ba82c9cc..fdc2e20bbde02 100644 --- a/api_docs/kbn_shared_ux_file_upload.mdx +++ b/api_docs/kbn_shared_ux_file_upload.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-upload title: "@kbn/shared-ux-file-upload" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-upload plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-upload'] --- import kbnSharedUxFileUploadObj from './kbn_shared_ux_file_upload.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_file_util.mdx b/api_docs/kbn_shared_ux_file_util.mdx index e77b1a6748972..ea81428223d7c 100644 --- a/api_docs/kbn_shared_ux_file_util.mdx +++ b/api_docs/kbn_shared_ux_file_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-file-util title: "@kbn/shared-ux-file-util" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-file-util plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-file-util'] --- import kbnSharedUxFileUtilObj from './kbn_shared_ux_file_util.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app.mdx b/api_docs/kbn_shared_ux_link_redirect_app.mdx index 5ee8875754489..8e42f780ddda8 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app title: "@kbn/shared-ux-link-redirect-app" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app'] --- import kbnSharedUxLinkRedirectAppObj from './kbn_shared_ux_link_redirect_app.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx index 2b548cdf44f34..b235f6470d42f 100644 --- a/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx +++ b/api_docs/kbn_shared_ux_link_redirect_app_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-link-redirect-app-mocks title: "@kbn/shared-ux-link-redirect-app-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-link-redirect-app-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-link-redirect-app-mocks'] --- import kbnSharedUxLinkRedirectAppMocksObj from './kbn_shared_ux_link_redirect_app_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown.mdx b/api_docs/kbn_shared_ux_markdown.mdx index a62a0e3f64501..4beb17231d7f2 100644 --- a/api_docs/kbn_shared_ux_markdown.mdx +++ b/api_docs/kbn_shared_ux_markdown.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown title: "@kbn/shared-ux-markdown" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown'] --- import kbnSharedUxMarkdownObj from './kbn_shared_ux_markdown.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_markdown_mocks.mdx b/api_docs/kbn_shared_ux_markdown_mocks.mdx index 5d147d9d3ad8f..0921d8191775e 100644 --- a/api_docs/kbn_shared_ux_markdown_mocks.mdx +++ b/api_docs/kbn_shared_ux_markdown_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-markdown-mocks title: "@kbn/shared-ux-markdown-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-markdown-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-markdown-mocks'] --- import kbnSharedUxMarkdownMocksObj from './kbn_shared_ux_markdown_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx index 7fc33afe4095c..a64436a339a06 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data title: "@kbn/shared-ux-page-analytics-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data'] --- import kbnSharedUxPageAnalyticsNoDataObj from './kbn_shared_ux_page_analytics_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx index 82d3a565bd168..da79f5ff595d0 100644 --- a/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_analytics_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-analytics-no-data-mocks title: "@kbn/shared-ux-page-analytics-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-analytics-no-data-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-analytics-no-data-mocks'] --- import kbnSharedUxPageAnalyticsNoDataMocksObj from './kbn_shared_ux_page_analytics_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx index 6dcfd4499e31c..b917beea797db 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data title: "@kbn/shared-ux-page-kibana-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data'] --- import kbnSharedUxPageKibanaNoDataObj from './kbn_shared_ux_page_kibana_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx index 3abf181f237ef..f319c3039d9c5 100644 --- a/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-no-data-mocks title: "@kbn/shared-ux-page-kibana-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-no-data-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-no-data-mocks'] --- import kbnSharedUxPageKibanaNoDataMocksObj from './kbn_shared_ux_page_kibana_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template.mdx b/api_docs/kbn_shared_ux_page_kibana_template.mdx index e9cb82843b23c..9c46fd9872c5a 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template title: "@kbn/shared-ux-page-kibana-template" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template'] --- import kbnSharedUxPageKibanaTemplateObj from './kbn_shared_ux_page_kibana_template.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx index 97ecc57de6391..0b3eaf5f757f2 100644 --- a/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_kibana_template_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-kibana-template-mocks title: "@kbn/shared-ux-page-kibana-template-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-kibana-template-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-kibana-template-mocks'] --- import kbnSharedUxPageKibanaTemplateMocksObj from './kbn_shared_ux_page_kibana_template_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data.mdx b/api_docs/kbn_shared_ux_page_no_data.mdx index 29798ee008fb5..6318decfa8881 100644 --- a/api_docs/kbn_shared_ux_page_no_data.mdx +++ b/api_docs/kbn_shared_ux_page_no_data.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data title: "@kbn/shared-ux-page-no-data" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data'] --- import kbnSharedUxPageNoDataObj from './kbn_shared_ux_page_no_data.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config.mdx b/api_docs/kbn_shared_ux_page_no_data_config.mdx index 60e8754d39ecb..e4e0854ca28fa 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config title: "@kbn/shared-ux-page-no-data-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config'] --- import kbnSharedUxPageNoDataConfigObj from './kbn_shared_ux_page_no_data_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx index e05836c8c3b64..17790a97e02a6 100644 --- a/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_config_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-config-mocks title: "@kbn/shared-ux-page-no-data-config-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-config-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-config-mocks'] --- import kbnSharedUxPageNoDataConfigMocksObj from './kbn_shared_ux_page_no_data_config_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx index e7cce9c44328e..ff836719c97a9 100644 --- a/api_docs/kbn_shared_ux_page_no_data_mocks.mdx +++ b/api_docs/kbn_shared_ux_page_no_data_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-no-data-mocks title: "@kbn/shared-ux-page-no-data-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-no-data-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-no-data-mocks'] --- import kbnSharedUxPageNoDataMocksObj from './kbn_shared_ux_page_no_data_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_page_solution_nav.mdx b/api_docs/kbn_shared_ux_page_solution_nav.mdx index f5d3a81db63d9..96e45e580ee53 100644 --- a/api_docs/kbn_shared_ux_page_solution_nav.mdx +++ b/api_docs/kbn_shared_ux_page_solution_nav.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-page-solution-nav title: "@kbn/shared-ux-page-solution-nav" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-page-solution-nav plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-page-solution-nav'] --- import kbnSharedUxPageSolutionNavObj from './kbn_shared_ux_page_solution_nav.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx index 544caa1ac2a42..fd976f45b320c 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views title: "@kbn/shared-ux-prompt-no-data-views" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views'] --- import kbnSharedUxPromptNoDataViewsObj from './kbn_shared_ux_prompt_no_data_views.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx index f7129123aea6b..f01e1c43068ff 100644 --- a/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx +++ b/api_docs/kbn_shared_ux_prompt_no_data_views_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-no-data-views-mocks title: "@kbn/shared-ux-prompt-no-data-views-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-no-data-views-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-no-data-views-mocks'] --- import kbnSharedUxPromptNoDataViewsMocksObj from './kbn_shared_ux_prompt_no_data_views_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_prompt_not_found.mdx b/api_docs/kbn_shared_ux_prompt_not_found.mdx index dfa6d2c9e8cad..a67ff92ec019a 100644 --- a/api_docs/kbn_shared_ux_prompt_not_found.mdx +++ b/api_docs/kbn_shared_ux_prompt_not_found.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-prompt-not-found title: "@kbn/shared-ux-prompt-not-found" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-prompt-not-found plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-prompt-not-found'] --- import kbnSharedUxPromptNotFoundObj from './kbn_shared_ux_prompt_not_found.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router.mdx b/api_docs/kbn_shared_ux_router.mdx index 3a707a57231b8..5dd276f15d771 100644 --- a/api_docs/kbn_shared_ux_router.mdx +++ b/api_docs/kbn_shared_ux_router.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router title: "@kbn/shared-ux-router" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router'] --- import kbnSharedUxRouterObj from './kbn_shared_ux_router.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_router_mocks.mdx b/api_docs/kbn_shared_ux_router_mocks.mdx index 9dbd8873f6fe6..3ff8a5ab02963 100644 --- a/api_docs/kbn_shared_ux_router_mocks.mdx +++ b/api_docs/kbn_shared_ux_router_mocks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-router-mocks title: "@kbn/shared-ux-router-mocks" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-router-mocks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-router-mocks'] --- import kbnSharedUxRouterMocksObj from './kbn_shared_ux_router_mocks.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_config.mdx b/api_docs/kbn_shared_ux_storybook_config.mdx index 428effe6c8bdc..279f00e7c449c 100644 --- a/api_docs/kbn_shared_ux_storybook_config.mdx +++ b/api_docs/kbn_shared_ux_storybook_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-config title: "@kbn/shared-ux-storybook-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-config'] --- import kbnSharedUxStorybookConfigObj from './kbn_shared_ux_storybook_config.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_storybook_mock.mdx b/api_docs/kbn_shared_ux_storybook_mock.mdx index f9def6521b381..ba40e9463f47a 100644 --- a/api_docs/kbn_shared_ux_storybook_mock.mdx +++ b/api_docs/kbn_shared_ux_storybook_mock.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-storybook-mock title: "@kbn/shared-ux-storybook-mock" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-storybook-mock plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-storybook-mock'] --- import kbnSharedUxStorybookMockObj from './kbn_shared_ux_storybook_mock.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_tabbed_modal.mdx b/api_docs/kbn_shared_ux_tabbed_modal.mdx index 0cbd50bc3e8dc..c8b7d347c88c1 100644 --- a/api_docs/kbn_shared_ux_tabbed_modal.mdx +++ b/api_docs/kbn_shared_ux_tabbed_modal.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-tabbed-modal title: "@kbn/shared-ux-tabbed-modal" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-tabbed-modal plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-tabbed-modal'] --- import kbnSharedUxTabbedModalObj from './kbn_shared_ux_tabbed_modal.devdocs.json'; diff --git a/api_docs/kbn_shared_ux_utility.mdx b/api_docs/kbn_shared_ux_utility.mdx index 53acea9cd62fb..cc36e5fdb791f 100644 --- a/api_docs/kbn_shared_ux_utility.mdx +++ b/api_docs/kbn_shared_ux_utility.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-shared-ux-utility title: "@kbn/shared-ux-utility" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/shared-ux-utility plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/shared-ux-utility'] --- import kbnSharedUxUtilityObj from './kbn_shared_ux_utility.devdocs.json'; diff --git a/api_docs/kbn_slo_schema.mdx b/api_docs/kbn_slo_schema.mdx index 5e1f1c3ca54ee..f413f73a2bab7 100644 --- a/api_docs/kbn_slo_schema.mdx +++ b/api_docs/kbn_slo_schema.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-slo-schema title: "@kbn/slo-schema" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/slo-schema plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/slo-schema'] --- import kbnSloSchemaObj from './kbn_slo_schema.devdocs.json'; diff --git a/api_docs/kbn_some_dev_log.mdx b/api_docs/kbn_some_dev_log.mdx index 3ccbba58bb577..5564a362e5211 100644 --- a/api_docs/kbn_some_dev_log.mdx +++ b/api_docs/kbn_some_dev_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-some-dev-log title: "@kbn/some-dev-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/some-dev-log plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/some-dev-log'] --- import kbnSomeDevLogObj from './kbn_some_dev_log.devdocs.json'; diff --git a/api_docs/kbn_sort_predicates.mdx b/api_docs/kbn_sort_predicates.mdx index 5828618bacedb..19fbfc97e3ef4 100644 --- a/api_docs/kbn_sort_predicates.mdx +++ b/api_docs/kbn_sort_predicates.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-sort-predicates title: "@kbn/sort-predicates" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/sort-predicates plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/sort-predicates'] --- import kbnSortPredicatesObj from './kbn_sort_predicates.devdocs.json'; diff --git a/api_docs/kbn_std.mdx b/api_docs/kbn_std.mdx index 3f6df94acb634..b72c562ca5948 100644 --- a/api_docs/kbn_std.mdx +++ b/api_docs/kbn_std.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-std title: "@kbn/std" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/std plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/std'] --- import kbnStdObj from './kbn_std.devdocs.json'; diff --git a/api_docs/kbn_stdio_dev_helpers.mdx b/api_docs/kbn_stdio_dev_helpers.mdx index e85b7a5b7e7b9..7cf8007a52e87 100644 --- a/api_docs/kbn_stdio_dev_helpers.mdx +++ b/api_docs/kbn_stdio_dev_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-stdio-dev-helpers title: "@kbn/stdio-dev-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/stdio-dev-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/stdio-dev-helpers'] --- import kbnStdioDevHelpersObj from './kbn_stdio_dev_helpers.devdocs.json'; diff --git a/api_docs/kbn_storybook.mdx b/api_docs/kbn_storybook.mdx index bfceebd71cd6e..47159bb8644d0 100644 --- a/api_docs/kbn_storybook.mdx +++ b/api_docs/kbn_storybook.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-storybook title: "@kbn/storybook" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/storybook plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/storybook'] --- import kbnStorybookObj from './kbn_storybook.devdocs.json'; diff --git a/api_docs/kbn_synthetics_e2e.mdx b/api_docs/kbn_synthetics_e2e.mdx index 2cbe52404b1c4..c2f6a4a0123d5 100644 --- a/api_docs/kbn_synthetics_e2e.mdx +++ b/api_docs/kbn_synthetics_e2e.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-synthetics-e2e title: "@kbn/synthetics-e2e" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/synthetics-e2e plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/synthetics-e2e'] --- import kbnSyntheticsE2eObj from './kbn_synthetics_e2e.devdocs.json'; diff --git a/api_docs/kbn_telemetry_tools.mdx b/api_docs/kbn_telemetry_tools.mdx index 912698c6e2a89..71fa7cf6939b0 100644 --- a/api_docs/kbn_telemetry_tools.mdx +++ b/api_docs/kbn_telemetry_tools.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-telemetry-tools title: "@kbn/telemetry-tools" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/telemetry-tools plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/telemetry-tools'] --- import kbnTelemetryToolsObj from './kbn_telemetry_tools.devdocs.json'; diff --git a/api_docs/kbn_test.mdx b/api_docs/kbn_test.mdx index 52fef4a97db09..be84022c6db56 100644 --- a/api_docs/kbn_test.mdx +++ b/api_docs/kbn_test.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test title: "@kbn/test" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test'] --- import kbnTestObj from './kbn_test.devdocs.json'; diff --git a/api_docs/kbn_test_eui_helpers.mdx b/api_docs/kbn_test_eui_helpers.mdx index df1d222578991..c49ad8ff85630 100644 --- a/api_docs/kbn_test_eui_helpers.mdx +++ b/api_docs/kbn_test_eui_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-eui-helpers title: "@kbn/test-eui-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-eui-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-eui-helpers'] --- import kbnTestEuiHelpersObj from './kbn_test_eui_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_jest_helpers.mdx b/api_docs/kbn_test_jest_helpers.mdx index f791dee0730c3..2a17d9c56167e 100644 --- a/api_docs/kbn_test_jest_helpers.mdx +++ b/api_docs/kbn_test_jest_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-jest-helpers title: "@kbn/test-jest-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-jest-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-jest-helpers'] --- import kbnTestJestHelpersObj from './kbn_test_jest_helpers.devdocs.json'; diff --git a/api_docs/kbn_test_subj_selector.mdx b/api_docs/kbn_test_subj_selector.mdx index 196c7e21c21ba..60fe07d885d2d 100644 --- a/api_docs/kbn_test_subj_selector.mdx +++ b/api_docs/kbn_test_subj_selector.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-test-subj-selector title: "@kbn/test-subj-selector" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/test-subj-selector plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/test-subj-selector'] --- import kbnTestSubjSelectorObj from './kbn_test_subj_selector.devdocs.json'; diff --git a/api_docs/kbn_text_based_editor.mdx b/api_docs/kbn_text_based_editor.mdx index 7c61823e1c52a..22bc53369724f 100644 --- a/api_docs/kbn_text_based_editor.mdx +++ b/api_docs/kbn_text_based_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-text-based-editor title: "@kbn/text-based-editor" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/text-based-editor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/text-based-editor'] --- import kbnTextBasedEditorObj from './kbn_text_based_editor.devdocs.json'; diff --git a/api_docs/kbn_timerange.mdx b/api_docs/kbn_timerange.mdx index 12b9855699e9a..47d52748f0702 100644 --- a/api_docs/kbn_timerange.mdx +++ b/api_docs/kbn_timerange.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-timerange title: "@kbn/timerange" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/timerange plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/timerange'] --- import kbnTimerangeObj from './kbn_timerange.devdocs.json'; diff --git a/api_docs/kbn_tooling_log.mdx b/api_docs/kbn_tooling_log.mdx index 2dcdebe389a9d..f8e4b1091a979 100644 --- a/api_docs/kbn_tooling_log.mdx +++ b/api_docs/kbn_tooling_log.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-tooling-log title: "@kbn/tooling-log" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/tooling-log plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/tooling-log'] --- import kbnToolingLogObj from './kbn_tooling_log.devdocs.json'; diff --git a/api_docs/kbn_triggers_actions_ui_types.mdx b/api_docs/kbn_triggers_actions_ui_types.mdx index 4d63c69bfa1d2..179834d98308e 100644 --- a/api_docs/kbn_triggers_actions_ui_types.mdx +++ b/api_docs/kbn_triggers_actions_ui_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-triggers-actions-ui-types title: "@kbn/triggers-actions-ui-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/triggers-actions-ui-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/triggers-actions-ui-types'] --- import kbnTriggersActionsUiTypesObj from './kbn_triggers_actions_ui_types.devdocs.json'; diff --git a/api_docs/kbn_try_in_console.mdx b/api_docs/kbn_try_in_console.mdx index 7c856eb1a2793..8647728297d20 100644 --- a/api_docs/kbn_try_in_console.mdx +++ b/api_docs/kbn_try_in_console.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-try-in-console title: "@kbn/try-in-console" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/try-in-console plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/try-in-console'] --- import kbnTryInConsoleObj from './kbn_try_in_console.devdocs.json'; diff --git a/api_docs/kbn_ts_projects.mdx b/api_docs/kbn_ts_projects.mdx index 16ed405fa368a..69eda1e8d167c 100644 --- a/api_docs/kbn_ts_projects.mdx +++ b/api_docs/kbn_ts_projects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ts-projects title: "@kbn/ts-projects" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ts-projects plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ts-projects'] --- import kbnTsProjectsObj from './kbn_ts_projects.devdocs.json'; diff --git a/api_docs/kbn_typed_react_router_config.mdx b/api_docs/kbn_typed_react_router_config.mdx index df9dc80125a72..5b7dd288a863c 100644 --- a/api_docs/kbn_typed_react_router_config.mdx +++ b/api_docs/kbn_typed_react_router_config.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-typed-react-router-config title: "@kbn/typed-react-router-config" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/typed-react-router-config plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/typed-react-router-config'] --- import kbnTypedReactRouterConfigObj from './kbn_typed_react_router_config.devdocs.json'; diff --git a/api_docs/kbn_ui_actions_browser.mdx b/api_docs/kbn_ui_actions_browser.mdx index ba5f8f7842447..c6086babb0e21 100644 --- a/api_docs/kbn_ui_actions_browser.mdx +++ b/api_docs/kbn_ui_actions_browser.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-actions-browser title: "@kbn/ui-actions-browser" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-actions-browser plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-actions-browser'] --- import kbnUiActionsBrowserObj from './kbn_ui_actions_browser.devdocs.json'; diff --git a/api_docs/kbn_ui_shared_deps_src.mdx b/api_docs/kbn_ui_shared_deps_src.mdx index e26a7cbc47bf2..c151bbe1aad8a 100644 --- a/api_docs/kbn_ui_shared_deps_src.mdx +++ b/api_docs/kbn_ui_shared_deps_src.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-shared-deps-src title: "@kbn/ui-shared-deps-src" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-shared-deps-src plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-shared-deps-src'] --- import kbnUiSharedDepsSrcObj from './kbn_ui_shared_deps_src.devdocs.json'; diff --git a/api_docs/kbn_ui_theme.mdx b/api_docs/kbn_ui_theme.mdx index 223034a5195c7..2a3bda01cc90b 100644 --- a/api_docs/kbn_ui_theme.mdx +++ b/api_docs/kbn_ui_theme.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-ui-theme title: "@kbn/ui-theme" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/ui-theme plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/ui-theme'] --- import kbnUiThemeObj from './kbn_ui_theme.devdocs.json'; diff --git a/api_docs/kbn_unified_data_table.mdx b/api_docs/kbn_unified_data_table.mdx index ada4bfa43df5e..02a286e80f249 100644 --- a/api_docs/kbn_unified_data_table.mdx +++ b/api_docs/kbn_unified_data_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-data-table title: "@kbn/unified-data-table" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-data-table plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-data-table'] --- import kbnUnifiedDataTableObj from './kbn_unified_data_table.devdocs.json'; diff --git a/api_docs/kbn_unified_doc_viewer.mdx b/api_docs/kbn_unified_doc_viewer.mdx index 2f92a3226c7e2..7c57764f5f633 100644 --- a/api_docs/kbn_unified_doc_viewer.mdx +++ b/api_docs/kbn_unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-doc-viewer title: "@kbn/unified-doc-viewer" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-doc-viewer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-doc-viewer'] --- import kbnUnifiedDocViewerObj from './kbn_unified_doc_viewer.devdocs.json'; diff --git a/api_docs/kbn_unified_field_list.mdx b/api_docs/kbn_unified_field_list.mdx index 7af8f769b5466..ef43dc8a26d00 100644 --- a/api_docs/kbn_unified_field_list.mdx +++ b/api_docs/kbn_unified_field_list.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unified-field-list title: "@kbn/unified-field-list" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unified-field-list plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unified-field-list'] --- import kbnUnifiedFieldListObj from './kbn_unified_field_list.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_badge.mdx b/api_docs/kbn_unsaved_changes_badge.mdx index df10f9e02b7bc..fd8203e8416cc 100644 --- a/api_docs/kbn_unsaved_changes_badge.mdx +++ b/api_docs/kbn_unsaved_changes_badge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-badge title: "@kbn/unsaved-changes-badge" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-badge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-badge'] --- import kbnUnsavedChangesBadgeObj from './kbn_unsaved_changes_badge.devdocs.json'; diff --git a/api_docs/kbn_unsaved_changes_prompt.mdx b/api_docs/kbn_unsaved_changes_prompt.mdx index 17c968aed37bf..b7e0c373a71c4 100644 --- a/api_docs/kbn_unsaved_changes_prompt.mdx +++ b/api_docs/kbn_unsaved_changes_prompt.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-unsaved-changes-prompt title: "@kbn/unsaved-changes-prompt" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/unsaved-changes-prompt plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/unsaved-changes-prompt'] --- import kbnUnsavedChangesPromptObj from './kbn_unsaved_changes_prompt.devdocs.json'; diff --git a/api_docs/kbn_use_tracked_promise.mdx b/api_docs/kbn_use_tracked_promise.mdx index 01e02afd1114b..eecba58bee1e9 100644 --- a/api_docs/kbn_use_tracked_promise.mdx +++ b/api_docs/kbn_use_tracked_promise.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-use-tracked-promise title: "@kbn/use-tracked-promise" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/use-tracked-promise plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/use-tracked-promise'] --- import kbnUseTrackedPromiseObj from './kbn_use_tracked_promise.devdocs.json'; diff --git a/api_docs/kbn_user_profile_components.mdx b/api_docs/kbn_user_profile_components.mdx index 029c56fd8d890..ddc43f4a20ddb 100644 --- a/api_docs/kbn_user_profile_components.mdx +++ b/api_docs/kbn_user_profile_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-user-profile-components title: "@kbn/user-profile-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/user-profile-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/user-profile-components'] --- import kbnUserProfileComponentsObj from './kbn_user_profile_components.devdocs.json'; diff --git a/api_docs/kbn_utility_types.mdx b/api_docs/kbn_utility_types.mdx index 29f7f42ad3981..1bd54fa05b410 100644 --- a/api_docs/kbn_utility_types.mdx +++ b/api_docs/kbn_utility_types.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types title: "@kbn/utility-types" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types'] --- import kbnUtilityTypesObj from './kbn_utility_types.devdocs.json'; diff --git a/api_docs/kbn_utility_types_jest.mdx b/api_docs/kbn_utility_types_jest.mdx index f20b6e95f7fb1..5b3282ae53511 100644 --- a/api_docs/kbn_utility_types_jest.mdx +++ b/api_docs/kbn_utility_types_jest.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utility-types-jest title: "@kbn/utility-types-jest" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utility-types-jest plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utility-types-jest'] --- import kbnUtilityTypesJestObj from './kbn_utility_types_jest.devdocs.json'; diff --git a/api_docs/kbn_utils.mdx b/api_docs/kbn_utils.mdx index 8c91569219454..af072dcd84be0 100644 --- a/api_docs/kbn_utils.mdx +++ b/api_docs/kbn_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-utils title: "@kbn/utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/utils'] --- import kbnUtilsObj from './kbn_utils.devdocs.json'; diff --git a/api_docs/kbn_visualization_ui_components.mdx b/api_docs/kbn_visualization_ui_components.mdx index 981ae45ad361c..af876c9fb9162 100644 --- a/api_docs/kbn_visualization_ui_components.mdx +++ b/api_docs/kbn_visualization_ui_components.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-ui-components title: "@kbn/visualization-ui-components" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-ui-components plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-ui-components'] --- import kbnVisualizationUiComponentsObj from './kbn_visualization_ui_components.devdocs.json'; diff --git a/api_docs/kbn_visualization_utils.mdx b/api_docs/kbn_visualization_utils.mdx index df100e05bdd3d..c7d6a35813cca 100644 --- a/api_docs/kbn_visualization_utils.mdx +++ b/api_docs/kbn_visualization_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-visualization-utils title: "@kbn/visualization-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/visualization-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/visualization-utils'] --- import kbnVisualizationUtilsObj from './kbn_visualization_utils.devdocs.json'; diff --git a/api_docs/kbn_xstate_utils.mdx b/api_docs/kbn_xstate_utils.mdx index c09457b93e3b7..27530bc3b18b9 100644 --- a/api_docs/kbn_xstate_utils.mdx +++ b/api_docs/kbn_xstate_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-xstate-utils title: "@kbn/xstate-utils" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/xstate-utils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/xstate-utils'] --- import kbnXstateUtilsObj from './kbn_xstate_utils.devdocs.json'; diff --git a/api_docs/kbn_yarn_lock_validator.mdx b/api_docs/kbn_yarn_lock_validator.mdx index 963b3f8f9865a..f4d2ffb84418f 100644 --- a/api_docs/kbn_yarn_lock_validator.mdx +++ b/api_docs/kbn_yarn_lock_validator.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-yarn-lock-validator title: "@kbn/yarn-lock-validator" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/yarn-lock-validator plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/yarn-lock-validator'] --- import kbnYarnLockValidatorObj from './kbn_yarn_lock_validator.devdocs.json'; diff --git a/api_docs/kbn_zod.mdx b/api_docs/kbn_zod.mdx index dc179771d387a..8d5019013a074 100644 --- a/api_docs/kbn_zod.mdx +++ b/api_docs/kbn_zod.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod title: "@kbn/zod" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod'] --- import kbnZodObj from './kbn_zod.devdocs.json'; diff --git a/api_docs/kbn_zod_helpers.mdx b/api_docs/kbn_zod_helpers.mdx index 46ae414e211a8..cce4d5f49b71c 100644 --- a/api_docs/kbn_zod_helpers.mdx +++ b/api_docs/kbn_zod_helpers.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kbn-zod-helpers title: "@kbn/zod-helpers" image: https://source.unsplash.com/400x175/?github description: API docs for the @kbn/zod-helpers plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', '@kbn/zod-helpers'] --- import kbnZodHelpersObj from './kbn_zod_helpers.devdocs.json'; diff --git a/api_docs/kibana_overview.mdx b/api_docs/kibana_overview.mdx index e032bfb124e03..749249956e629 100644 --- a/api_docs/kibana_overview.mdx +++ b/api_docs/kibana_overview.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaOverview title: "kibanaOverview" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaOverview plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaOverview'] --- import kibanaOverviewObj from './kibana_overview.devdocs.json'; diff --git a/api_docs/kibana_react.mdx b/api_docs/kibana_react.mdx index bf2b3e9b7f381..b72630cf865ec 100644 --- a/api_docs/kibana_react.mdx +++ b/api_docs/kibana_react.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaReact title: "kibanaReact" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaReact plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaReact'] --- import kibanaReactObj from './kibana_react.devdocs.json'; diff --git a/api_docs/kibana_utils.mdx b/api_docs/kibana_utils.mdx index d271cfebc4cab..8a83a2c7f7e08 100644 --- a/api_docs/kibana_utils.mdx +++ b/api_docs/kibana_utils.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kibanaUtils title: "kibanaUtils" image: https://source.unsplash.com/400x175/?github description: API docs for the kibanaUtils plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kibanaUtils'] --- import kibanaUtilsObj from './kibana_utils.devdocs.json'; diff --git a/api_docs/kubernetes_security.mdx b/api_docs/kubernetes_security.mdx index 0dec6b0a82c3d..84cd8defd9c1d 100644 --- a/api_docs/kubernetes_security.mdx +++ b/api_docs/kubernetes_security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/kubernetesSecurity title: "kubernetesSecurity" image: https://source.unsplash.com/400x175/?github description: API docs for the kubernetesSecurity plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'kubernetesSecurity'] --- import kubernetesSecurityObj from './kubernetes_security.devdocs.json'; diff --git a/api_docs/lens.mdx b/api_docs/lens.mdx index 319bd9be21e71..5ddbda38d0597 100644 --- a/api_docs/lens.mdx +++ b/api_docs/lens.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lens title: "lens" image: https://source.unsplash.com/400x175/?github description: API docs for the lens plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lens'] --- import lensObj from './lens.devdocs.json'; diff --git a/api_docs/license_api_guard.mdx b/api_docs/license_api_guard.mdx index bf8ca0354fb1b..973d4071627bd 100644 --- a/api_docs/license_api_guard.mdx +++ b/api_docs/license_api_guard.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseApiGuard title: "licenseApiGuard" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseApiGuard plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseApiGuard'] --- import licenseApiGuardObj from './license_api_guard.devdocs.json'; diff --git a/api_docs/license_management.mdx b/api_docs/license_management.mdx index 1b60d28520865..7a6912604a729 100644 --- a/api_docs/license_management.mdx +++ b/api_docs/license_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licenseManagement title: "licenseManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the licenseManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licenseManagement'] --- import licenseManagementObj from './license_management.devdocs.json'; diff --git a/api_docs/licensing.mdx b/api_docs/licensing.mdx index 6009953027212..cfbe979c479d9 100644 --- a/api_docs/licensing.mdx +++ b/api_docs/licensing.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/licensing title: "licensing" image: https://source.unsplash.com/400x175/?github description: API docs for the licensing plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'licensing'] --- import licensingObj from './licensing.devdocs.json'; diff --git a/api_docs/links.mdx b/api_docs/links.mdx index 49be9114bf811..3c2d62943f21b 100644 --- a/api_docs/links.mdx +++ b/api_docs/links.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/links title: "links" image: https://source.unsplash.com/400x175/?github description: API docs for the links plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'links'] --- import linksObj from './links.devdocs.json'; diff --git a/api_docs/lists.mdx b/api_docs/lists.mdx index ae541a6fbcb96..6316f62bf017e 100644 --- a/api_docs/lists.mdx +++ b/api_docs/lists.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/lists title: "lists" image: https://source.unsplash.com/400x175/?github description: API docs for the lists plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'lists'] --- import listsObj from './lists.devdocs.json'; diff --git a/api_docs/logs_data_access.mdx b/api_docs/logs_data_access.mdx index 11df4d9c38a52..c3960b87f142f 100644 --- a/api_docs/logs_data_access.mdx +++ b/api_docs/logs_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsDataAccess title: "logsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the logsDataAccess plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsDataAccess'] --- import logsDataAccessObj from './logs_data_access.devdocs.json'; diff --git a/api_docs/logs_explorer.mdx b/api_docs/logs_explorer.mdx index 83d5b85c9063d..85e1147bb218b 100644 --- a/api_docs/logs_explorer.mdx +++ b/api_docs/logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsExplorer title: "logsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the logsExplorer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsExplorer'] --- import logsExplorerObj from './logs_explorer.devdocs.json'; diff --git a/api_docs/logs_shared.mdx b/api_docs/logs_shared.mdx index 12f1c4c7b16b1..ab5bc47310224 100644 --- a/api_docs/logs_shared.mdx +++ b/api_docs/logs_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/logsShared title: "logsShared" image: https://source.unsplash.com/400x175/?github description: API docs for the logsShared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'logsShared'] --- import logsSharedObj from './logs_shared.devdocs.json'; diff --git a/api_docs/management.mdx b/api_docs/management.mdx index 9e9b18bac3a3f..5cd7585d22877 100644 --- a/api_docs/management.mdx +++ b/api_docs/management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/management title: "management" image: https://source.unsplash.com/400x175/?github description: API docs for the management plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'management'] --- import managementObj from './management.devdocs.json'; diff --git a/api_docs/maps.mdx b/api_docs/maps.mdx index da1c81ab61341..12ac5e462cb7e 100644 --- a/api_docs/maps.mdx +++ b/api_docs/maps.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/maps title: "maps" image: https://source.unsplash.com/400x175/?github description: API docs for the maps plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'maps'] --- import mapsObj from './maps.devdocs.json'; diff --git a/api_docs/maps_ems.mdx b/api_docs/maps_ems.mdx index 96dd2976d7204..7f6101dcf82bb 100644 --- a/api_docs/maps_ems.mdx +++ b/api_docs/maps_ems.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mapsEms title: "mapsEms" image: https://source.unsplash.com/400x175/?github description: API docs for the mapsEms plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mapsEms'] --- import mapsEmsObj from './maps_ems.devdocs.json'; diff --git a/api_docs/metrics_data_access.mdx b/api_docs/metrics_data_access.mdx index dbf18c497b0c6..0e3285a0ece95 100644 --- a/api_docs/metrics_data_access.mdx +++ b/api_docs/metrics_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/metricsDataAccess title: "metricsDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the metricsDataAccess plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'metricsDataAccess'] --- import metricsDataAccessObj from './metrics_data_access.devdocs.json'; diff --git a/api_docs/ml.mdx b/api_docs/ml.mdx index df24f285b5a22..3e6cc39d1e3fc 100644 --- a/api_docs/ml.mdx +++ b/api_docs/ml.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ml title: "ml" image: https://source.unsplash.com/400x175/?github description: API docs for the ml plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ml'] --- import mlObj from './ml.devdocs.json'; diff --git a/api_docs/mock_idp_plugin.mdx b/api_docs/mock_idp_plugin.mdx index cec95e030c665..85db8c0d75c82 100644 --- a/api_docs/mock_idp_plugin.mdx +++ b/api_docs/mock_idp_plugin.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/mockIdpPlugin title: "mockIdpPlugin" image: https://source.unsplash.com/400x175/?github description: API docs for the mockIdpPlugin plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'mockIdpPlugin'] --- import mockIdpPluginObj from './mock_idp_plugin.devdocs.json'; diff --git a/api_docs/monitoring.mdx b/api_docs/monitoring.mdx index 2e99b392b8b34..bf0a0e7711bbc 100644 --- a/api_docs/monitoring.mdx +++ b/api_docs/monitoring.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoring title: "monitoring" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoring plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoring'] --- import monitoringObj from './monitoring.devdocs.json'; diff --git a/api_docs/monitoring_collection.mdx b/api_docs/monitoring_collection.mdx index 0166d64c9a47c..2e4e3940de656 100644 --- a/api_docs/monitoring_collection.mdx +++ b/api_docs/monitoring_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/monitoringCollection title: "monitoringCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the monitoringCollection plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'monitoringCollection'] --- import monitoringCollectionObj from './monitoring_collection.devdocs.json'; diff --git a/api_docs/navigation.mdx b/api_docs/navigation.mdx index b6ed7754b9d86..44cd383ea44d2 100644 --- a/api_docs/navigation.mdx +++ b/api_docs/navigation.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/navigation title: "navigation" image: https://source.unsplash.com/400x175/?github description: API docs for the navigation plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'navigation'] --- import navigationObj from './navigation.devdocs.json'; diff --git a/api_docs/newsfeed.mdx b/api_docs/newsfeed.mdx index 24dbf3bcb4677..a6abb78971590 100644 --- a/api_docs/newsfeed.mdx +++ b/api_docs/newsfeed.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/newsfeed title: "newsfeed" image: https://source.unsplash.com/400x175/?github description: API docs for the newsfeed plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'newsfeed'] --- import newsfeedObj from './newsfeed.devdocs.json'; diff --git a/api_docs/no_data_page.mdx b/api_docs/no_data_page.mdx index 566a15fce7c51..f770c3ceb6639 100644 --- a/api_docs/no_data_page.mdx +++ b/api_docs/no_data_page.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/noDataPage title: "noDataPage" image: https://source.unsplash.com/400x175/?github description: API docs for the noDataPage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'noDataPage'] --- import noDataPageObj from './no_data_page.devdocs.json'; diff --git a/api_docs/notifications.mdx b/api_docs/notifications.mdx index f651069e6cf82..bb8e3ea372653 100644 --- a/api_docs/notifications.mdx +++ b/api_docs/notifications.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/notifications title: "notifications" image: https://source.unsplash.com/400x175/?github description: API docs for the notifications plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'notifications'] --- import notificationsObj from './notifications.devdocs.json'; diff --git a/api_docs/observability.mdx b/api_docs/observability.mdx index 976a88811fc1d..95163a8cdc78e 100644 --- a/api_docs/observability.mdx +++ b/api_docs/observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observability title: "observability" image: https://source.unsplash.com/400x175/?github description: API docs for the observability plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observability'] --- import observabilityObj from './observability.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant.mdx b/api_docs/observability_a_i_assistant.mdx index dcc4da6a347a7..53272cae2b032 100644 --- a/api_docs/observability_a_i_assistant.mdx +++ b/api_docs/observability_a_i_assistant.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistant title: "observabilityAIAssistant" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistant plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistant'] --- import observabilityAIAssistantObj from './observability_a_i_assistant.devdocs.json'; diff --git a/api_docs/observability_a_i_assistant_app.mdx b/api_docs/observability_a_i_assistant_app.mdx index 824763fb1ac65..4734c8ba1ef93 100644 --- a/api_docs/observability_a_i_assistant_app.mdx +++ b/api_docs/observability_a_i_assistant_app.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAIAssistantApp title: "observabilityAIAssistantApp" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAIAssistantApp plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAIAssistantApp'] --- import observabilityAIAssistantAppObj from './observability_a_i_assistant_app.devdocs.json'; diff --git a/api_docs/observability_ai_assistant_management.mdx b/api_docs/observability_ai_assistant_management.mdx index e59a660053d25..58ab4f18ce903 100644 --- a/api_docs/observability_ai_assistant_management.mdx +++ b/api_docs/observability_ai_assistant_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityAiAssistantManagement title: "observabilityAiAssistantManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityAiAssistantManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityAiAssistantManagement'] --- import observabilityAiAssistantManagementObj from './observability_ai_assistant_management.devdocs.json'; diff --git a/api_docs/observability_logs_explorer.mdx b/api_docs/observability_logs_explorer.mdx index 36a68ee7510e6..afe593fc1bdf7 100644 --- a/api_docs/observability_logs_explorer.mdx +++ b/api_docs/observability_logs_explorer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityLogsExplorer title: "observabilityLogsExplorer" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityLogsExplorer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityLogsExplorer'] --- import observabilityLogsExplorerObj from './observability_logs_explorer.devdocs.json'; diff --git a/api_docs/observability_onboarding.mdx b/api_docs/observability_onboarding.mdx index c19c72576152f..166c98a8d0414 100644 --- a/api_docs/observability_onboarding.mdx +++ b/api_docs/observability_onboarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityOnboarding title: "observabilityOnboarding" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityOnboarding plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityOnboarding'] --- import observabilityOnboardingObj from './observability_onboarding.devdocs.json'; diff --git a/api_docs/observability_shared.mdx b/api_docs/observability_shared.mdx index 9c776ec76ea9a..9f9952b34daae 100644 --- a/api_docs/observability_shared.mdx +++ b/api_docs/observability_shared.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/observabilityShared title: "observabilityShared" image: https://source.unsplash.com/400x175/?github description: API docs for the observabilityShared plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'observabilityShared'] --- import observabilitySharedObj from './observability_shared.devdocs.json'; diff --git a/api_docs/osquery.mdx b/api_docs/osquery.mdx index e176a07a8b058..46a4d920372d9 100644 --- a/api_docs/osquery.mdx +++ b/api_docs/osquery.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/osquery title: "osquery" image: https://source.unsplash.com/400x175/?github description: API docs for the osquery plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'osquery'] --- import osqueryObj from './osquery.devdocs.json'; diff --git a/api_docs/painless_lab.mdx b/api_docs/painless_lab.mdx index d6328d5763c57..2260fa50a9f6b 100644 --- a/api_docs/painless_lab.mdx +++ b/api_docs/painless_lab.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/painlessLab title: "painlessLab" image: https://source.unsplash.com/400x175/?github description: API docs for the painlessLab plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'painlessLab'] --- import painlessLabObj from './painless_lab.devdocs.json'; diff --git a/api_docs/plugin_directory.mdx b/api_docs/plugin_directory.mdx index 0681912262c19..16b8a6f43a2e7 100644 --- a/api_docs/plugin_directory.mdx +++ b/api_docs/plugin_directory.mdx @@ -7,7 +7,7 @@ id: kibDevDocsPluginDirectory slug: /kibana-dev-docs/api-meta/plugin-api-directory title: Directory description: Directory of public APIs available through plugins or packages. -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana'] --- @@ -21,7 +21,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | API Count | Any Count | Missing comments | Missing exports | |--------------|----------|-----------------|--------| -| 51626 | 241 | 38440 | 1896 | +| 51628 | 241 | 38443 | 1894 | ## Plugin Directory @@ -196,7 +196,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 25 | 0 | 25 | 3 | | | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 10 | 0 | 10 | 0 | | synthetics | [@elastic/obs-ux-management-team](https://github.com/orgs/elastic/teams/obs-ux-management-team) | This plugin visualizes data from Synthetics and Heartbeat, and integrates with other Observability solutions. | 0 | 0 | 0 | 1 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 107 | 0 | 63 | 7 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 105 | 0 | 62 | 5 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 45 | 0 | 1 | 0 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 31 | 0 | 26 | 6 | | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 1 | 0 | 1 | 0 | @@ -205,7 +205,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/security-threat-hunting-investigations](https://github.com/orgs/elastic/teams/security-threat-hunting-investigations) | - | 228 | 1 | 184 | 18 | | | [@elastic/ml-ui](https://github.com/orgs/elastic/teams/ml-ui) | This plugin provides access to the transforms features provided by Elastic. Transforms enable you to convert existing Elasticsearch indices into summarized indices, which provide opportunities for new insights and analytics. | 4 | 0 | 4 | 1 | | translations | [@elastic/kibana-localization](https://github.com/orgs/elastic/teams/kibana-localization) | - | 0 | 0 | 0 | 0 | -| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 588 | 1 | 562 | 51 | +| | [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-ops) | - | 590 | 1 | 564 | 51 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Adds UI Actions service to Kibana | 156 | 0 | 110 | 9 | | | [@elastic/appex-sharedux](https://github.com/orgs/elastic/teams/appex-sharedux) | Extends UI Actions plugin with more functionality | 212 | 0 | 145 | 11 | | | [@elastic/kibana-data-discovery](https://github.com/orgs/elastic/teams/kibana-data-discovery) | This plugin contains services reliant on the plugin lifecycle for the unified doc viewer component (see @kbn/unified-doc-viewer). | 15 | 0 | 10 | 3 | @@ -500,7 +500,7 @@ tags: ['contributor', 'dev', 'apidocs', 'kibana'] | | [@elastic/kibana-core](https://github.com/orgs/elastic/teams/kibana-core) | - | 27 | 0 | 27 | 1 | | | [@elastic/kibana-operations](https://github.com/orgs/elastic/teams/kibana-operations) | - | 2 | 0 | 1 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 135 | 1 | 120 | 12 | -| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 63 | 0 | 59 | 0 | +| | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 65 | 0 | 61 | 0 | | | [@elastic/kibana-esql](https://github.com/orgs/elastic/teams/kibana-esql) | - | 194 | 0 | 183 | 10 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 40 | 0 | 40 | 0 | | | [@elastic/kibana-visualizations](https://github.com/orgs/elastic/teams/kibana-visualizations) | - | 52 | 0 | 52 | 1 | diff --git a/api_docs/presentation_panel.mdx b/api_docs/presentation_panel.mdx index 97fc690379b25..55c668514a9da 100644 --- a/api_docs/presentation_panel.mdx +++ b/api_docs/presentation_panel.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationPanel title: "presentationPanel" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationPanel plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationPanel'] --- import presentationPanelObj from './presentation_panel.devdocs.json'; diff --git a/api_docs/presentation_util.mdx b/api_docs/presentation_util.mdx index 1a8ba9ec02171..7e331bd9d9133 100644 --- a/api_docs/presentation_util.mdx +++ b/api_docs/presentation_util.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/presentationUtil title: "presentationUtil" image: https://source.unsplash.com/400x175/?github description: API docs for the presentationUtil plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'presentationUtil'] --- import presentationUtilObj from './presentation_util.devdocs.json'; diff --git a/api_docs/profiling.mdx b/api_docs/profiling.mdx index b95b5247c24f0..30c86563ce5ea 100644 --- a/api_docs/profiling.mdx +++ b/api_docs/profiling.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profiling title: "profiling" image: https://source.unsplash.com/400x175/?github description: API docs for the profiling plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profiling'] --- import profilingObj from './profiling.devdocs.json'; diff --git a/api_docs/profiling_data_access.mdx b/api_docs/profiling_data_access.mdx index 5a8476193d166..f4949a4add1c8 100644 --- a/api_docs/profiling_data_access.mdx +++ b/api_docs/profiling_data_access.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/profilingDataAccess title: "profilingDataAccess" image: https://source.unsplash.com/400x175/?github description: API docs for the profilingDataAccess plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'profilingDataAccess'] --- import profilingDataAccessObj from './profiling_data_access.devdocs.json'; diff --git a/api_docs/remote_clusters.mdx b/api_docs/remote_clusters.mdx index 979deacf0520f..34e1d922745f8 100644 --- a/api_docs/remote_clusters.mdx +++ b/api_docs/remote_clusters.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/remoteClusters title: "remoteClusters" image: https://source.unsplash.com/400x175/?github description: API docs for the remoteClusters plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'remoteClusters'] --- import remoteClustersObj from './remote_clusters.devdocs.json'; diff --git a/api_docs/reporting.mdx b/api_docs/reporting.mdx index b058ccc2a23eb..ec57e374979a2 100644 --- a/api_docs/reporting.mdx +++ b/api_docs/reporting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/reporting title: "reporting" image: https://source.unsplash.com/400x175/?github description: API docs for the reporting plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'reporting'] --- import reportingObj from './reporting.devdocs.json'; diff --git a/api_docs/rollup.mdx b/api_docs/rollup.mdx index f3599c69260c1..27bf229ad7626 100644 --- a/api_docs/rollup.mdx +++ b/api_docs/rollup.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/rollup title: "rollup" image: https://source.unsplash.com/400x175/?github description: API docs for the rollup plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'rollup'] --- import rollupObj from './rollup.devdocs.json'; diff --git a/api_docs/rule_registry.mdx b/api_docs/rule_registry.mdx index 8fb757e92bc5a..0ad9bd6b51ae9 100644 --- a/api_docs/rule_registry.mdx +++ b/api_docs/rule_registry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ruleRegistry title: "ruleRegistry" image: https://source.unsplash.com/400x175/?github description: API docs for the ruleRegistry plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ruleRegistry'] --- import ruleRegistryObj from './rule_registry.devdocs.json'; diff --git a/api_docs/runtime_fields.mdx b/api_docs/runtime_fields.mdx index 71f7f57324660..494213fd4d0d3 100644 --- a/api_docs/runtime_fields.mdx +++ b/api_docs/runtime_fields.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/runtimeFields title: "runtimeFields" image: https://source.unsplash.com/400x175/?github description: API docs for the runtimeFields plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'runtimeFields'] --- import runtimeFieldsObj from './runtime_fields.devdocs.json'; diff --git a/api_docs/saved_objects.mdx b/api_docs/saved_objects.mdx index 1146e3708a376..b642c08004f8c 100644 --- a/api_docs/saved_objects.mdx +++ b/api_docs/saved_objects.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjects title: "savedObjects" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjects plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjects'] --- import savedObjectsObj from './saved_objects.devdocs.json'; diff --git a/api_docs/saved_objects_finder.mdx b/api_docs/saved_objects_finder.mdx index e4bbc5efff7e8..d21ffc70c9127 100644 --- a/api_docs/saved_objects_finder.mdx +++ b/api_docs/saved_objects_finder.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsFinder title: "savedObjectsFinder" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsFinder plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsFinder'] --- import savedObjectsFinderObj from './saved_objects_finder.devdocs.json'; diff --git a/api_docs/saved_objects_management.mdx b/api_docs/saved_objects_management.mdx index 8d24ceb9a7b56..57334b10b1138 100644 --- a/api_docs/saved_objects_management.mdx +++ b/api_docs/saved_objects_management.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsManagement title: "savedObjectsManagement" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsManagement plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsManagement'] --- import savedObjectsManagementObj from './saved_objects_management.devdocs.json'; diff --git a/api_docs/saved_objects_tagging.mdx b/api_docs/saved_objects_tagging.mdx index b87cd667bbb2e..bb0f244de624f 100644 --- a/api_docs/saved_objects_tagging.mdx +++ b/api_docs/saved_objects_tagging.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTagging title: "savedObjectsTagging" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTagging plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTagging'] --- import savedObjectsTaggingObj from './saved_objects_tagging.devdocs.json'; diff --git a/api_docs/saved_objects_tagging_oss.mdx b/api_docs/saved_objects_tagging_oss.mdx index 23a2cda9e9308..c87afb8d72e35 100644 --- a/api_docs/saved_objects_tagging_oss.mdx +++ b/api_docs/saved_objects_tagging_oss.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedObjectsTaggingOss title: "savedObjectsTaggingOss" image: https://source.unsplash.com/400x175/?github description: API docs for the savedObjectsTaggingOss plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedObjectsTaggingOss'] --- import savedObjectsTaggingOssObj from './saved_objects_tagging_oss.devdocs.json'; diff --git a/api_docs/saved_search.mdx b/api_docs/saved_search.mdx index 96ea23d04246f..909039407ae1b 100644 --- a/api_docs/saved_search.mdx +++ b/api_docs/saved_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/savedSearch title: "savedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the savedSearch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'savedSearch'] --- import savedSearchObj from './saved_search.devdocs.json'; diff --git a/api_docs/screenshot_mode.mdx b/api_docs/screenshot_mode.mdx index 1f00aafef3218..0f50c3d008c2b 100644 --- a/api_docs/screenshot_mode.mdx +++ b/api_docs/screenshot_mode.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotMode title: "screenshotMode" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotMode plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotMode'] --- import screenshotModeObj from './screenshot_mode.devdocs.json'; diff --git a/api_docs/screenshotting.mdx b/api_docs/screenshotting.mdx index 2890604a53c1b..5cc2dc069127e 100644 --- a/api_docs/screenshotting.mdx +++ b/api_docs/screenshotting.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/screenshotting title: "screenshotting" image: https://source.unsplash.com/400x175/?github description: API docs for the screenshotting plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'screenshotting'] --- import screenshottingObj from './screenshotting.devdocs.json'; diff --git a/api_docs/search_connectors.mdx b/api_docs/search_connectors.mdx index 17749255d18af..4856f7fae9040 100644 --- a/api_docs/search_connectors.mdx +++ b/api_docs/search_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchConnectors title: "searchConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the searchConnectors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchConnectors'] --- import searchConnectorsObj from './search_connectors.devdocs.json'; diff --git a/api_docs/search_homepage.mdx b/api_docs/search_homepage.mdx index d02b098688e89..ee829fbe14bfd 100644 --- a/api_docs/search_homepage.mdx +++ b/api_docs/search_homepage.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchHomepage title: "searchHomepage" image: https://source.unsplash.com/400x175/?github description: API docs for the searchHomepage plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchHomepage'] --- import searchHomepageObj from './search_homepage.devdocs.json'; diff --git a/api_docs/search_inference_endpoints.mdx b/api_docs/search_inference_endpoints.mdx index 38b90635e2749..155fcbd0938ed 100644 --- a/api_docs/search_inference_endpoints.mdx +++ b/api_docs/search_inference_endpoints.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchInferenceEndpoints title: "searchInferenceEndpoints" image: https://source.unsplash.com/400x175/?github description: API docs for the searchInferenceEndpoints plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchInferenceEndpoints'] --- import searchInferenceEndpointsObj from './search_inference_endpoints.devdocs.json'; diff --git a/api_docs/search_notebooks.mdx b/api_docs/search_notebooks.mdx index 45566ef39733e..8974f0b57aa83 100644 --- a/api_docs/search_notebooks.mdx +++ b/api_docs/search_notebooks.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchNotebooks title: "searchNotebooks" image: https://source.unsplash.com/400x175/?github description: API docs for the searchNotebooks plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchNotebooks'] --- import searchNotebooksObj from './search_notebooks.devdocs.json'; diff --git a/api_docs/search_playground.mdx b/api_docs/search_playground.mdx index 0325c5269b087..9e82cc3351afd 100644 --- a/api_docs/search_playground.mdx +++ b/api_docs/search_playground.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/searchPlayground title: "searchPlayground" image: https://source.unsplash.com/400x175/?github description: API docs for the searchPlayground plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'searchPlayground'] --- import searchPlaygroundObj from './search_playground.devdocs.json'; diff --git a/api_docs/security.devdocs.json b/api_docs/security.devdocs.json index 5abd8e976d886..7e1c6760e405a 100644 --- a/api_docs/security.devdocs.json +++ b/api_docs/security.devdocs.json @@ -5950,10 +5950,6 @@ "plugin": "entityManager", "path": "x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/disable.ts" }, - { - "plugin": "observabilityOnboarding", - "path": "x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts" - }, { "plugin": "synthetics", "path": "x-pack/plugins/observability_solution/synthetics/server/synthetics_service/get_api_key.ts" diff --git a/api_docs/security.mdx b/api_docs/security.mdx index 01a9cc0f7a42a..486e8e38763cb 100644 --- a/api_docs/security.mdx +++ b/api_docs/security.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/security title: "security" image: https://source.unsplash.com/400x175/?github description: API docs for the security plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'security'] --- import securityObj from './security.devdocs.json'; diff --git a/api_docs/security_solution.mdx b/api_docs/security_solution.mdx index e3914201d35df..2ff1d891e1531 100644 --- a/api_docs/security_solution.mdx +++ b/api_docs/security_solution.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolution title: "securitySolution" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolution plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolution'] --- import securitySolutionObj from './security_solution.devdocs.json'; diff --git a/api_docs/security_solution_ess.mdx b/api_docs/security_solution_ess.mdx index 0f611913ee6d5..6e7875dc114b4 100644 --- a/api_docs/security_solution_ess.mdx +++ b/api_docs/security_solution_ess.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionEss title: "securitySolutionEss" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionEss plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionEss'] --- import securitySolutionEssObj from './security_solution_ess.devdocs.json'; diff --git a/api_docs/security_solution_serverless.mdx b/api_docs/security_solution_serverless.mdx index b8c7ee0f95406..fb0d9f4aba9b2 100644 --- a/api_docs/security_solution_serverless.mdx +++ b/api_docs/security_solution_serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/securitySolutionServerless title: "securitySolutionServerless" image: https://source.unsplash.com/400x175/?github description: API docs for the securitySolutionServerless plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'securitySolutionServerless'] --- import securitySolutionServerlessObj from './security_solution_serverless.devdocs.json'; diff --git a/api_docs/serverless.mdx b/api_docs/serverless.mdx index c85867210dcfc..9cc17bcb892f6 100644 --- a/api_docs/serverless.mdx +++ b/api_docs/serverless.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverless title: "serverless" image: https://source.unsplash.com/400x175/?github description: API docs for the serverless plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverless'] --- import serverlessObj from './serverless.devdocs.json'; diff --git a/api_docs/serverless_observability.mdx b/api_docs/serverless_observability.mdx index f28eff99a2d41..8303f92a8a9a5 100644 --- a/api_docs/serverless_observability.mdx +++ b/api_docs/serverless_observability.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessObservability title: "serverlessObservability" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessObservability plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessObservability'] --- import serverlessObservabilityObj from './serverless_observability.devdocs.json'; diff --git a/api_docs/serverless_search.mdx b/api_docs/serverless_search.mdx index 80ceedb0673dd..d27e3005894e9 100644 --- a/api_docs/serverless_search.mdx +++ b/api_docs/serverless_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/serverlessSearch title: "serverlessSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the serverlessSearch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'serverlessSearch'] --- import serverlessSearchObj from './serverless_search.devdocs.json'; diff --git a/api_docs/session_view.mdx b/api_docs/session_view.mdx index e8cc2c57f6770..aff1d8c19d971 100644 --- a/api_docs/session_view.mdx +++ b/api_docs/session_view.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/sessionView title: "sessionView" image: https://source.unsplash.com/400x175/?github description: API docs for the sessionView plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'sessionView'] --- import sessionViewObj from './session_view.devdocs.json'; diff --git a/api_docs/share.mdx b/api_docs/share.mdx index 509345f6173ad..c8a246cbd5837 100644 --- a/api_docs/share.mdx +++ b/api_docs/share.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/share title: "share" image: https://source.unsplash.com/400x175/?github description: API docs for the share plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'share'] --- import shareObj from './share.devdocs.json'; diff --git a/api_docs/slo.mdx b/api_docs/slo.mdx index 8539db01297df..53700201ee04f 100644 --- a/api_docs/slo.mdx +++ b/api_docs/slo.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/slo title: "slo" image: https://source.unsplash.com/400x175/?github description: API docs for the slo plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'slo'] --- import sloObj from './slo.devdocs.json'; diff --git a/api_docs/snapshot_restore.mdx b/api_docs/snapshot_restore.mdx index d33b0c275cc1d..ee0b493ce76e3 100644 --- a/api_docs/snapshot_restore.mdx +++ b/api_docs/snapshot_restore.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/snapshotRestore title: "snapshotRestore" image: https://source.unsplash.com/400x175/?github description: API docs for the snapshotRestore plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'snapshotRestore'] --- import snapshotRestoreObj from './snapshot_restore.devdocs.json'; diff --git a/api_docs/spaces.mdx b/api_docs/spaces.mdx index b2e5b6a6177e6..52c8505216554 100644 --- a/api_docs/spaces.mdx +++ b/api_docs/spaces.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/spaces title: "spaces" image: https://source.unsplash.com/400x175/?github description: API docs for the spaces plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'spaces'] --- import spacesObj from './spaces.devdocs.json'; diff --git a/api_docs/stack_alerts.mdx b/api_docs/stack_alerts.mdx index 8f2f189ff21d8..feabc736b6631 100644 --- a/api_docs/stack_alerts.mdx +++ b/api_docs/stack_alerts.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackAlerts title: "stackAlerts" image: https://source.unsplash.com/400x175/?github description: API docs for the stackAlerts plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackAlerts'] --- import stackAlertsObj from './stack_alerts.devdocs.json'; diff --git a/api_docs/stack_connectors.mdx b/api_docs/stack_connectors.mdx index ac8655d250c9d..5476d109c1431 100644 --- a/api_docs/stack_connectors.mdx +++ b/api_docs/stack_connectors.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/stackConnectors title: "stackConnectors" image: https://source.unsplash.com/400x175/?github description: API docs for the stackConnectors plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'stackConnectors'] --- import stackConnectorsObj from './stack_connectors.devdocs.json'; diff --git a/api_docs/task_manager.devdocs.json b/api_docs/task_manager.devdocs.json index 072749656b481..f14b739a6a8c0 100644 --- a/api_docs/task_manager.devdocs.json +++ b/api_docs/task_manager.devdocs.json @@ -230,7 +230,7 @@ "label": "start", "description": [], "signature": [ - "({ savedObjects, elasticsearch, executionContext, docLinks }: ", + "({ savedObjects, elasticsearch, executionContext, docLinks, }: ", { "pluginId": "@kbn/core-lifecycle-server", "scope": "server", @@ -238,8 +238,6 @@ "section": "def-server.CoreStart", "text": "CoreStart" }, - ", { cloud, serverless }: ", - "TaskManagerPluginStart", ") => ", { "pluginId": "taskManager", @@ -258,7 +256,7 @@ "id": "def-server.TaskManagerPlugin.start.$1", "type": "Object", "tags": [], - "label": "{ savedObjects, elasticsearch, executionContext, docLinks }", + "label": "{\n savedObjects,\n elasticsearch,\n executionContext,\n docLinks,\n }", "description": [], "signature": [ { @@ -273,21 +271,6 @@ "deprecated": false, "trackAdoption": false, "isRequired": true - }, - { - "parentPluginId": "taskManager", - "id": "def-server.TaskManagerPlugin.start.$2", - "type": "Object", - "tags": [], - "label": "{ cloud, serverless }", - "description": [], - "signature": [ - "TaskManagerPluginStart" - ], - "path": "x-pack/plugins/task_manager/server/plugin.ts", - "deprecated": false, - "trackAdoption": false, - "isRequired": true } ], "returnComment": [] @@ -1454,23 +1437,6 @@ "deprecated": false, "trackAdoption": false }, - { - "parentPluginId": "taskManager", - "id": "def-server.TaskRegisterDefinition.cost", - "type": "CompoundType", - "tags": [], - "label": "cost", - "description": [ - "\nAn optional definition of the cost associated with running the task." - ], - "signature": [ - "TaskCost", - " | undefined" - ], - "path": "x-pack/plugins/task_manager/server/task_type_dictionary.ts", - "deprecated": false, - "trackAdoption": false - }, { "parentPluginId": "taskManager", "id": "def-server.TaskRegisterDefinition.description", diff --git a/api_docs/task_manager.mdx b/api_docs/task_manager.mdx index 91245533c693f..de5ecb3c0e1ad 100644 --- a/api_docs/task_manager.mdx +++ b/api_docs/task_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/taskManager title: "taskManager" image: https://source.unsplash.com/400x175/?github description: API docs for the taskManager plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'taskManager'] --- import taskManagerObj from './task_manager.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 107 | 0 | 63 | 7 | +| 105 | 0 | 62 | 5 | ## Server diff --git a/api_docs/telemetry.mdx b/api_docs/telemetry.mdx index 8b3c231e5b674..8f6f39ff22ff0 100644 --- a/api_docs/telemetry.mdx +++ b/api_docs/telemetry.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetry title: "telemetry" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetry plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetry'] --- import telemetryObj from './telemetry.devdocs.json'; diff --git a/api_docs/telemetry_collection_manager.mdx b/api_docs/telemetry_collection_manager.mdx index 097c38a2444c2..7e7429f228cae 100644 --- a/api_docs/telemetry_collection_manager.mdx +++ b/api_docs/telemetry_collection_manager.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionManager title: "telemetryCollectionManager" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionManager plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionManager'] --- import telemetryCollectionManagerObj from './telemetry_collection_manager.devdocs.json'; diff --git a/api_docs/telemetry_collection_xpack.mdx b/api_docs/telemetry_collection_xpack.mdx index ffbb4ac4b8cb6..2039d2bd3f325 100644 --- a/api_docs/telemetry_collection_xpack.mdx +++ b/api_docs/telemetry_collection_xpack.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryCollectionXpack title: "telemetryCollectionXpack" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryCollectionXpack plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryCollectionXpack'] --- import telemetryCollectionXpackObj from './telemetry_collection_xpack.devdocs.json'; diff --git a/api_docs/telemetry_management_section.mdx b/api_docs/telemetry_management_section.mdx index f414f32fcbe67..e531c635e9d91 100644 --- a/api_docs/telemetry_management_section.mdx +++ b/api_docs/telemetry_management_section.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/telemetryManagementSection title: "telemetryManagementSection" image: https://source.unsplash.com/400x175/?github description: API docs for the telemetryManagementSection plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'telemetryManagementSection'] --- import telemetryManagementSectionObj from './telemetry_management_section.devdocs.json'; diff --git a/api_docs/threat_intelligence.mdx b/api_docs/threat_intelligence.mdx index 7e69fe696ba5f..6f88699be8732 100644 --- a/api_docs/threat_intelligence.mdx +++ b/api_docs/threat_intelligence.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/threatIntelligence title: "threatIntelligence" image: https://source.unsplash.com/400x175/?github description: API docs for the threatIntelligence plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'threatIntelligence'] --- import threatIntelligenceObj from './threat_intelligence.devdocs.json'; diff --git a/api_docs/timelines.mdx b/api_docs/timelines.mdx index 99eb93cb43518..bff6be0c92a2e 100644 --- a/api_docs/timelines.mdx +++ b/api_docs/timelines.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/timelines title: "timelines" image: https://source.unsplash.com/400x175/?github description: API docs for the timelines plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'timelines'] --- import timelinesObj from './timelines.devdocs.json'; diff --git a/api_docs/transform.mdx b/api_docs/transform.mdx index 8815f25984905..7d961eec5568c 100644 --- a/api_docs/transform.mdx +++ b/api_docs/transform.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/transform title: "transform" image: https://source.unsplash.com/400x175/?github description: API docs for the transform plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'transform'] --- import transformObj from './transform.devdocs.json'; diff --git a/api_docs/triggers_actions_ui.devdocs.json b/api_docs/triggers_actions_ui.devdocs.json index 559bde99779b9..303af21b7d997 100644 --- a/api_docs/triggers_actions_ui.devdocs.json +++ b/api_docs/triggers_actions_ui.devdocs.json @@ -9361,7 +9361,7 @@ "label": "buildAggregation", "description": [], "signature": [ - "({ timeSeries, aggType, aggField, termField, termSize, sourceFieldsParams, condition, topHitsSize, }: ", + "({ timeSeries, aggType, aggField, termField, termSize, sourceFieldsParams, condition, topHitsSize, loggerCb, }: ", { "pluginId": "triggersActionsUi", "scope": "common", @@ -9382,7 +9382,7 @@ "id": "def-common.buildAggregation.$1", "type": "Object", "tags": [], - "label": "{\n timeSeries,\n aggType,\n aggField,\n termField,\n termSize,\n sourceFieldsParams,\n condition,\n topHitsSize,\n}", + "label": "{\n timeSeries,\n aggType,\n aggField,\n termField,\n termSize,\n sourceFieldsParams,\n condition,\n topHitsSize,\n loggerCb,\n}", "description": [], "signature": [ { @@ -9875,6 +9875,38 @@ "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", "deprecated": false, "trackAdoption": false + }, + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.loggerCb", + "type": "Function", + "tags": [], + "label": "loggerCb", + "description": [], + "signature": [ + "((message: string) => void) | undefined" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "children": [ + { + "parentPluginId": "triggersActionsUi", + "id": "def-common.BuildAggregationOpts.loggerCb.$1", + "type": "string", + "tags": [], + "label": "message", + "description": [], + "signature": [ + "string" + ], + "path": "x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts", + "deprecated": false, + "trackAdoption": false, + "isRequired": true + } + ], + "returnComment": [] } ], "initialIsOpen": false diff --git a/api_docs/triggers_actions_ui.mdx b/api_docs/triggers_actions_ui.mdx index 0ccfa2dbf7c76..357698033c16a 100644 --- a/api_docs/triggers_actions_ui.mdx +++ b/api_docs/triggers_actions_ui.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/triggersActionsUi title: "triggersActionsUi" image: https://source.unsplash.com/400x175/?github description: API docs for the triggersActionsUi plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'triggersActionsUi'] --- import triggersActionsUiObj from './triggers_actions_ui.devdocs.json'; @@ -21,7 +21,7 @@ Contact [@elastic/response-ops](https://github.com/orgs/elastic/teams/response-o | Public API count | Any count | Items lacking comments | Missing exports | |-------------------|-----------|------------------------|-----------------| -| 588 | 1 | 562 | 51 | +| 590 | 1 | 564 | 51 | ## Client diff --git a/api_docs/ui_actions.mdx b/api_docs/ui_actions.mdx index 335795512ab6f..8ce65408cac17 100644 --- a/api_docs/ui_actions.mdx +++ b/api_docs/ui_actions.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActions title: "uiActions" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActions plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActions'] --- import uiActionsObj from './ui_actions.devdocs.json'; diff --git a/api_docs/ui_actions_enhanced.mdx b/api_docs/ui_actions_enhanced.mdx index 03be17bd18078..06a761e387c10 100644 --- a/api_docs/ui_actions_enhanced.mdx +++ b/api_docs/ui_actions_enhanced.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uiActionsEnhanced title: "uiActionsEnhanced" image: https://source.unsplash.com/400x175/?github description: API docs for the uiActionsEnhanced plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uiActionsEnhanced'] --- import uiActionsEnhancedObj from './ui_actions_enhanced.devdocs.json'; diff --git a/api_docs/unified_doc_viewer.mdx b/api_docs/unified_doc_viewer.mdx index fc8b953e88b02..6873230f999ff 100644 --- a/api_docs/unified_doc_viewer.mdx +++ b/api_docs/unified_doc_viewer.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedDocViewer title: "unifiedDocViewer" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedDocViewer plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedDocViewer'] --- import unifiedDocViewerObj from './unified_doc_viewer.devdocs.json'; diff --git a/api_docs/unified_histogram.mdx b/api_docs/unified_histogram.mdx index 19465b1483862..f827f569bd53f 100644 --- a/api_docs/unified_histogram.mdx +++ b/api_docs/unified_histogram.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedHistogram title: "unifiedHistogram" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedHistogram plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedHistogram'] --- import unifiedHistogramObj from './unified_histogram.devdocs.json'; diff --git a/api_docs/unified_search.mdx b/api_docs/unified_search.mdx index 731fa8e5ae6c7..e8ba15514e456 100644 --- a/api_docs/unified_search.mdx +++ b/api_docs/unified_search.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch title: "unifiedSearch" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch'] --- import unifiedSearchObj from './unified_search.devdocs.json'; diff --git a/api_docs/unified_search_autocomplete.mdx b/api_docs/unified_search_autocomplete.mdx index 59e5f8c9232ad..3b5eb21b2a594 100644 --- a/api_docs/unified_search_autocomplete.mdx +++ b/api_docs/unified_search_autocomplete.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/unifiedSearch-autocomplete title: "unifiedSearch.autocomplete" image: https://source.unsplash.com/400x175/?github description: API docs for the unifiedSearch.autocomplete plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'unifiedSearch.autocomplete'] --- import unifiedSearchAutocompleteObj from './unified_search_autocomplete.devdocs.json'; diff --git a/api_docs/uptime.mdx b/api_docs/uptime.mdx index 45f5dade79385..f629fe28c3f15 100644 --- a/api_docs/uptime.mdx +++ b/api_docs/uptime.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/uptime title: "uptime" image: https://source.unsplash.com/400x175/?github description: API docs for the uptime plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'uptime'] --- import uptimeObj from './uptime.devdocs.json'; diff --git a/api_docs/url_forwarding.mdx b/api_docs/url_forwarding.mdx index bd3d3357f54aa..66a7300fb1bbb 100644 --- a/api_docs/url_forwarding.mdx +++ b/api_docs/url_forwarding.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/urlForwarding title: "urlForwarding" image: https://source.unsplash.com/400x175/?github description: API docs for the urlForwarding plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'urlForwarding'] --- import urlForwardingObj from './url_forwarding.devdocs.json'; diff --git a/api_docs/usage_collection.mdx b/api_docs/usage_collection.mdx index 3a6838a2e6793..6a4287a5b89ce 100644 --- a/api_docs/usage_collection.mdx +++ b/api_docs/usage_collection.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/usageCollection title: "usageCollection" image: https://source.unsplash.com/400x175/?github description: API docs for the usageCollection plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'usageCollection'] --- import usageCollectionObj from './usage_collection.devdocs.json'; diff --git a/api_docs/ux.mdx b/api_docs/ux.mdx index e4248424bd329..49ee2b2a2d8cb 100644 --- a/api_docs/ux.mdx +++ b/api_docs/ux.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/ux title: "ux" image: https://source.unsplash.com/400x175/?github description: API docs for the ux plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'ux'] --- import uxObj from './ux.devdocs.json'; diff --git a/api_docs/vis_default_editor.mdx b/api_docs/vis_default_editor.mdx index 73d7e6f5d5559..64f4590c4e8db 100644 --- a/api_docs/vis_default_editor.mdx +++ b/api_docs/vis_default_editor.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visDefaultEditor title: "visDefaultEditor" image: https://source.unsplash.com/400x175/?github description: API docs for the visDefaultEditor plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visDefaultEditor'] --- import visDefaultEditorObj from './vis_default_editor.devdocs.json'; diff --git a/api_docs/vis_type_gauge.mdx b/api_docs/vis_type_gauge.mdx index bc4c6e9570cfb..d4158d4d9d695 100644 --- a/api_docs/vis_type_gauge.mdx +++ b/api_docs/vis_type_gauge.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeGauge title: "visTypeGauge" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeGauge plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeGauge'] --- import visTypeGaugeObj from './vis_type_gauge.devdocs.json'; diff --git a/api_docs/vis_type_heatmap.mdx b/api_docs/vis_type_heatmap.mdx index b31dac9013562..c9f718e456b4a 100644 --- a/api_docs/vis_type_heatmap.mdx +++ b/api_docs/vis_type_heatmap.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeHeatmap title: "visTypeHeatmap" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeHeatmap plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeHeatmap'] --- import visTypeHeatmapObj from './vis_type_heatmap.devdocs.json'; diff --git a/api_docs/vis_type_pie.mdx b/api_docs/vis_type_pie.mdx index 6044e8c7ed526..a73a6bf09359d 100644 --- a/api_docs/vis_type_pie.mdx +++ b/api_docs/vis_type_pie.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypePie title: "visTypePie" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypePie plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypePie'] --- import visTypePieObj from './vis_type_pie.devdocs.json'; diff --git a/api_docs/vis_type_table.mdx b/api_docs/vis_type_table.mdx index 25111533c2f61..a00ef9f73d6b1 100644 --- a/api_docs/vis_type_table.mdx +++ b/api_docs/vis_type_table.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTable title: "visTypeTable" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTable plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTable'] --- import visTypeTableObj from './vis_type_table.devdocs.json'; diff --git a/api_docs/vis_type_timelion.mdx b/api_docs/vis_type_timelion.mdx index c20d6711e57f0..d80ca5455c75a 100644 --- a/api_docs/vis_type_timelion.mdx +++ b/api_docs/vis_type_timelion.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimelion title: "visTypeTimelion" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimelion plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimelion'] --- import visTypeTimelionObj from './vis_type_timelion.devdocs.json'; diff --git a/api_docs/vis_type_timeseries.mdx b/api_docs/vis_type_timeseries.mdx index 48597057490f0..dea362715607c 100644 --- a/api_docs/vis_type_timeseries.mdx +++ b/api_docs/vis_type_timeseries.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeTimeseries title: "visTypeTimeseries" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeTimeseries plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeTimeseries'] --- import visTypeTimeseriesObj from './vis_type_timeseries.devdocs.json'; diff --git a/api_docs/vis_type_vega.mdx b/api_docs/vis_type_vega.mdx index e6f85762d6634..4854c14bb51c7 100644 --- a/api_docs/vis_type_vega.mdx +++ b/api_docs/vis_type_vega.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVega title: "visTypeVega" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVega plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVega'] --- import visTypeVegaObj from './vis_type_vega.devdocs.json'; diff --git a/api_docs/vis_type_vislib.mdx b/api_docs/vis_type_vislib.mdx index 35b6b00c53f8d..82c7940c8c6cd 100644 --- a/api_docs/vis_type_vislib.mdx +++ b/api_docs/vis_type_vislib.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeVislib title: "visTypeVislib" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeVislib plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeVislib'] --- import visTypeVislibObj from './vis_type_vislib.devdocs.json'; diff --git a/api_docs/vis_type_xy.mdx b/api_docs/vis_type_xy.mdx index 79cdc80bf117a..8ae3570a2fe59 100644 --- a/api_docs/vis_type_xy.mdx +++ b/api_docs/vis_type_xy.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visTypeXy title: "visTypeXy" image: https://source.unsplash.com/400x175/?github description: API docs for the visTypeXy plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visTypeXy'] --- import visTypeXyObj from './vis_type_xy.devdocs.json'; diff --git a/api_docs/visualizations.mdx b/api_docs/visualizations.mdx index 3bf24b520bdb6..18d7faaade251 100644 --- a/api_docs/visualizations.mdx +++ b/api_docs/visualizations.mdx @@ -8,7 +8,7 @@ slug: /kibana-dev-docs/api/visualizations title: "visualizations" image: https://source.unsplash.com/400x175/?github description: API docs for the visualizations plugin -date: 2024-07-30 +date: 2024-07-31 tags: ['contributor', 'dev', 'apidocs', 'kibana', 'visualizations'] --- import visualizationsObj from './visualizations.devdocs.json'; diff --git a/docs/management/action-types.asciidoc b/docs/management/action-types.asciidoc index 7e5ec0cb962af..da58ff6f295b0 100644 --- a/docs/management/action-types.asciidoc +++ b/docs/management/action-types.asciidoc @@ -92,6 +92,10 @@ a| <> | Create an incident in {swimlane}. +a| <> + +| Create cases and alerts in {thehive}. + a| <> | Send events to a Tines Story. diff --git a/docs/management/connectors/action-types/thehive.asciidoc b/docs/management/connectors/action-types/thehive.asciidoc new file mode 100644 index 0000000000000..9ee6a2e4325c1 --- /dev/null +++ b/docs/management/connectors/action-types/thehive.asciidoc @@ -0,0 +1,79 @@ +[[thehive-action-type]] +== TheHive connector and action +++++ +TheHive +++++ +:frontmatter-description: Add a connector that can create cases and alerts in TheHive. +:frontmatter-tags-products: [kibana] +:frontmatter-tags-content-type: [how-to] +:frontmatter-tags-user-goals: [configure] + +TheHive connector uses the https://docs.strangebee.com/thehive/api-docs/[TheHive (v1) REST API] to create cases and alerts. + +[float] +[[define-thehive-ui]] +=== Create connectors in {kib} + +You can create connectors in *{stack-manage-app} > {connectors-ui}* +or as needed when you're creating a rule. For example: + +[role="screenshot"] +image::management/connectors/images/thehive-connector.png[TheHive connector] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. + +[float] +[[thehive-connector-configuration]] +==== Connector configuration + +TheHive connectors have the following configuration properties: + +Name:: The name of the connector. +Organisation:: Organisation name in which user intends to create cases or alerts. +URL:: TheHive instance URL. +API Key:: TheHive API key for authentication. + +[float] +[[TheHive-action-configuration]] +=== Test connectors + +You can test connectors for creating a case or an alert with the <> or +as you're creating or editing the connector in {kib}. For example: + +[role="screenshot"] +image::management/connectors/images/thehive-params-case-test.png[TheHive case params test] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. + +[role="screenshot"] +image::management/connectors/images/thehive-params-alert-test.png[TheHive alert params test] +// NOTE: This is an autogenerated screenshot. Do not edit it directly. + +TheHive actions have the following configuration properties. + +Event Action:: Action that will be performed in thehive. Supported actions are Create Case (default) and Create Alert. +Title:: Title of the incident. +Description:: The details about the incident. +Severity:: Severity of the incident. This can be one of `LOW`, `MEDIUM`(default), `HIGH` or `CRITICAL`. +TLP:: Traffic Light Protocol designation for the incident. This can be one of `CLEAR`, `GREEN`, `AMBER`(default), `AMBER+STRICT` or `RED`. +Tags:: The keywords or tags about the incident. +Additional comments:: Additional information about the Case. +Type:: Type of the Alert. +Source:: Source of the Alert. +Source Reference:: Source reference of the Alert. + +[float] +[[thehive-connector-networking-configuration]] +=== Connector networking configuration + +Use the <> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations. + +[float] +[[configure-thehive]] +=== Configure TheHive + +To generate an API Key in TheHive: + +1. Log in to your TheHive instance. +2. Open profile tab and select the settings. +3. Go to *API Key*. +4. Click *Create* if no API key has been created previously; otherwise, you can view the API key by clicking on *Reveal*. +5. Copy the *API key* value to configure the connector in {kib}. \ No newline at end of file diff --git a/docs/management/connectors/images/thehive-connector.png b/docs/management/connectors/images/thehive-connector.png new file mode 100644 index 0000000000000..592307023172e Binary files /dev/null and b/docs/management/connectors/images/thehive-connector.png differ diff --git a/docs/management/connectors/images/thehive-params-alert-test.png b/docs/management/connectors/images/thehive-params-alert-test.png new file mode 100644 index 0000000000000..c72eff5e31054 Binary files /dev/null and b/docs/management/connectors/images/thehive-params-alert-test.png differ diff --git a/docs/management/connectors/images/thehive-params-case-test.png b/docs/management/connectors/images/thehive-params-case-test.png new file mode 100644 index 0000000000000..a7004bdf35af0 Binary files /dev/null and b/docs/management/connectors/images/thehive-params-case-test.png differ diff --git a/docs/management/connectors/index.asciidoc b/docs/management/connectors/index.asciidoc index 5ce924fcdcf04..18f2c28d10f04 100644 --- a/docs/management/connectors/index.asciidoc +++ b/docs/management/connectors/index.asciidoc @@ -19,6 +19,7 @@ include::action-types/servicenow-sir.asciidoc[leveloffset=+1] include::action-types/servicenow-itom.asciidoc[leveloffset=+1] include::action-types/swimlane.asciidoc[leveloffset=+1] include::action-types/slack.asciidoc[leveloffset=+1] +include::action-types/thehive.asciidoc[leveloffset=+1] include::action-types/tines.asciidoc[leveloffset=+1] include::action-types/torq.asciidoc[leveloffset=+1] include::action-types/webhook.asciidoc[leveloffset=+1] diff --git a/docs/osquery/exported-fields-reference.asciidoc b/docs/osquery/exported-fields-reference.asciidoc index b3127f2ad48cf..99cb79e874754 100644 --- a/docs/osquery/exported-fields-reference.asciidoc +++ b/docs/osquery/exported-fields-reference.asciidoc @@ -155,7 +155,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *amperage* - keyword, number.long -* _battery.amperage_ - The battery's current amperage in mA +* _battery.amperage_ - The current amperage in/out of the battery in mA (positive means charging, negative means discharging) *anonymous* - keyword, number.long @@ -749,6 +749,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _disk_events.checksum_ - UDIF Master checksum if available (CRC32) +*chemistry* - keyword, text.text + +* _battery.chemistry_ - The battery chemistry type (eg. LiP). Some possible values are documented in https://learn.microsoft.com/en-us/windows/win32/power/battery-information-str. + *child_pid* - keyword, number.long * _es_process_events.child_pid_ - Process ID of a child process in case of a fork event @@ -1204,7 +1208,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *current_capacity* - keyword, number.long -* _battery.current_capacity_ - The battery's current charged capacity in mAh +* _battery.current_capacity_ - The battery's current capacity (level of charge) in mAh *current_clock_speed* - keyword, number.long @@ -1330,7 +1334,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *description* - keyword, text.text * _appcompat_shims.description_ - Description of the SDB. -* _atom_packages.description_ - Package supplied description * _browser_plugins.description_ - Plugin description text * _chassis_info.description_ - An extended description of the chassis if available. * _chrome_extensions.description_ - Extension-optional description @@ -1348,6 +1351,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _osquery_flags.description_ - Flag description * _patches.description_ - Fuller description of the patch. * _safari_extensions.description_ - Optional extension description text +* _secureboot.description_ - (Apple Silicon) Human-readable description: 'Full Security', 'Reduced Security', or 'Permissive Security' * _services.description_ - Service Description * _shared_resources.description_ - A textual description of the object * _smbios_tables.description_ - Table entry description @@ -2063,7 +2067,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *flags* - keyword -* _device_partitions.flags_ - +* _device_partitions.flags_ - Value that describes the partition (TSK_VS_PART_FLAG_ENUM) * _dns_cache.flags_ - DNS record flags * _interface_details.flags_ - Flags (netdevice) for the device * _kernel_keys.flags_ - A set of flags describing the state of the key. @@ -2326,7 +2330,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *homepage* - keyword, text.text -* _atom_packages.homepage_ - Package supplied homepage * _npm_packages.homepage_ - Package supplied homepage *hop_limit* - keyword, number.long @@ -2492,6 +2495,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _shadow.inactive_ - Number of days after password expires until account is blocked * _virtual_memory_info.inactive_ - Total number of inactive pages. +*include_remote* - keyword, number.long + +* _users.include_remote_ - 1 to include remote (LDAP/AD) accounts (default 0). Warning: without any uid/username filtering it may list whole LDAP directories + *inetd_compatibility* - keyword, text.text * _launchd.inetd_compatibility_ - Run this daemon or agent as it was launched from inetd @@ -2581,6 +2588,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _chrome_extensions.install_timestamp_ - Extension install time, converted to unix time +*installed_at* - keyword, number.long + +* _vscode_extensions.installed_at_ - Installed Timestamp + *installed_by* - keyword, text.text * _patches.installed_by_ - The system context in which the patch as installed. @@ -2790,6 +2801,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _launchd.keep_alive_ - Should the process be restarted if killed +*kernel_extensions* - keyword, number.long + +* _secureboot.kernel_extensions_ - (Apple Silicon) Allow user management of kernel extensions from identified developers (1 if allowed) + *kernel_memory* - keyword, number.long * _docker_info.kernel_memory_ - 1 if kernel memory limit support is enabled. 0 otherwise @@ -2835,6 +2850,18 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _authorized_keys.key_file_ - Path to the authorized_keys file * _known_hosts.key_file_ - Path to known_hosts file +*key_group_name* - keyword, text.text + +* _user_ssh_keys.key_group_name_ - The group of the private key. Supported for a subset of key_types implemented by OpenSSL + +*key_length* - keyword, number.long + +* _user_ssh_keys.key_length_ - The cryptographic length of the cryptosystem to which the private key belongs, in bits. Definition of cryptographic length is specific to cryptosystem. -1 if unavailable + +*key_security_bits* - keyword, number.long + +* _user_ssh_keys.key_security_bits_ - The number of security bits of the private key, bits of security as defined in NIST SP800-57. -1 if unavailable + *key_strength* - keyword, text.text * _certificates.key_strength_ - Key size used for RSA/DSA, or curve name @@ -2884,7 +2911,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _authorization_mechanisms.label_ - Label of the authorization right * _authorizations.label_ - Item name, usually in reverse domain format * _block_devices.label_ - Block device label string -* _device_partitions.label_ - +* _device_partitions.label_ - The partition name as stored in the partition table * _keychain_acls.label_ - An optional label tag that may be included with the keychain entry * _keychain_items.label_ - Generic item name * _launchd.label_ - Daemon or agent service name @@ -2985,7 +3012,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *license* - keyword, text.text -* _atom_packages.license_ - License for package * _chocolatey_packages.license_ - License under which package is launched * _npm_packages.license_ - License under which package is launched * _python_packages.license_ - License under which package is launched @@ -2998,6 +3024,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _kernel_extensions.linked_against_ - Indexes of extensions this extension is linked against +*load_percentage* - keyword, number.long + +* _cpu_info.load_percentage_ - The current percentage of utilization of the CPU. + *load_state* - keyword, text.text * _systemd_units.load_state_ - Reflects whether the unit definition was properly loaded @@ -3281,6 +3311,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _system_extensions.mdm_managed_ - 1 if managed by MDM system extension payload configuration, 0 otherwise +*mdm_operations* - keyword, number.long + +* _secureboot.mdm_operations_ - (Apple Silicon) Allow remote (MDM) management of kernel extensions and automatic software updates (1 if allowed) + *mechanism* - keyword, text.text * _authorization_mechanisms.mechanism_ - Name of the mechanism that will be called @@ -3392,6 +3426,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _ycloud_instance_metadata.metadata_endpoint_ - Endpoint used to fetch VM metadata +*metalink* - keyword, text.text + +* _yum_sources.metalink_ - Metalink URL + *method* - keyword, text.text * _curl.method_ - The HTTP method for the request @@ -3473,7 +3511,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *minutes_to_full_charge* - keyword, number.long -* _battery.minutes_to_full_charge_ - The number of minutes until the battery is fully charged. This value is -1 if this time is still being calculated +* _battery.minutes_to_full_charge_ - The number of minutes until the battery is fully charged. This value is -1 if this time is still being calculated. On Windows this is calculated from the charge rate and capacity and may not agree with the number reported in "Power & Battery" *minutes_until_empty* - keyword, number.long @@ -3591,7 +3629,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _apparmor_profiles.name_ - Policy name. * _apps.name_ - Name of the Name.app folder * _apt_sources.name_ - Repository name -* _atom_packages.name_ - Package display name * _autoexec.name_ - Name of the program * _azure_instance_metadata.name_ - Name of the VM * _block_devices.name_ - Block device name @@ -3662,6 +3699,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _startup_items.name_ - Name of startup item * _system_controls.name_ - Full sysctl MIB name * _temperature_sensors.name_ - Name of temperature source +* _vscode_extensions.name_ - Extension Name * _windows_firewall_rules.name_ - Friendly name of the rule * _windows_optional_features.name_ - Name of the feature * _windows_search.name_ - The name of the item @@ -3825,7 +3863,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *offset* - keyword, number.long -* _device_partitions.offset_ - +* _device_partitions.offset_ - Byte offset from the start of the volume * _process_memory_map.offset_ - Offset into mapped path *oid* - keyword, text.text @@ -4126,7 +4164,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _apparmor_profiles.path_ - Unique, aa-status compatible, policy identifier. * _appcompat_shims.path_ - This is the path to the SDB database. * _apps.path_ - Absolute and full Name.app path -* _atom_packages.path_ - Package's package.json path * _augeas.path_ - The path to the configuration file * _authenticode.path_ - Must provide a path or directory * _autoexec.path_ - Path to the executable @@ -4203,6 +4240,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _user_events.path_ - Supplied path from event * _user_ssh_keys.path_ - Path to key file * _userassist.path_ - Application file path. +* _vscode_extensions.path_ - Extension path * _windows_crashes.path_ - Path of the executable file for the crashed process * _windows_search.path_ - The full path of the item. * _yara.path_ - The path scanned @@ -4279,7 +4317,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *permissions* - keyword, text.text * _chrome_extensions.permissions_ - The permissions required by the extension -* _kernel_keys.permissions_ - The key permissions, expressed as four hexadecimalbytes containing, from left to right, thepossessor, user, group, and other permissions. +* _kernel_keys.permissions_ - The key permissions, expressed as four hexadecimal bytes containing, from left to right, the possessor, user, group, and other permissions. * _process_memory_map.permissions_ - r=read, w=write, x=execute, p=private (cow) * _shared_memory.permissions_ - Memory segment permissions * _suid_bin.permissions_ - Binary permissions @@ -4512,6 +4550,10 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _docker_container_stats.preread_ - UNIX time when stats were last read +*prerelease* - keyword, number.long + +* _vscode_extensions.prerelease_ - Pre release version + *principal* - keyword, text.text * _ntfs_acl_permissions.principal_ - User or group to which the ACE applies. @@ -4676,6 +4718,11 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _azure_instance_metadata.publisher_ - Publisher of the VM image * _osquery_events.publisher_ - Name of the associated publisher * _programs.publisher_ - Name of the product supplier. +* _vscode_extensions.publisher_ - Publisher Name + +*publisher_id* - keyword, text.text + +* _vscode_extensions.publisher_id_ - Publisher ID *purgeable* - keyword, number.long @@ -4943,6 +4990,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _deb_packages.revision_ - Package revision * _hardware_events.revision_ - Device revision (optional) +* _os_version.revision_ - Update Build Revision, refers to the specific revision number of a Windows update * _platform_info.revision_ - BIOS major and minor revision *roaming* - keyword, number.long @@ -5079,7 +5127,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *secure_mode* - keyword, number.long -* _secureboot.secure_mode_ - Secure mode for Intel-based macOS: 0 disabled, 1 full security, 2 medium security +* _secureboot.secure_mode_ - (Intel) Secure mode: 0 disabled, 1 full security, 2 medium security *secure_process* - keyword, number.long @@ -5139,7 +5187,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *serial_number* - keyword, text.text * _authenticode.serial_number_ - The certificate serial number -* _battery.serial_number_ - The battery's unique serial number +* _battery.serial_number_ - The battery's serial number * _connected_displays.serial_number_ - The serial number of the display. (may not be unique) * _curl_certificate.serial_number_ - Certificate serial number * _kernel_keys.serial_number_ - The serial key of the key. @@ -5240,6 +5288,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *sha256* - keyword, text.text +* _apparmor_profiles.sha256_ - A unique hash that identifies this policy. * _carves.sha256_ - A SHA256 sum of the carved archive * _device_hash.sha256_ - SHA256 hash of provided inode data * _file_events.sha256_ - The SHA256 of the file after change @@ -5274,6 +5323,30 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _shared_memory.shmid_ - Shared memory segment ID +*shortcut_comment* - keyword, text.text + +* _file.shortcut_comment_ - Comment on the shortcut + +*shortcut_run* - keyword, text.text + +* _file.shortcut_run_ - Window mode the target of the shortcut should be run in + +*shortcut_start_in* - keyword, text.text + +* _file.shortcut_start_in_ - Full path to the working directory to use when executing the shortcut target + +*shortcut_target_location* - keyword, text.text + +* _file.shortcut_target_location_ - Folder name where the shortcut target resides + +*shortcut_target_path* - keyword, text.text + +* _file.shortcut_target_path_ - Full path to the file the shortcut points to + +*shortcut_target_type* - keyword, text.text + +* _file.shortcut_target_type_ - Display name for the target type + *sid* - keyword, text.text * _background_activities_moderator.sid_ - User SID. @@ -5413,6 +5486,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _startup_items.source_ - Directory or plist containing startup item * _sudoers.source_ - Source file containing the given rule * _windows_events.source_ - Source or channel of the event +* _yum_sources.source_ - Source file *source_path* - keyword, text.text @@ -5799,7 +5873,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *team_id* - keyword, text.text -* _es_process_events.team_id_ - Team identifier of thd process +* _es_process_events.team_id_ - Team identifier of the process *team_identifier* - keyword, text.text @@ -5879,7 +5953,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _authorizations.timeout_ - Label top-level key * _curl_certificate.timeout_ - Set this value to the timeout in seconds to complete the TLS handshake (default 4s, use 0 for no timeout) -* _kernel_keys.timeout_ - The amount of time until the key will expire,expressed in human-readable form. The string perm heremeans that the key is permanent (no timeout). Thestring expd means that the key has already expired. +* _kernel_keys.timeout_ - The amount of time until the key will expire, expressed in human-readable form. The string perm here means that the key is permanent (no timeout). The string expd means that the key has already expired. *timestamp* - keyword, text.text @@ -5915,7 +5989,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *total_size* - keyword, number.long * _docker_container_processes.total_size_ - Total virtual memory size -* _processes.total_size_ - Total virtual memory size +* _processes.total_size_ - Total virtual memory size (Linux, Windows) or 'footprint' (macOS) *total_width* - keyword, number.long @@ -5960,7 +6034,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _crashes.type_ - Type of crash log * _device_file.type_ - File status * _device_firmware.type_ - Type of device -* _device_partitions.type_ - +* _device_partitions.type_ - Filesystem type if recognized, otherwise, 'meta', 'normal', or 'unallocated' * _disk_encryption.type_ - Description of cipher type and mode if available * _disk_info.type_ - The interface type of the disk. * _dns_cache.type_ - DNS record type @@ -5971,6 +6045,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _file.type_ - File status * _firefox_addons.type_ - Extension, addon, webapp * _hardware_events.type_ - Type of hardware and hardware event +* _homebrew_packages.type_ - Package type ('formula' or 'cask') * _interface_addresses.type_ - Type of address. One of dhcp, manual, auto, other, unknown * _interface_details.type_ - Interface type (includes virtual) * _kernel_keys.type_ - The key type. @@ -6013,7 +6088,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _account_policy_data.uid_ - User ID * _asl.uid_ - UID that sent the log message (set by the server). -* _atom_packages.uid_ - The local user that owns the plugin * _authorized_keys.uid_ - The local owner of authorized_keys file * _bpf_process_events.uid_ - User ID * _bpf_socket_events.uid_ - User ID @@ -6044,6 +6118,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _user_groups.uid_ - User ID * _user_ssh_keys.uid_ - The local user that owns the key file * _users.uid_ - User ID +* _vscode_extensions.uid_ - The local user that owns the plugin *uid_signed* - keyword, number.long @@ -6144,7 +6219,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq *usage* - keyword, number.long -* _kernel_keys.usage_ - the number of threads and open file references thatrefer to this key. +* _kernel_keys.usage_ - the number of threads and open file references that refer to this key. *usb_address* - keyword, number.long @@ -6239,6 +6314,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _osquery_info.uuid_ - Unique ID provided by the system * _system_info.uuid_ - Unique ID provided by the system * _users.uuid_ - User's UUID (Apple) or SID (Windows) +* _vscode_extensions.uuid_ - Extension UUID *valid_from* - keyword, text.text @@ -6315,7 +6391,6 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _alf.version_ - Application Layer Firewall version * _apt_sources.version_ - Repository source version -* _atom_packages.version_ - Package supplied version * _authorizations.version_ - Label top-level key * _azure_instance_metadata.version_ - Version of the VM image * _bitlocker_info.version_ - The FVE metadata version of the drive. @@ -6357,6 +6432,7 @@ For more information about osquery tables, see the https://osquery.io/schema[osq * _safari_extensions.version_ - Extension long version * _system_extensions.version_ - System extension version * _usb_devices.version_ - USB Device version number +* _vscode_extensions.version_ - Extension version * _windows_crashes.version_ - File version info of the crashed process *video_mode* - keyword, text.text diff --git a/docs/settings/alert-action-settings.asciidoc b/docs/settings/alert-action-settings.asciidoc index 66dd681f534b1..d41871917c4a1 100644 --- a/docs/settings/alert-action-settings.asciidoc +++ b/docs/settings/alert-action-settings.asciidoc @@ -138,7 +138,7 @@ WARNING: This feature is available in {kib} 7.17.4 and 8.3.0 onwards but is not A boolean value indicating that a footer with a relevant link should be added to emails sent as alerting actions. Default: true. `xpack.actions.enabledActionTypes` {ess-icon}:: -A list of action types that are enabled. It defaults to `["*"]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.opsgenie`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.tines`, `.torq`, `.xmatters`, `.gen-ai`, `.bedrock`, `.gemini`, `.d3security`, and `.webhook`. An empty list `[]` will disable all action types. +A list of action types that are enabled. It defaults to `["*"]`, enabling all types. The names for built-in {kib} action types are prefixed with a `.` and include: `.email`, `.index`, `.jira`, `.opsgenie`, `.pagerduty`, `.resilient`, `.server-log`, `.servicenow`, .`servicenow-itom`, `.servicenow-sir`, `.slack`, `.swimlane`, `.teams`, `.thehive`, `.tines`, `.torq`, `.xmatters`, `.gen-ai`, `.bedrock`, `.gemini`, `.d3security`, and `.webhook`. An empty list `[]` will disable all action types. + Disabled action types will not appear as an option when creating new connectors, but existing connectors and actions of that type will remain in {kib} and will not function. diff --git a/examples/controls_example/public/react_controls/control_group/components/control_group.tsx b/examples/controls_example/public/react_controls/control_group/components/control_group.tsx index c8eb00b52ed9d..9608d8b082f40 100644 --- a/examples/controls_example/public/react_controls/control_group/components/control_group.tsx +++ b/examples/controls_example/public/react_controls/control_group/components/control_group.tsx @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import React, { useCallback, useEffect, useState } from 'react'; +import React, { useCallback, useEffect, useMemo, useState } from 'react'; import { BehaviorSubject } from 'rxjs'; import { DndContext, @@ -98,64 +98,84 @@ export function ControlGroup({ }; }, [controlGroupApi]); + const ApplyButtonComponent = useMemo(() => { + return ( + + ); + }, [hasUnappliedSelections, applySelections]); + return ( - - + + {!isInitialized && } - setDraggingId(`${active.id}`)} - onDragEnd={onDragEnd} - onDragCancel={() => setDraggingId(null)} - sensors={sensors} - measuring={{ - droppable: { - strategy: MeasuringStrategy.BeforeDragging, - }, - }} - > - - {controlsInOrder.map(({ id, type }) => ( - controlGroupApi} - onApiAvailable={(controlApi) => { - controlsManager.setControlApi(id, controlApi); - }} - isControlGroupInitialized={isInitialized} - /> - ))} - - - {draggingId ? ( - - ) : null} - - - {!autoApplySelections && ( - - - - + + setDraggingId(`${active.id}`)} + onDragEnd={onDragEnd} + onDragCancel={() => setDraggingId(null)} + sensors={sensors} + measuring={{ + droppable: { + strategy: MeasuringStrategy.BeforeDragging, + }, + }} + > + + + {controlsInOrder.map(({ id, type }) => ( + controlGroupApi} + onApiAvailable={(controlApi) => { + controlsManager.setControlApi(id, controlApi); + }} + isControlGroupInitialized={isInitialized} + /> + ))} + + + + {draggingId ? ( + + ) : null} + + + + {isInitialized && !autoApplySelections && ( + + {hasUnappliedSelections ? ( + ApplyButtonComponent + ) : ( + + {ApplyButtonComponent} + + )} )} diff --git a/examples/controls_example/public/react_controls/timeslider_control/components/index.scss b/examples/controls_example/public/react_controls/timeslider_control/components/index.scss index 9fb6510b1a934..de3677656848a 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/components/index.scss +++ b/examples/controls_example/public/react_controls/timeslider_control/components/index.scss @@ -1,5 +1,8 @@ -.timeSlider-playToggle:enabled { - background-color: $euiColorPrimary !important; +.timeSlider-playToggle { + height: 100%; + &:enabled { + background-color: $euiColorPrimary !important; + } } .timeSlider-prependButton { diff --git a/examples/controls_example/public/react_controls/timeslider_control/components/play_button.tsx b/examples/controls_example/public/react_controls/timeslider_control/components/play_button.tsx index c30bff5c2926d..8fe19bca8a054 100644 --- a/examples/controls_example/public/react_controls/timeslider_control/components/play_button.tsx +++ b/examples/controls_example/public/react_controls/timeslider_control/components/play_button.tsx @@ -41,7 +41,11 @@ export function PlayButton(props: Props) { /> ); return props.disablePlayButton ? ( - + {Button} ) : ( diff --git a/examples/response_stream/common/api/reducer_stream/index.ts b/examples/response_stream/common/api/reducer_stream/index.ts index cc5255761fbd6..13f3c0274f771 100644 --- a/examples/response_stream/common/api/reducer_stream/index.ts +++ b/examples/response_stream/common/api/reducer_stream/index.ts @@ -7,5 +7,3 @@ */ export { reducerStreamReducer } from './reducer'; -export { reducerStreamRequestBodySchema } from './request_body_schema'; -export type { ReducerStreamRequestBodySchema } from './request_body_schema'; diff --git a/examples/response_stream/server/routes/reducer_stream.ts b/examples/response_stream/server/routes/reducer_stream.ts index abdc90f28a23c..9a84d3009b6c3 100644 --- a/examples/response_stream/server/routes/reducer_stream.ts +++ b/examples/response_stream/server/routes/reducer_stream.ts @@ -16,7 +16,7 @@ import { deleteEntityAction, ReducerStreamApiAction, } from '../../common/api/reducer_stream/reducer_actions'; -import { reducerStreamRequestBodySchema } from '../../common/api/reducer_stream'; +import { reducerStreamRequestBodySchema } from './schemas/reducer_stream'; import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api'; import { entities, getActions } from './shared'; diff --git a/examples/response_stream/server/routes/redux_stream.ts b/examples/response_stream/server/routes/redux_stream.ts index bd694c531907b..700e1ff3d06c4 100644 --- a/examples/response_stream/server/routes/redux_stream.ts +++ b/examples/response_stream/server/routes/redux_stream.ts @@ -16,7 +16,7 @@ import { error, type ReduxStreamApiAction, } from '../../common/api/redux_stream/data_slice'; -import { reducerStreamRequestBodySchema } from '../../common/api/reducer_stream'; +import { reducerStreamRequestBodySchema } from './schemas/reducer_stream'; import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api'; import { entities, getActions } from './shared'; diff --git a/examples/response_stream/server/routes/schemas/reducer_stream/index.ts b/examples/response_stream/server/routes/schemas/reducer_stream/index.ts new file mode 100644 index 0000000000000..62247bb3f3045 --- /dev/null +++ b/examples/response_stream/server/routes/schemas/reducer_stream/index.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export { reducerStreamRequestBodySchema } from './request_body_schema'; +export type { ReducerStreamRequestBodySchema } from './request_body_schema'; diff --git a/examples/response_stream/common/api/reducer_stream/request_body_schema.ts b/examples/response_stream/server/routes/schemas/reducer_stream/request_body_schema.ts similarity index 100% rename from examples/response_stream/common/api/reducer_stream/request_body_schema.ts rename to examples/response_stream/server/routes/schemas/reducer_stream/request_body_schema.ts diff --git a/examples/response_stream/common/api/simple_string_stream/index.ts b/examples/response_stream/server/routes/schemas/simple_string_stream/index.ts similarity index 100% rename from examples/response_stream/common/api/simple_string_stream/index.ts rename to examples/response_stream/server/routes/schemas/simple_string_stream/index.ts diff --git a/examples/response_stream/common/api/simple_string_stream/request_body_schema.ts b/examples/response_stream/server/routes/schemas/simple_string_stream/request_body_schema.ts similarity index 100% rename from examples/response_stream/common/api/simple_string_stream/request_body_schema.ts rename to examples/response_stream/server/routes/schemas/simple_string_stream/request_body_schema.ts diff --git a/examples/response_stream/server/routes/single_string_stream.ts b/examples/response_stream/server/routes/single_string_stream.ts index d9cb65686b71e..daf0ae682a14e 100644 --- a/examples/response_stream/server/routes/single_string_stream.ts +++ b/examples/response_stream/server/routes/single_string_stream.ts @@ -9,7 +9,7 @@ import type { IRouter, Logger } from '@kbn/core/server'; import { streamFactory } from '@kbn/ml-response-stream/server'; -import { simpleStringStreamRequestBodySchema } from '../../common/api/simple_string_stream'; +import { simpleStringStreamRequestBodySchema } from './schemas/simple_string_stream'; import { RESPONSE_STREAM_API_ENDPOINT } from '../../common/api'; function timeout(ms: number) { diff --git a/fleet_packages.json b/fleet_packages.json index 76dd27e8c27f0..d0ee7ad089924 100644 --- a/fleet_packages.json +++ b/fleet_packages.json @@ -30,11 +30,11 @@ }, { "name": "elastic_agent", - "version": "1.20.0" + "version": "2.0.1" }, { "name": "endpoint", - "version": "8.14.0" + "version": "8.15.0" }, { "name": "fleet_server", @@ -52,10 +52,10 @@ }, { "name": "synthetics", - "version": "1.2.1" + "version": "1.2.2" }, { "name": "security_detection_engine", - "version": "8.14.3" + "version": "8.15.1" } ] \ No newline at end of file diff --git a/oas_docs/makefile b/oas_docs/makefile index f0b2966f17e4d..aa6bd1af38223 100644 --- a/oas_docs/makefile +++ b/oas_docs/makefile @@ -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/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/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" and "../x-pack/plugins/cases/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 diff --git a/oas_docs/output/kibana.serverless.yaml b/oas_docs/output/kibana.serverless.yaml index 2874041b76012..7629eb0319cbc 100644 --- a/oas_docs/output/kibana.serverless.yaml +++ b/oas_docs/output/kibana.serverless.yaml @@ -1075,7 +1075,7 @@ paths: $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' /api/saved_objects/_export: post: - summary: Export saved objects in the default space + summary: Export saved objects operationId: exportSavedObjectsDefault description: > Retrieve sets of saved objects that you want to import into Kibana. @@ -1083,6 +1083,10 @@ paths: You must include `type` or `objects` in the request body. + Exported saved objects are not backwards compatible and cannot be + imported into an older version of Kibana. + + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. @@ -1147,11 +1151,9 @@ paths: application/json: schema: $ref: '#/components/schemas/Serverless_saved_objects_400_response' - security: - - Serverless_saved_objects_apiKeyAuth: [] /api/saved_objects/_import: post: - summary: Import saved objects in the default space + summary: Import saved objects operationId: importSavedObjectsDefault description: > Create sets of Kibana saved objects from a file created by the export @@ -1275,119 +1277,6 @@ paths: application/json: schema: $ref: '#/components/schemas/Serverless_saved_objects_400_response' - security: - - Serverless_saved_objects_apiKeyAuth: [] - /s/{spaceId}/api/saved_objects/_export: - post: - summary: Export saved objects - operationId: exportSavedObjects - description: > - Retrieves sets of saved objects that you want to import into Kibana. - - You must include `type` or `objects` in the request body. - - - NOTE: The `savedObjects.maxImportExportSize` configuration setting - limits the number of saved objects which may be exported. - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. - tags: - - saved objects - parameters: - - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Serverless_saved_objects_space_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: >- - #/components/schemas/Serverless_saved_objects_export_objects_request - examples: - exportSavedObjectsRequest: - $ref: >- - #/components/examples/Serverless_saved_objects_export_objects_request - responses: - '200': - description: Indicates a successful call. - content: - application/x-ndjson: - schema: - type: object - additionalProperties: true - examples: - exportSavedObjectsResponse: - $ref: >- - #/components/examples/Serverless_saved_objects_export_objects_response - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/Serverless_saved_objects_400_response' - security: - - Serverless_saved_objects_apiKeyAuth: [] - /s/{spaceId}/api/saved_objects/_import: - post: - summary: Import saved objects - operationId: importSavedObjects - description: > - Creates sets of Kibana saved objects from a file created by the export - API. - - Saved objects can be imported only into the same version, a newer minor - on the same major, or the next major. Exported saved objects are not - backwards compatible and cannot be imported into an older version of - Kibana. - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. - tags: - - saved objects - parameters: - - $ref: '#/components/parameters/Serverless_saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Serverless_saved_objects_space_id' - - $ref: '#/components/parameters/Serverless_saved_objects_compatibility_mode' - - $ref: '#/components/parameters/Serverless_saved_objects_create_new_copies' - - $ref: '#/components/parameters/Serverless_saved_objects_overwrite' - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: >- - #/components/schemas/Serverless_saved_objects_import_objects_request - examples: - importObjectsRequest: - $ref: >- - #/components/examples/Serverless_saved_objects_import_objects_request - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: >- - #/components/schemas/Serverless_saved_objects_200_import_objects_response - examples: - importObjectsResponse: - $ref: >- - #/components/examples/Serverless_saved_objects_import_objects_response - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/Serverless_saved_objects_400_response' - security: - - Serverless_saved_objects_apiKeyAuth: [] /s/{spaceId}/api/observability/slos: post: summary: Create an SLO @@ -1948,49 +1837,6 @@ components: name: kbn-xsrf description: Cross-site request forgery protection required: true - Serverless_saved_objects_space_id: - in: path - name: spaceId - description: >- - An identifier for the space. If `/s/` and the identifier are omitted - from the path, the default space is used. - required: true - schema: - type: string - example: default - Serverless_saved_objects_compatibility_mode: - in: query - name: compatibilityMode - schema: - type: boolean - required: false - description: > - Applies various adjustments to the saved objects that are being imported - to maintain compatibility between different Kibana versions. Use this - option only if you encounter issues with imported saved objects. NOTE: - This option cannot be used with the `createNewCopies` option. - Serverless_saved_objects_create_new_copies: - in: query - name: createNewCopies - schema: - type: boolean - required: false - description: > - Creates copies of saved objects, regenerates each object ID, and resets - the origin. When used, potential conflict errors are avoided. NOTE: This - option cannot be used with the `overwrite` and `compatibilityMode` - options. - Serverless_saved_objects_overwrite: - in: query - name: overwrite - schema: - type: boolean - required: false - description: > - Overwrites saved objects when they already exist. When used, potential - conflict errors are automatically resolved by overwriting the - destination object. NOTE: This option cannot be used with the - `createNewCopies` option. SLOs_kbn_xsrf: schema: type: string @@ -5520,77 +5366,6 @@ components: type: integer enum: - 400 - Serverless_saved_objects_export_objects_request: - type: object - properties: - excludeExportDetails: - description: Do not add export details entry at the end of the stream. - type: boolean - default: false - includeReferencesDeep: - description: Includes all of the referenced objects in the exported objects. - type: boolean - objects: - description: A list of objects to export. - type: array - items: - type: object - type: - description: >- - The saved object types to include in the export. Use `*` to export - all the types. - oneOf: - - type: string - - type: array - items: - type: string - Serverless_saved_objects_import_objects_request: - type: object - properties: - file: - description: > - A file exported using the export API. NOTE: The - `savedObjects.maxImportExportSize` configuration setting limits the - number of saved objects which may be included in this file. - Similarly, the `savedObjects.maxImportPayloadBytes` setting limits - the overall size of the file that can be imported. - Serverless_saved_objects_200_import_objects_response: - type: object - properties: - success: - type: boolean - description: > - Indicates when the import was successfully completed. When set to - false, some objects may not have been created. For additional - information, refer to the `errors` and `successResults` properties. - successCount: - type: integer - description: Indicates the number of successfully imported records. - errors: - type: array - items: - type: object - description: > - Indicates the import was unsuccessful and specifies the objects that - failed to import. - - - NOTE: One object may result in multiple errors, which requires - separate steps to resolve. For instance, a `missing_references` - error and conflict error. - successResults: - type: array - items: - type: object - description: > - Indicates the objects that are successfully imported, with any - metadata if applicable. - - - NOTE: Objects are created only when all resolvable errors are - addressed, including conflicts and missing references. If objects - are created as new copies, each entry in the `successResults` array - includes a `destinationId` attribute. SLOs_indicator_properties_apm_availability: title: APM availability required: @@ -8871,14 +8646,6 @@ components: enum: - 404 securitySchemes: - Serverless_saved_objects_apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: > - Serverless APIs support only key-based authentication. You must create - an API key and use the encoded value in the request header. For example: - 'Authorization: ApiKey base64AccessApiKey'. Kibana_HTTP_APIs_apiKeyAuth: in: header name: Authorization diff --git a/oas_docs/output/kibana.yaml b/oas_docs/output/kibana.yaml index 27273400eec55..551ab3149dda9 100644 --- a/oas_docs/output/kibana.yaml +++ b/oas_docs/output/kibana.yaml @@ -61,6 +61,9 @@ servers: description: local - url: http://localhost:5622 tags: + - name: alerting + description: Alerting APIs enable you to create and manage rules and alerts. + x-displayName: alerting - name: APM agent keys description: > Configure APM agent keys to authorize requests from APM agents to the APM @@ -72,6 +75,9 @@ tags: Annotations enable you to easily see how events are impacting the performance of your applications. x-displayName: APM annotations + - name: cases + description: Case APIs enable you to open and track issues. + x-displayName: cases - name: connectors description: Connector APIs enable you to create and manage connectors. x-displayName: connectors @@ -94,276 +100,179 @@ tags: - name: system x-displayName: system paths: - /api/apm/agent_keys: - post: - summary: Create an APM agent key - description: Create a new agent key for APM. - operationId: createAgentKey - tags: - - APM agent keys - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - privileges: - type: array - items: - type: string - enum: - - event:write - - config_agent:read - responses: - '200': - description: Agent key created successfully - content: - application/json: - schema: - type: object - properties: - api_key: - type: string - expiration: - type: integer - format: int64 - id: - type: string - name: - type: string - encoded: - type: string - /api/apm/services/{serviceName}/annotation/search: - get: - summary: Search for annotations - description: Search for annotations related to a specific service. - operationId: getAnnotation - tags: - - APM annotations - parameters: - - name: serviceName - in: path - required: true - description: The name of the service - schema: - type: string - - name: environment - in: query - required: false - description: The environment to filter annotations by - schema: - type: string - - name: start - in: query - required: false - description: The start date for the search - schema: - type: string - - name: end - in: query - required: false - description: The end date for the search - schema: - type: string - responses: - '200': - description: Successful response - content: - application/json: - schema: - type: object - properties: - annotations: - type: array - items: - type: object - properties: - type: - type: string - enum: - - version - id: - type: string - '@timestamp': - type: number - text: - type: string - /api/apm/services/{serviceName}/annotation: - post: - summary: Create a service annotation - description: Create a new annotation for a specific service. - operationId: createAnnotation - tags: - - APM annotations - parameters: - - name: serviceName - in: path - required: true - description: The name of the service - schema: - type: string - requestBody: - required: true - content: - application/json: - schema: - type: object - properties: - '@timestamp': - type: string - service: - type: object - properties: - version: - type: string - environment: - type: string - message: - type: string - tags: - type: array - items: - type: string - responses: - '200': - description: Annotation created successfully - content: - application/json: - schema: - type: object - properties: - _id: - type: string - _index: - type: string - _source: - type: object - properties: - annotation: - type: string - tags: - type: array - items: - type: string - message: - type: string - service: - type: object - properties: - name: - type: string - environment: - type: string - version: - type: string - event: - type: object - properties: - created: - type: string - '@timestamp': - type: string - /api/actions/connector: + /api/alerting/rule: post: - summary: Create a connector with a random ID - operationId: createConnector - description: The connector identifier is randomly generated. + 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. 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. This API supports both key- and token-based authentication. To + use key-based authentication, create an API key in Kibana and use it in + the header of the API call. To use token-based authentication, provide a + username and password; an API key that matches the current privileges of + the user is created automatically. In both cases, the API key is + subsequently used for authorization when the rule runs. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/Connectors_create_connector_request' + $ref: '#/components/schemas/Alerting_create_rule_request' examples: - createEmailConnectorRequest: + createEsQueryEsqlRuleRequest: $ref: >- - #/components/examples/Connectors_create_email_connector_request - createIndexConnectorRequest: + #/components/examples/Alerting_create_es_query_esql_rule_request + createEsQueryRuleRequest: + $ref: '#/components/examples/Alerting_create_es_query_rule_request' + createEsQueryKqlRuleRequest: $ref: >- - #/components/examples/Connectors_create_index_connector_request - createWebhookConnectorRequest: + #/components/examples/Alerting_create_es_query_kql_rule_request + createIndexThresholdRuleRequest: $ref: >- - #/components/examples/Connectors_create_webhook_connector_request - createXmattersConnectorRequest: + #/components/examples/Alerting_create_index_threshold_rule_request + createTrackingContainmentRuleRequest: $ref: >- - #/components/examples/Connectors_create_xmatters_connector_request + #/components/examples/Alerting_create_tracking_containment_rule_request responses: '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' + $ref: '#/components/schemas/Alerting_rule_response_properties' examples: - createEmailConnectorResponse: + createEsQueryEsqlRuleResponse: $ref: >- - #/components/examples/Connectors_create_email_connector_response - createIndexConnectorResponse: + #/components/examples/Alerting_create_es_query_esql_rule_response + createEsQueryRuleResponse: + $ref: '#/components/examples/Alerting_create_es_query_rule_response' + createEsQueryKqlRuleResponse: $ref: >- - #/components/examples/Connectors_create_index_connector_response - createWebhookConnectorResponse: + #/components/examples/Alerting_create_es_query_kql_rule_response + createIndexThresholdRuleResponse: $ref: >- - #/components/examples/Connectors_create_webhook_connector_response - createXmattersConnectorResponse: + #/components/examples/Alerting_create_index_threshold_rule_response + createTrackingContainmentRuleResponse: $ref: >- - #/components/examples/Connectors_create_xmatters_connector_response + #/components/examples/Alerting_create_tracking_containment_rule_response '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/connector/{connectorId}: + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' + /api/alerting/rule/{ruleId}: get: - summary: Get a connector information - operationId: getConnector + summary: Get rule details + operationId: getRule + description: > + You must have `read` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rules you're + seeking. For example, the **Management > Stack Rules** feature, + **Analytics > Discover** and **Machine Learning** features, + **Observability** features, or **Security** features. To get rules + associated with the **Stack Monitoring** feature, use the + `monitoring_user` built-in role. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Alerting_rule_id' responses: '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' + $ref: '#/components/schemas/Alerting_rule_response_properties' examples: - getConnectorResponse: - $ref: '#/components/examples/Connectors_get_connector_response' + getRuleResponse: + $ref: '#/components/examples/Alerting_get_rule_response' '401': - $ref: '#/components/responses/Connectors_401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' '404': - $ref: '#/components/responses/Connectors_404' + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' delete: - summary: Delete a connector - operationId: deleteConnector + 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. For example, the **Management** > **Stack Rules** + feature, **Analytics** > **Discover** or **Machine Learning** features, + **Observability**, or **Security** features. WARNING: After you delete a + rule, you cannot recover it. If the API key that is used by the rule was + created automatically, it is deleted. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' responses: '204': description: Indicates a successful call. '401': - $ref: '#/components/responses/Connectors_401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' '404': - $ref: '#/components/responses/Connectors_404' + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' post: - summary: Create a connector - operationId: createConnectorId + 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. This API supports both key- and + token-based authentication. To use key-based authentication, create an + API key in Kibana and use it in the header of the API call. To use + token-based authentication, provide a username and password; an API key + that matches the current privileges of the user is created + automatically. In both cases, the API key is subsequently used for + authorization when the rule runs. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' - in: path - name: connectorId + name: ruleId description: > - A UUID v1 or v4 identifier for the connector. If you omit this + An UUID v1 or v4 identifier for the rule. If you omit this parameter, an identifier is randomly generated. required: true schema: @@ -374,737 +283,1324 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/Connectors_create_connector_request' + $ref: '#/components/schemas/Alerting_create_rule_request' examples: - createIndexConnectorRequest: + createEsQueryEsqlRuleIdRequest: $ref: >- - #/components/examples/Connectors_create_index_connector_request + #/components/examples/Alerting_create_es_query_esql_rule_request + createEsQueryRuleIdRequest: + $ref: '#/components/examples/Alerting_create_es_query_rule_request' + createEsQueryKqlRuleIdRequest: + $ref: >- + #/components/examples/Alerting_create_es_query_kql_rule_request + createIndexThreholdRuleIdRequest: + $ref: >- + #/components/examples/Alerting_create_index_threshold_rule_request responses: '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' + $ref: '#/components/schemas/Alerting_rule_response_properties' examples: - createIndexConnectorResponse: + createEsQueryEsqlRuleIdResponse: $ref: >- - #/components/examples/Connectors_create_index_connector_response + #/components/examples/Alerting_create_es_query_esql_rule_response + createEsQueryRuleIdResponse: + $ref: '#/components/examples/Alerting_create_es_query_rule_response' + createEsQueryKqlRuleIdResponse: + $ref: >- + #/components/examples/Alerting_create_es_query_kql_rule_response + createIndexThresholdRuleIdResponse: + $ref: >- + #/components/examples/Alerting_create_index_threshold_rule_response '401': - $ref: '#/components/responses/Connectors_401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' put: - summary: Update a connector - operationId: updateConnector + 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. 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. This API supports both key- and token-based authentication. To + use key-based authentication, create an API key in Kibana and use it in + the header of the API call. To use token-based authentication, provide a + username and password; an API key that matches the current privileges of + the user is created automatically. In both cases, the API key is + subsequently used for authorization when the rule runs. NOTE: If the API + key has different privileges than the key that created or most recently + updated the rule, the rule behavior might change. Though some properties + are optional, when you update the rule the existing property values are + overwritten with default values. Therefore, it is recommended to + explicitly set all property values. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/Connectors_update_connector_request' + $ref: '#/components/schemas/Alerting_update_rule_request' examples: - updateIndexConnectorRequest: - $ref: >- - #/components/examples/Connectors_update_index_connector_request + updateRuleRequest: + $ref: '#/components/examples/Alerting_update_rule_request' responses: '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Connectors_connector_response_properties' - '400': - $ref: '#/components/responses/Connectors_401' + $ref: '#/components/schemas/Alerting_rule_response_properties' + examples: + updateRuleResponse: + $ref: '#/components/examples/Alerting_update_rule_response' '401': - $ref: '#/components/responses/Connectors_401' + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' '404': - $ref: '#/components/responses/Connectors_404' - /api/actions/connector/{connectorId}/_execute: + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' + /api/alerting/rule/{ruleId}/_disable: post: - summary: Run a connector - operationId: runConnector + summary: Disable a rule + operationId: disableRule description: > - You can use this API to test an action that involves interaction with - Kibana services or integrations with third-party systems. You must have - `read` privileges for the **Actions and Connectors** feature in the - **Management** section of the Kibana feature privileges. If you use an - index connector, you must also have `all`, `create`, `index`, or `write` - indices privileges. + You must have `all` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rule. For example, + the **Management > Stack Rules** feature, **Analytics > Discover** and + **Machine Learning** features, **Observability**, and **Security** + features. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_connector_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Connectors_run_connector_request' - examples: - runCasesWebhookConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_cases_webhook_connector_request - runEmailConnectorRequest: - $ref: '#/components/examples/Connectors_run_email_connector_request' - runIndexConnectorRequest: - $ref: '#/components/examples/Connectors_run_index_connector_request' - runJiraConnectorRequest: - $ref: '#/components/examples/Connectors_run_jira_connector_request' - runPagerDutyConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_pagerduty_connector_request - runServerLogConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_server_log_connector_request - runServiceNowITOMConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_servicenow_itom_connector_request - runSlackConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_slack_api_connector_request - runSwimlaneConnectorRequest: - $ref: >- - #/components/examples/Connectors_run_swimlane_connector_request + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - required: - - connector_id - - status - properties: - connector_id: - type: string - description: The identifier for the connector. - data: - oneOf: - - type: object - description: Information returned from the action. - additionalProperties: true - - type: array - description: An array of information returned from the action. - items: - type: object - status: - type: string - description: The status of the action. - enum: - - error - - ok - examples: - runCasesWebhookConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_cases_webhook_connector_response - runEmailConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_email_connector_response - runIndexConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_index_connector_response - runJiraConnectorResponse: - $ref: '#/components/examples/Connectors_run_jira_connector_response' - runPagerDutyConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_pagerduty_connector_response - runServerLogConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_server_log_connector_response - runServiceNowITOMConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_servicenow_itom_connector_response - runSlackConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_slack_api_connector_response - runSwimlaneConnectorResponse: - $ref: >- - #/components/examples/Connectors_run_swimlane_connector_response + $ref: '#/components/schemas/Alerting_401_response' + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_404_response' + /api/alerting/rule/{ruleId}/_enable: + post: + 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. For example, the **Management > Stack Rules** feature, **Analytics + > Discover** and **Machine Learning** features, **Observability**, and + **Security** features. This API supports both key- and token-based + authentication. To use key-based authentication, create an API key in + Kibana and use it in the header of the API call. To use token-based + authentication, provide a username and password; an API key that matches + the current privileges of the user is created automatically. In both + cases, the API key is subsequently used for authorization when the rule + runs. + tags: + - alerting + parameters: + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' + responses: + '204': + description: Indicates a successful call. '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/connectors: + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rules/_find: get: - summary: Get all connectors - operationId: getConnectors + summary: Find rule information + operationId: findRules + description: > + You must have `read` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rules you're + seeking. For example, you must have privileges for the **Management > + Stack rules** feature, **Analytics > Discover** and **Machine Learning** + features, **Observability** features, or **Security** features. To find + rules associated with the **Stack Monitoring** feature, use the + `monitoring_user` built-in role. tags: - - connectors + - alerting + parameters: + - 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 rules 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 objects + in the response. + schema: + type: string + example: threshold +-test* + - name: search_fields + in: query + description: The fields to perform the simple_query_string parsed query against. + schema: + oneOf: + - type: string + example: name + - 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: array - items: - $ref: >- - #/components/schemas/Connectors_connector_response_properties + type: object + properties: + data: + type: array + items: + $ref: '#/components/schemas/Alerting_rule_response_properties' + page: + type: integer + per_page: + type: integer + total: + type: integer examples: - getConnectorsResponse: - $ref: '#/components/examples/Connectors_get_connectors_response' + findRulesResponse: + $ref: '#/components/examples/Alerting_find_rules_response' + findConditionalActionRulesResponse: + $ref: >- + #/components/examples/Alerting_find_rules_response_conditional_action '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/connector_types: + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/_health: get: - summary: Get all connector types - operationId: getConnectorTypes + summary: Get the alerting framework health + operationId: getAlertingHealth + description: > + You must have `read` privileges for the **Management > Stack Rules** + feature or for at least one of the **Analytics > Discover**, **Analytics + > Machine Learning**, **Observability**, or **Security** features. tags: - - connectors - parameters: - - in: query - name: feature_id - description: >- - A filter to limit the retrieved connector types to those that - support a specific feature (such as alerting or cases). - schema: - $ref: '#/components/schemas/Connectors_features' + - alerting + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + alerting_framework_health: + type: object + description: > + Three substates identify the health of the alerting + framework: `decryption_health`, `execution_health`, and + `read_health`. + properties: + decryption_health: + type: object + description: The timestamp and status of the rule decryption. + properties: + status: + type: string + example: ok + enum: + - error + - ok + - warn + timestamp: + type: string + format: date-time + example: '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 + enum: + - error + - ok + - warn + timestamp: + type: string + format: date-time + 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 + example: ok + enum: + - error + - ok + - warn + timestamp: + type: string + format: date-time + 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. + example: true + is_sufficiently_secure: + type: boolean + description: If `false`, security is enabled but TLS is not. + example: true + examples: + getAlertingHealthResponse: + $ref: '#/components/examples/Alerting_get_health_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rule_types: + get: + summary: Get the rule types + operationId: getRuleTypes + description: > + If you have `read` privileges for one or more Kibana features, the API + response contains information about the appropriate rule types. For + example, there are rule types associated with the **Management > Stack + Rules** feature, **Analytics > Discover** and **Machine Learning** + features, **Observability** features, and **Security** features. To get + rule types associated with the **Stack Monitoring** feature, use the + `monitoring_user` built-in role. + tags: + - alerting responses: '200': description: Indicates a successful call. content: application/json: schema: - title: Get connector types response body properties - description: The properties vary for each connector type. type: array items: type: object properties: - enabled: - type: boolean + action_groups: + description: > + An explicit list of groups for which the rule type can + schedule actions, each with the action group's unique ID + and human readable name. Rule actions validation uses + this configuration to ensure that groups are valid. + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + action_variables: + description: > + A list of action variables that the rule type makes + available via context and state in action parameter + templates, and a short human readable description. When + you create a rule in Kibana, it uses this information to + prompt you for these variables in action parameter + editors. + type: object + properties: + context: + type: array + items: + type: object + properties: + name: + type: string + description: + type: string + useWithTripleBracesInTemplates: + type: boolean + params: + type: array + items: + type: object + properties: + description: + type: string + name: + type: string + state: + type: array + items: + type: object + properties: + description: + type: string + name: + type: string + alerts: + type: object + description: > + Details for writing alerts as data documents for this + rule type. + properties: + context: + type: string + description: | + The namespace for this rule type. + enum: + - ml.anomaly-detection + - observability.apm + - observability.logs + - observability.metrics + - observability.slo + - observability.threshold + - observability.uptime + - security + - stack + dynamic: + type: string + description: Indicates whether new fields are added dynamically. + enum: + - 'false' + - runtime + - strict + - 'true' + isSpaceAware: + type: boolean + description: > + Indicates whether the alerts are space-aware. If + true, space-specific alert indices are used. + mappings: + type: object + properties: + fieldMap: + type: object + description: > + Mapping information for each field supported in + alerts as data documents for this rule type. For + more information about mapping parameters, refer + to the Elasticsearch documentation. + additionalProperties: + $ref: >- + #/components/schemas/Alerting_fieldmap_properties + secondaryAlias: + type: string + description: > + A secondary alias. It is typically used to support + the signals alias for detection rules. + shouldWrite: + type: boolean + description: > + Indicates whether the rule should write out alerts + as data. + useEcs: + type: boolean + description: > + Indicates whether to include the ECS component + template for the alerts. + useLegacyAlerts: + type: boolean + default: false + description: > + Indicates whether to include the legacy component + template for the alerts. + authorized_consumers: description: >- - Indicates whether the connector type is enabled in - Kibana. - example: true - enabled_in_config: - type: boolean + The list of the plugins IDs that have access to the rule + type. + type: object + properties: + alerts: + type: object + properties: + all: + type: boolean + read: + type: boolean + apm: + type: object + properties: + all: + type: boolean + read: + type: boolean + discover: + type: object + properties: + all: + type: boolean + read: + type: boolean + infrastructure: + type: object + properties: + all: + type: boolean + read: + type: boolean + logs: + type: object + properties: + all: + type: boolean + read: + type: boolean + ml: + type: object + properties: + all: + type: boolean + read: + type: boolean + monitoring: + type: object + properties: + all: + type: boolean + read: + type: boolean + siem: + type: object + properties: + all: + type: boolean + read: + type: boolean + slo: + type: object + properties: + all: + type: boolean + read: + type: boolean + stackAlerts: + type: object + properties: + all: + type: boolean + read: + type: boolean + uptime: + type: object + properties: + all: + type: boolean + read: + type: boolean + category: + type: string description: >- - Indicates whether the connector type is enabled in the - Kibana configuration file. - example: true + The rule category, which is used by features such as + category-specific maintenance windows. + enum: + - management + - observability + - securitySolution + default_action_group_id: + description: The default identifier for the rule type group. + type: string + does_set_recovery_context: + description: >- + Indicates whether the rule passes context variables to + its recovery action. + type: boolean enabled_in_license: + description: >- + Indicates whether the rule type is enabled or disabled + based on the subscription. + type: boolean + has_alerts_mappings: type: boolean description: >- - Indicates whether the connector is enabled in the - license. - example: true + Indicates whether the rule type has custom mappings for + the alert data. + has_fields_for_a_a_d: + type: boolean id: - $ref: '#/components/schemas/Connectors_connector_types' - is_system_action_type: + description: The unique identifier for the rule type. + type: string + is_exportable: + description: >- + Indicates whether the rule type is exportable in **Stack + Management > Saved Objects**. type: boolean - example: false minimum_license_required: + description: The subscriptions required to use the rule type. type: string - description: The license that is required to use the connector type. example: basic name: + description: The descriptive name of the rule type. type: string - description: The name of the connector type. - example: Index - supported_feature_ids: - type: array - description: The features that are supported by the connector type. - items: - $ref: '#/components/schemas/Connectors_features' - example: - - alerting - - cases - - siem + producer: + description: >- + An identifier for the application that produces this + rule type. + type: string + 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 + properties: + id: + type: string + name: + type: string + rule_task_timeout: + type: string + example: 5m examples: - getConnectorTypesServerlessResponse: - $ref: >- - #/components/examples/Connectors_get_connector_types_generativeai_response + getRuleTypesResponse: + $ref: '#/components/examples/Alerting_get_rule_types_response' '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/action/{actionId}: - delete: - summary: Delete a connector - operationId: legacyDeleteConnector - deprecated: true + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rule/{ruleId}/_mute_all: + post: + summary: Mute all alerts + operationId: muteAllAlerts description: > - Deprecated in 7.13.0. Use the delete connector API instead. WARNING: - When you delete a connector, it cannot be recovered. + This API snoozes the notifications for the rule indefinitely. The rule + checks continue to occur but alerts will not trigger any actions. You + must have `all` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rule. For example, + the **Management > Stack Rules** feature, **Analytics > Discover** and + **Machine Learning** features, **Observability**, and **Security** + features. If the rule has actions, you must also have `read` privileges + for the **Management > Actions and Connectors** feature. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' responses: '204': description: Indicates a successful call. '401': - $ref: '#/components/responses/Connectors_401' - get: - summary: Get connector information - operationId: legacyGetConnector - description: Deprecated in 7.13.0. Use the get connector API instead. - deprecated: true + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rule/{ruleId}/_unmute_all: + post: + summary: Unmute all alerts + operationId: unmuteAllAlerts + description: > + If the rule has its notifications snoozed indefinitely, this API cancels + the snooze. You must have `all` privileges for the appropriate Kibana + features, depending on the `consumer` and `rule_type_id` of the rule. + For example, the **Management > Stack Rules** feature, **Analytics > + Discover** and **Machine Learning** features, **Observability**, and + **Security** features. If the rule has actions, you must also have + `read` privileges for the **Management > Actions and Connectors** + feature. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' responses: - '200': - $ref: '#/components/responses/Connectors_200_actions' + '204': + description: Indicates a successful call. '401': - $ref: '#/components/responses/Connectors_401' - put: - summary: Update a connector - operationId: legacyUpdateConnector - deprecated: true - description: Deprecated in 7.13.0. Use the update connector API instead. + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rule/{ruleId}/_update_api_key: + post: + 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: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' - requestBody: - required: true - content: - application/json: - schema: - title: Legacy update connector request body properties - description: The properties vary depending on the connector type. - type: object - properties: - config: - type: object - description: >- - The new connector configuration. Configuration properties - vary depending on the connector type. - name: - type: string - description: The new name for the connector. - secrets: - type: object - description: >- - The updated secrets configuration for the connector. Secrets - properties vary depending on the connector type. + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_rule_id' responses: '200': - $ref: '#/components/responses/Connectors_200_actions' - '404': - $ref: '#/components/responses/Connectors_404' - /api/actions: - get: - summary: Get all connectors - operationId: legacyGetConnectors - deprecated: true - description: Deprecated in 7.13.0. Use the get all connectors API instead. + description: Indicates a successful call. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_400_response' + /api/alerting/rule/{ruleId}/alert/{alertId}/_mute: + post: + summary: Mute an alert + operationId: muteAlert + description: > + You must have `all` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rule. For example, + the **Management > Stack Rules** feature, **Analytics > Discover** and + **Machine Learning** features, **Observability**, and **Security** + features. If the rule has actions, you must also have `read` privileges + for the **Management > Actions and Connectors** feature. tags: - - connectors + - alerting + parameters: + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_alert_id' + - $ref: '#/components/parameters/Alerting_rule_id' responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: array - items: - $ref: '#/components/schemas/Connectors_action_response_properties' - '401': - $ref: '#/components/responses/Connectors_401' + $ref: '#/components/schemas/Alerting_401_response' + /api/alerting/rule/{ruleId}/alert/{alertId}/_unmute: post: - summary: Create a connector - operationId: legacyCreateConnector - deprecated: true - description: Deprecated in 7.13.0. Use the create connector API instead. + summary: Unmute an alert + operationId: unmuteAlert + description: > + You must have `all` privileges for the appropriate Kibana features, + depending on the `consumer` and `rule_type_id` of the rule. For example, + the **Management > Stack Rules** feature, **Analytics > Discover** and + **Machine Learning** features, **Observability**, and **Security** + features. If the rule has actions, you must also have `read` privileges + for the **Management > Actions and Connectors** feature. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - requestBody: - required: true - content: - application/json: - schema: - title: Legacy create connector request properties - type: object - properties: - actionTypeId: - type: string - description: The connector type identifier. - config: - type: object - description: >- - The configuration for the connector. Configuration - properties vary depending on the connector type. - name: - type: string - description: The display name for the connector. - secrets: - type: object - description: > - The secrets configuration for the connector. Secrets - configuration properties vary depending on the connector - type. NOTE: Remember these values. You must provide them - each time you update the connector. + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_alert_id' + - $ref: '#/components/parameters/Alerting_rule_id' responses: - '200': - $ref: '#/components/responses/Connectors_200_actions' + '204': + description: Indicates a successful call. '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/list_action_types: + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}: + delete: + summary: Delete an alert + operationId: legaryDeleteAlert + deprecated: true + description: > + Deprecated in 7.13.0. Use the delete rule API instead. WARNING: After + you delete an alert, you cannot recover it. + tags: + - alerting + parameters: + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 + responses: + '204': + description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' get: - summary: Get connector types - operationId: legacyGetConnectorTypes + summary: Get an alert by identifier + operationId: legacyGetAlert deprecated: true - description: Deprecated in 7.13.0. Use the get all connector types API instead. + description: Deprecated in 7.13.0. Use the get rule API instead. tags: - - connectors + - alerting + parameters: + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '200': description: Indicates a successful call. content: application/json: schema: - title: Legacy get connector types response body properties - description: The properties vary for each connector type. - type: array - items: - type: object - properties: - enabled: - type: boolean - description: >- - Indicates whether the connector type is enabled in - Kibana. - enabledInConfig: - type: boolean - description: >- - Indicates whether the connector type is enabled in the - Kibana `.yml` file. - enabledInLicense: - type: boolean - description: >- - Indicates whether the connector is enabled in the - license. - example: true - id: - type: string - description: The unique identifier for the connector type. - minimumLicenseRequired: - type: string - description: The license that is required to use the connector type. - name: - type: string - description: The name of the connector type. + $ref: '#/components/schemas/Alerting_alert_response_properties' '401': - $ref: '#/components/responses/Connectors_401' - /api/actions/action/{actionId}/_execute: + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' post: - summary: Run a connector - operationId: legacyRunConnector + summary: Create an alert + operationId: legacyCreateAlert deprecated: true - description: Deprecated in 7.13.0. Use the run connector API instead. + description: Deprecated in 7.13.0. Use the create rule API instead. tags: - - connectors + - alerting parameters: - - $ref: '#/components/parameters/Connectors_kbn_xsrf' - - $ref: '#/components/parameters/Connectors_action_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: >- + An UUID v1 or v4 identifier for the alert. If this parameter is + omitted, the identifier is randomly generated. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 requestBody: required: true content: application/json: schema: - title: Legacy run connector request body properties - description: The properties vary depending on the connector type. + title: Legacy create alert request properties type: object required: + - alertTypeId + - consumer + - name + - notifyWhen - params + - schedule properties: + actions: + type: array + items: + type: object + required: + - actionTypeId + - group + - id + - params + properties: + actionTypeId: + type: string + description: The identifier for the action type. + group: + type: string + description: > + Grouping actions is recommended for escalations for + different types of alert instances. If you don't need + this functionality, set it to `default`. + id: + type: string + description: The ID of the action saved object. + params: + type: object + description: > + The map to the `params` that the action type will + receive. `params` are handled as Mustache templates + and passed a default set of context. + alertTypeId: + type: string + description: >- + The ID of the alert type that you want to call when the + alert is scheduled to run. + consumer: + type: string + description: >- + The name of the application that owns the alert. This name + has to match the Kibana feature name, as that dictates the + required role-based access control privileges. + enabled: + type: boolean + description: >- + Indicates if you want to run the alert on an interval basis + after it is created. + name: + type: string + description: A name to reference and search. + notifyWhen: + type: string + description: The condition for throttling the notification. + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval params: type: object description: >- - The parameters of the connector. Parameter properties vary - depending on the connector type. - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - actionId: - type: string - data: - oneOf: - - type: object - description: Information returned from the action. - additionalProperties: true - - type: array - description: An array of information returned from the action. - items: - type: object - status: + The parameters to pass to the alert type executor `params` + value. This will also validate against the alert type params + validator, if defined. + schedule: + type: object + description: > + The schedule specifying when this alert should be run. A + schedule is structured such that the key specifies the + format you wish to use and its value specifies the schedule. + properties: + interval: + type: string + 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: type: string - description: The status of the action. - '401': - $ref: '#/components/responses/Connectors_401' - /api/data_views: - get: - summary: Get all data views - operationId: getAllDataViewsDefault - tags: - - data views + description: A list of keywords to reference and search. + throttle: + type: string + description: > + How often this alert should fire the same actions. This will + prevent the alert from sending out the same notification + over and over. For example, if an alert with a schedule of 1 + minute stays in a triggered state for 90 minutes, setting a + throttle of `10m` or `1h` will prevent it from sending 90 + notifications during this period. responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - properties: - data_view: - type: array - items: - type: object - properties: - id: - type: string - name: - type: string - namespaces: - type: array - items: - type: string - title: - type: string - typeMeta: - type: object - examples: - getAllDataViewsResponse: - $ref: '#/components/examples/Data_views_get_data_views_response' - '400': - description: Bad request + $ref: '#/components/schemas/Alerting_alert_response_properties' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/data_view: - post: - summary: Create a data view - operationId: createDataViewDefaultw + $ref: '#/components/schemas/Alerting_401_response' + put: + summary: Update an alert + operationId: legacyUpdateAlert + deprecated: true + description: Deprecated in 7.13.0. Use the update rule API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/Data_views_create_data_view_request_object' - examples: - createDataViewRequest: - $ref: '#/components/examples/Data_views_create_data_view_request' + title: Legacy update alert request properties + type: object + required: + - name + - notifyWhen + - params + - schedule + properties: + actions: + type: array + items: + type: object + required: + - actionTypeId + - group + - id + - params + properties: + actionTypeId: + type: string + description: The identifier for the action type. + group: + type: string + description: > + Grouping actions is recommended for escalations for + different types of alert instances. If you don't need + this functionality, set it to `default`. + id: + type: string + description: The ID of the action saved object. + params: + type: object + description: > + The map to the `params` that the action type will + receive. `params` are handled as Mustache templates + and passed a default set of context. + name: + type: string + description: A name to reference and search. + notifyWhen: + type: string + description: The condition for throttling the notification. + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval + params: + type: object + description: >- + The parameters to pass to the alert type executor `params` + value. This will also validate against the alert type params + validator, if defined. + schedule: + type: object + description: > + The schedule specifying when this alert should be run. A + schedule is structured such that the key specifies the + format you wish to use and its value specifies the schedule. + properties: + interval: + type: string + 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: + type: string + description: A list of keywords to reference and search. + throttle: + type: string + description: > + How often this alert should fire the same actions. This will + prevent the alert from sending out the same notification + over and over. For example, if an alert with a schedule of 1 + minute stays in a triggered state for 90 minutes, setting a + throttle of `10m` or `1h` will prevent it from sending 90 + notifications during this period. responses: '200': description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - '400': - description: Bad request + $ref: '#/components/schemas/Alerting_alert_response_properties' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/data_view/{viewId}: - get: - summary: Get a data view - operationId: getDataViewDefault - tags: - - data views - parameters: - - $ref: '#/components/parameters/Data_views_view_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - examples: - getDataViewResponse: - $ref: '#/components/examples/Data_views_get_data_view_response' - '404': - description: Object is not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_404_response' - delete: - summary: Delete a data view - operationId: deleteDataViewDefault - description: | - WARNING: When you delete a data view, it cannot be recovered. + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/_disable: + post: + summary: Disable an alert + operationId: legacyDisableAlert + deprecated: true + description: Deprecated in 7.13.0. Use the disable rule API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: '204': description: Indicates a successful call. - '404': - description: Object is not found. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_404_response' + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/_enable: post: - summary: Update a data view - operationId: updateDataViewDefault + summary: Enable an alert + operationId: legacyEnableAlert + deprecated: true + description: Deprecated in 7.13.0. Use the enable rule API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_update_data_view_request_object' - examples: - updateDataViewRequest: - $ref: '#/components/examples/Data_views_update_data_view_request' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_data_view_response_object' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/data_view/{viewId}/fields: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/_mute_all: post: - summary: Update data view fields metadata - operationId: updateFieldsMetadataDefault - description: > - Update fields presentation metadata such as count, customLabel, - customDescription, and format. + summary: Mute all alert instances + operationId: legacyMuteAllAlertInstances + deprecated: true + description: Deprecated in 7.13.0. Use the mute all alerts API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - fields - properties: - fields: - description: The field object. - type: object - examples: - updateFieldsMetadataRequest: - $ref: '#/components/examples/Data_views_update_field_metadata_request' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - properties: - acknowledged: - type: boolean - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/data_view/{viewId}/runtime_field: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/_unmute_all: post: - summary: Create a runtime field - operationId: createRuntimeFieldDefault + summary: Unmute all alert instances + operationId: legacyUnmuteAllAlertInstances + deprecated: true + description: Deprecated in 7.13.0. Use the unmute all alerts API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - $ref: '#/components/parameters/Data_views_view_id' - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - name - - runtimeField - properties: - name: - type: string - description: | - The name for a runtime field. - runtimeField: - type: object - description: | - The runtime field definition object. - examples: - createRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: The identifier for the alert. + required: true + schema: + type: string + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - put: - summary: Create or update a runtime field - operationId: createUpdateRuntimeFieldDefault + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alerts/_find: + get: + summary: Get 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: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - - name: viewId - in: path - description: | - The ID of the data view fields you want to update. - required: true + - name: default_search_operator + in: query + description: The default operator to use for the `simple_query_string`. schema: type: string - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - name - - runtimeField - properties: - name: + 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 - description: | - The name for a runtime field. - runtimeField: - type: object - description: | - The runtime field definition object. - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_create_runtime_field_request' + - 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. @@ -1113,27 +1609,30 @@ paths: schema: type: object properties: - data_view: - type: object - fields: + data: type: array items: - type: object - '400': - description: Bad request + $ref: '#/components/schemas/Alerting_alert_response_properties' + page: + type: integer + perPage: + type: integer + total: + type: integer + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/data_view/{viewId}/runtime_field/{fieldName}: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alerts/_health: get: - summary: Get a runtime field - operationId: getRuntimeFieldDefault + 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: - - data views - parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - alerting responses: '200': description: Indicates a successful call. @@ -1142,383 +1641,554 @@ paths: schema: type: object properties: - data_view: + alertingFrameworkHealth: type: object - fields: - type: array - items: - type: object - examples: - getRuntimeFieldResponse: - $ref: '#/components/examples/Data_views_get_runtime_field_response' - '404': - description: Object is not found. + 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/Data_views_404_response' - delete: - summary: Delete a runtime field from a data view - operationId: deleteRuntimeFieldDefault + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alerts/list_alert_types: + get: + summary: Get the alert types + operationId: legacyGetAlertTypes + deprecated: true + description: Deprecated in 7.13.0. Use the get rule types API instead. tags: - - data views - parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' + - alerting responses: '200': description: Indicates a successful call. - '404': - description: Object is not found. content: application/json: schema: - $ref: '#/components/schemas/Data_views_404_response' + type: array + items: + type: object + properties: + actionGroups: + description: > + An explicit list of groups for which the alert type can + schedule actions, each with the action group's unique ID + and human readable name. Alert actions validation uses + this configuration to ensure that groups are valid. + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + actionVariables: + description: > + A list of action variables that the alert type makes + available via context and state in action parameter + templates, and a short human readable description. The + Alert UI will use this information to prompt users for + these variables in action parameter editors. + type: object + properties: + context: + type: array + items: + type: object + properties: + name: + type: string + description: + type: string + params: + type: array + items: + type: object + properties: + description: + type: string + name: + type: string + state: + type: array + items: + type: object + properties: + description: + type: string + name: + type: string + authorizedConsumers: + description: >- + The list of the plugins IDs that have access to the + alert type. + type: object + defaultActionGroupId: + description: The default identifier for the alert type group. + type: string + enabledInLicense: + description: >- + Indicates whether the rule type is enabled based on the + subscription. + type: boolean + id: + description: The unique identifier for the alert type. + type: string + isExportable: + description: >- + Indicates whether the alert type is exportable in Saved + Objects Management UI. + type: boolean + minimumLicenseRequired: + description: The subscriptions required to use the alert type. + type: string + name: + description: The descriptive name of the alert type. + type: string + producer: + description: >- + An identifier for the application that produces this + alert type. + type: string + recoveryActionGroup: + description: > + An action group to use when an alert instance goes from + an active state to an inactive one. If it is not + specified, the default recovered action group is used. + type: object + properties: + id: + type: string + name: + type: string + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute: post: - summary: Update a runtime field - operationId: updateRuntimeFieldDefault + summary: Mute an alert instance + operationId: legacyMuteAlertInstance + deprecated: true + description: Deprecated in 7.13.0. Use the mute alert API instead. tags: - - data views + - alerting parameters: - - $ref: '#/components/parameters/Data_views_field_name' - - $ref: '#/components/parameters/Data_views_view_id' - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - runtimeField - properties: - runtimeField: - type: object - description: | - The runtime field definition object. - - You can update following fields: - - - `type` - - `script` - examples: - updateRuntimeFieldRequest: - $ref: '#/components/examples/Data_views_update_runtime_field_request' + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: An identifier for the alert. + required: true + schema: + type: string + example: 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 responses: - '200': + '204': description: Indicates a successful call. - '400': - description: Bad request + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/default: - get: - summary: Get the default data view - operationId: getDefaultDataViewDefault + $ref: '#/components/schemas/Alerting_401_response' + /api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute: + post: + summary: Unmute an alert instance + operationId: legacyUnmuteAlertInstance + deprecated: true + description: Deprecated in 7.13.0. Use the unmute alert API instead. tags: - - data views + - alerting + parameters: + - $ref: '#/components/parameters/Alerting_kbn_xsrf' + - in: path + name: alertId + description: An identifier for the alert. + required: true + schema: + type: string + example: 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 responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - properties: - data_view_id: - type: string - examples: - getDefaultDataViewResponse: - $ref: >- - #/components/examples/Data_views_get_default_data_view_response - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_400_response' + $ref: '#/components/schemas/Alerting_401_response' + /api/apm/agent_keys: post: - summary: Set the default data view - operationId: setDefaultDatailViewDefault + summary: Create an APM agent key + description: Create a new agent key for APM. + operationId: createAgentKey tags: - - data views - parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - APM agent keys requestBody: required: true content: application/json: schema: type: object - required: - - data_view_id properties: - data_view_id: + name: type: string - nullable: true - description: > - The data view identifier. NOTE: The API does not validate - whether it is a valid identifier. Use `null` to unset the - default data view. - force: - type: boolean - description: Update an existing default data view identifier. - default: false - examples: - setDefaultDataViewRequest: - $ref: '#/components/examples/Data_views_set_default_data_view_request' + privileges: + type: array + items: + type: string + enum: + - event:write + - config_agent:read responses: '200': - description: Indicates a successful call. + description: Agent key created successfully content: application/json: schema: type: object properties: - acknowledged: - type: boolean - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_400_response' - /api/data_views/swap_references: - post: - summary: Swap saved object references - operationId: swapDataViewsDefault - description: > - Changes saved object references from one data view identifier to - another. WARNING: Misuse can break large numbers of saved objects! - Practicing with a backup is recommended. + api_key: + type: string + expiration: + type: integer + format: int64 + id: + type: string + name: + type: string + encoded: + type: string + /api/apm/services/{serviceName}/annotation/search: + get: + summary: Search for annotations + description: Search for annotations related to a specific service. + operationId: getAnnotation tags: - - data views + - APM annotations parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' - examples: - swapDataViewRequest: - $ref: '#/components/examples/Data_views_swap_data_view_request' - responses: - '200': - description: Indicates a successful call. - content: + - name: serviceName + in: path + required: true + description: The name of the service + schema: + type: string + - name: environment + in: query + required: false + description: The environment to filter annotations by + schema: + type: string + - name: start + in: query + required: false + description: The start date for the search + schema: + type: string + - name: end + in: query + required: false + description: The end date for the search + schema: + type: string + responses: + '200': + description: Successful response + content: application/json: schema: type: object properties: - deleteStatus: - type: object - properties: - deletePerformed: - type: boolean - remainingRefs: - type: integer - result: + annotations: type: array items: type: object properties: + type: + type: string + enum: + - version id: type: string - description: A saved object identifier. - type: + '@timestamp': + type: number + text: type: string - description: The saved object type. - /api/data_views/swap_references/_preview: + /api/apm/services/{serviceName}/annotation: post: - summary: Preview a saved object reference swap - operationId: previewSwapDataViewsDefault - description: > - Preview the impact of swapping saved object references from one data - view identifier to another. + summary: Create a service annotation + description: Create a new annotation for a specific service. + operationId: createAnnotation tags: - - data views + - APM annotations parameters: - - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - name: serviceName + in: path + required: true + description: The name of the service + schema: + type: string requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/Data_views_swap_data_view_request_object' - examples: - previewSwapDataViewRequest: - $ref: >- - #/components/examples/Data_views_preview_swap_data_view_request + type: object + properties: + '@timestamp': + type: string + service: + type: object + properties: + version: + type: string + environment: + type: string + message: + type: string + tags: + type: array + items: + type: string responses: '200': - description: Indicates a successful call. + description: Annotation created successfully content: application/json: schema: type: object properties: - result: - type: array - items: - type: object - properties: - id: - type: string - description: A saved object identifier. - type: + _id: + type: string + _index: + type: string + _source: + type: object + properties: + annotation: + type: string + tags: + type: array + items: type: string - description: The saved object type. - /api/ml/saved_objects/sync: - get: - summary: Sync saved objects in the default space + message: + type: string + service: + type: object + properties: + name: + type: string + environment: + type: string + version: + type: string + event: + type: object + properties: + created: + type: string + '@timestamp': + type: string + /api/cases: + post: + summary: Create a case + operationId: createCaseDefaultSpace description: > - Synchronizes Kibana saved objects for machine learning jobs and trained - models in the default space. You must have `all` privileges for the - **Machine Learning** feature in the **Analytics** section of the Kibana - feature privileges. This API runs automatically when you start Kibana - and periodically thereafter. - operationId: mlSync + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the + Kibana feature privileges, depending on the owner of the case you're + creating. tags: - - ml + - cases parameters: - - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' + - $ref: '#/components/parameters/Cases_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_create_case_request' + examples: + createCaseRequest: + $ref: '#/components/examples/Cases_create_case_request' responses: '200': - description: Indicates a successful call + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' + $ref: '#/components/schemas/Cases_case_response_properties' examples: - syncExample: - $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' + createCaseResponse: + $ref: '#/components/examples/Cases_create_case_response' '401': description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' - /api/encrypted_saved_objects/_rotate_key: - post: - summary: Rotate a key for encrypted saved objects - operationId: rotateEncryptionKey + $ref: '#/components/schemas/Cases_4xx_response' + delete: + summary: Delete cases + operationId: deleteCaseDefaultSpace description: > - Superuser role required. - - - If a saved object cannot be decrypted using the primary encryption key, - then Kibana will attempt to decrypt it using the specified - decryption-only keys. In most of the cases this overhead is negligible, - but if you're dealing with a large number of saved objects and - experiencing performance issues, you may want to rotate the encryption - key. - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. + You must have `read` or `all` privileges and the `delete` sub-feature + privilege for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases you're deleting. tags: - - saved objects + - cases parameters: - - in: query - name: batch_size - schema: - type: number - default: 10000 - required: false - description: > - Specifies a maximum number of saved objects that Kibana can process - in a single batch. Bulk key rotation is an iterative process since - Kibana may not be able to fetch and process all required saved - objects in one go and splits processing into consequent batches. By - default, the batch size is 10000, which is also a maximum allowed - value. - - in: query - name: type - schema: - type: string - required: false - description: > - Limits encryption key rotation only to the saved objects with the - specified type. By default, Kibana tries to rotate the encryption - key for all saved object types that may contain encrypted - attributes. + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_ids' responses: - '200': + '204': description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - properties: - total: - type: number - description: > - Indicates the total number of all encrypted saved objects - (optionally filtered by the requested `type`), regardless - of the key Kibana used for encryption. - successful: - type: number - description: > - Indicates the total number of all encrypted saved objects - (optionally filtered by the requested `type`), regardless - of the key Kibana used for encryption. - - - NOTE: In most cases, `total` will be greater than - `successful` even if `failed` is zero. The reason is that - Kibana may not need or may not be able to rotate - encryption keys for all encrypted saved objects. - failed: - type: number - description: > - Indicates the number of the saved objects that were still - encrypted with one of the old encryption keys that Kibana - failed to re-encrypt with the primary key. - examples: - rotateEncryptionKeyResponse: - $ref: '#/components/examples/Saved_objects_key_rotation_response' - '400': - description: Bad request + $ref: '#/components/schemas/Cases_4xx_response' + patch: + summary: Update cases + operationId: updateCaseDefaultSpace + description: > + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the + Kibana feature privileges, depending on the owner of the case you're + updating. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_update_case_request' + examples: + updateCaseRequest: + $ref: '#/components/examples/Cases_update_case_request' + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - '429': - description: Already in progress. + type: array + items: + $ref: '#/components/schemas/Cases_case_response_properties' + examples: + updateCaseResponse: + $ref: '#/components/examples/Cases_update_case_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_bulk_create: - post: - summary: Create saved objects - operationId: bulkCreateSavedObjects - deprecated: true + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/_find: + get: + summary: Search cases + operationId: findCasesDefaultSpace + description: > + You must have `read` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the cases you're seeking. tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - in: query - name: overwrite - description: When true, overwrites the document with the same identifier. - schema: - type: boolean - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - type: object + - $ref: '#/components/parameters/Cases_assignees' + - $ref: '#/components/parameters/Cases_category' + - $ref: '#/components/parameters/Cases_defaultSearchOperator' + - $ref: '#/components/parameters/Cases_from' + - $ref: '#/components/parameters/Cases_owner' + - $ref: '#/components/parameters/Cases_page_index' + - $ref: '#/components/parameters/Cases_page_size' + - $ref: '#/components/parameters/Cases_reporters' + - $ref: '#/components/parameters/Cases_search' + - $ref: '#/components/parameters/Cases_searchFields' + - $ref: '#/components/parameters/Cases_severity' + - $ref: '#/components/parameters/Cases_sortField' + - $ref: '#/components/parameters/Cases_sort_order' + - $ref: '#/components/parameters/Cases_status' + - $ref: '#/components/parameters/Cases_tags' + - $ref: '#/components/parameters/Cases_to' responses: '200': description: Indicates a successful call. @@ -1526,87 +2196,284 @@ paths: application/json: schema: type: object - '400': - description: Bad request + properties: + cases: + type: array + maxItems: 10000 + items: + $ref: '#/components/schemas/Cases_case_response_properties' + count_closed_cases: + type: integer + count_in_progress_cases: + type: integer + count_open_cases: + type: integer + page: + type: integer + per_page: + type: integer + total: + type: integer + examples: + findCaseResponse: + $ref: '#/components/examples/Cases_find_case_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_bulk_delete: - post: - summary: Delete saved objects - operationId: bulkDeleteSavedObjects - description: | - WARNING: When you delete a saved object, it cannot be recovered. - deprecated: true + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/alerts/{alertId}: + get: + summary: Get cases for an alert + operationId: getCasesByAlertDefaultSpace + description: > + You must have `read` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the cases you're seeking. + x-technical-preview: true tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - in: query - name: force - description: > - When true, force delete objects that exist in multiple namespaces. - Note that the option applies to the whole request. Use the delete - object API to specify per-object deletion behavior. TIP: Use this if - you attempted to delete objects and received an HTTP 400 error with - the following message: "Unable to delete saved object that exists in - multiple namespaces, use the force option to delete it anyway". - WARNING: When you bulk delete objects that exist in multiple - namespaces, the API also deletes legacy url aliases that reference - the object. These requests are batched to minimise the impact but - they can place a heavy load on Kibana. Make sure you limit the - number of objects that exist in multiple namespaces in a single bulk - delete operation. - schema: - type: boolean - requestBody: - required: true - content: - application/json: - schema: - type: array - items: - type: object + - $ref: '#/components/parameters/Cases_alert_id' + - $ref: '#/components/parameters/Cases_owner' responses: '200': - description: > - Indicates a successful call. NOTE: This HTTP response code indicates - that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. + description: Indicates a successful call. content: application/json: schema: - type: object - '400': - description: Bad request + type: array + maxItems: 10000 + items: + type: object + properties: + id: + type: string + description: The case identifier. + title: + type: string + description: The case title. + example: + - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 + title: security_case + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_bulk_get: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/configure: + get: + summary: Get case settings + operationId: getCaseConfigurationDefaultSpace + description: > + Get setting details such as the closure type, custom fields, templatse, + and the default connector for cases. You must have `read` privileges for + the **Cases** feature in the **Management**, **Observability**, or + **Security** section of the Kibana feature privileges, depending on + where the cases were created. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + items: + type: object + properties: + closure_type: + $ref: '#/components/schemas/Cases_closure_types' + connector: + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are + not used and are not propagated to individual cases, + therefore it is recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want + a default connector, use `none`. To retrieve + connector IDs, use the find connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a + default connector, use `none`. To retrieve connector + names, use the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + type: string + format: date-time + example: '2022-06-01T17:07:17.767Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + customFields: + type: array + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. If the + `type` is `text`, the default value must be a + string. If the `type` is `toggle`, the default + value must be boolean. + key: + description: > + A unique key for the custom field. Must be lower + case and composed only of a-z, 0-9, '_', and '-' + characters. It is used in API calls to refer to a + specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: >- + The custom field label that is displayed in the + case. + type: string + minLength: 1 + maxLength: 50 + required: + description: > + Indicates whether the field is required. If + `false`, the custom field can be set to null or + omitted when a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle + error: + type: string + nullable: true + example: null + id: + type: string + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + type: array + items: + type: object + properties: + action_type: + type: string + example: overwrite + source: + type: string + example: title + target: + type: string + example: summary + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + type: string + format: date-time + nullable: true + example: '2022-06-01T19:58:48.169Z' + updated_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + version: + type: string + example: WzIwNzMsMV0= + examples: + getConfigurationResponse: + $ref: '#/components/examples/Cases_get_case_configuration_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' post: - summary: Get saved objects - operationId: bulkGetSavedObjects - deprecated: true + summary: Add case settings + operationId: setCaseConfigurationDefaultSpace + description: > + Case settings include external connection details, custom fields, and + templates. Connectors are used to interface with external systems. You + must create a connector before you can use it in your cases. If you set + a default connector, it is automatically selected when you create cases + in Kibana. If you use the create case API, however, you must still + specify all of the connector details. You must have `all` privileges for + the **Cases** feature in the **Management**, **Observability**, or + **Security** section of the Kibana feature privileges, depending on + where you are creating cases. tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Cases_kbn_xsrf' requestBody: - required: true content: application/json: schema: - type: array - items: - type: object + $ref: '#/components/schemas/Cases_set_case_configuration_request' + examples: + setCaseConfigRequest: + $ref: '#/components/examples/Cases_set_case_configuration_request' responses: '200': description: Indicates a successful call. @@ -1614,625 +2481,850 @@ paths: application/json: schema: type: object - '400': - description: Bad request + properties: + closure_type: + $ref: '#/components/schemas/Cases_closure_types' + connector: + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are not + used and are not propagated to individual cases, + therefore it is recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want a + default connector, use `none`. To retrieve connector + IDs, use the find connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a + default connector, use `none`. To retrieve connector + names, use the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + type: string + format: date-time + example: '2022-06-01T17:07:17.767Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + customFields: + type: array + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. If the `type` + is `text`, the default value must be a string. If + the `type` is `toggle`, the default value must be + boolean. + key: + description: > + A unique key for the custom field. Must be lower + case and composed only of a-z, 0-9, '_', and '-' + characters. It is used in API calls to refer to a + specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: >- + The custom field label that is displayed in the + case. + type: string + minLength: 1 + maxLength: 50 + required: + description: > + Indicates whether the field is required. If `false`, + the custom field can be set to null or omitted when + a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle + error: + type: string + nullable: true + example: null + id: + type: string + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + type: array + items: + type: object + properties: + action_type: + type: string + example: overwrite + source: + type: string + example: title + target: + type: string + example: summary + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + type: string + format: date-time + nullable: true + example: '2022-06-01T19:58:48.169Z' + updated_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + version: + type: string + example: WzIwNzMsMV0= + examples: + setCaseConfigResponse: + $ref: '#/components/examples/Cases_set_case_configuration_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_bulk_resolve: - post: - summary: Resolve saved objects - operationId: bulkResolveSavedObjects - deprecated: true + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/configure/{configurationId}: + patch: + summary: Update case settings + operationId: updateCaseConfigurationDefaultSpace description: > - Retrieve multiple Kibana saved objects by identifier using any legacy - URL aliases if they exist. Under certain circumstances when Kibana is - upgraded, saved object migrations may necessitate regenerating some - object IDs to enable new features. When an object's ID is regenerated, a - legacy URL alias is created for that object, preserving its old ID. In - such a scenario, that object can be retrieved by the bulk resolve API - using either its new ID or its old ID. + Updates setting details such as the closure type, custom fields, + templates, and the default connector for cases. Connectors are used to + interface with external systems. You must create a connector before you + can use it in your cases. You must have `all` privileges for the + **Cases** feature in the **Management**, **Observability**, or + **Security** section of the Kibana feature privileges, depending on + where the case was created. tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_configuration_id' requestBody: - required: true content: application/json: schema: - type: array - items: - type: object + $ref: '#/components/schemas/Cases_update_case_configuration_request' + examples: + updateCaseConfigurationRequest: + $ref: '#/components/examples/Cases_update_case_configuration_request' responses: '200': - description: > - Indicates a successful call. NOTE: This HTTP response code indicates - that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. + description: Indicates a successful call. content: application/json: schema: type: object - '400': - description: Bad request - content: + properties: + closure_type: + $ref: '#/components/schemas/Cases_closure_types' + connector: + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are not + used and are not propagated to individual cases, + therefore it is recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want a + default connector, use `none`. To retrieve connector + IDs, use the find connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a + default connector, use `none`. To retrieve connector + names, use the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + created_at: + type: string + format: date-time + example: '2022-06-01T17:07:17.767Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + customFields: + type: array + description: Custom fields configuration details. + items: + type: object + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. If the `type` + is `text`, the default value must be a string. If + the `type` is `toggle`, the default value must be + boolean. + key: + description: > + A unique key for the custom field. Must be lower + case and composed only of a-z, 0-9, '_', and '-' + characters. It is used in API calls to refer to a + specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: >- + The custom field label that is displayed in the + case. + type: string + minLength: 1 + maxLength: 50 + required: + description: > + Indicates whether the field is required. If `false`, + the custom field can be set to null or omitted when + a case is created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle + error: + type: string + nullable: true + example: null + id: + type: string + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + mappings: + type: array + items: + type: object + properties: + action_type: + type: string + example: overwrite + source: + type: string + example: title + target: + type: string + example: summary + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + updated_at: + type: string + format: date-time + nullable: true + example: '2022-06-01T19:58:48.169Z' + updated_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + version: + type: string + example: WzIwNzMsMV0= + examples: + updateCaseConfigurationResponse: + $ref: >- + #/components/examples/Cases_update_case_configuration_response + '401': + description: Authorization information is missing or invalid. + content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_bulk_update: - post: - summary: Update saved objects - operationId: bulkUpdateSavedObjects - description: Update the attributes for multiple Kibana saved objects. + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/reporters: + get: + summary: Get case creators + operationId: getCaseReportersDefaultSpace + description: > + Returns information about the users who opened cases. You must have read + privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases. The API returns + information about the users as they existed at the time of the case + creation, including their name, full name, and email address. If any of + those details change thereafter or if a user is deleted, the information + returned by this API is unchanged. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + maxItems: 10000 + items: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + examples: + getReportersResponse: + $ref: '#/components/examples/Cases_get_reporters_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/status: + get: + summary: Get case status summary + operationId: getCaseStatusDefaultSpace + description: > + Returns the number of cases that are open, closed, and in progress. + Deprecated in 8.1.0. This API is deprecated and will be removed in a + future release; use the find cases API instead. You must have `read` + privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases you're seeking. deprecated: true tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + count_closed_cases: + type: integer + count_in_progress_cases: + type: integer + count_open_cases: + type: integer + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/tags: + get: + summary: Get case tags + operationId: getCaseTagsDefaultSpace + description: > + Aggregates and returns a list of case tags. You must have read + privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases you're seeking. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_owner' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + maxItems: 10000 + items: + type: string + examples: + getTagsResponse: + $ref: '#/components/examples/Cases_get_tags_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}: + get: + summary: Get case information + operationId: getCaseDefaultSpace + description: > + You must have `read` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the case you're seeking. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_includeComments' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_case_response_properties' + examples: + getDefaultCaseResponse: + $ref: '#/components/examples/Cases_get_case_response' + getDefaultObservabilityCaseReponse: + $ref: '#/components/examples/Cases_get_case_observability_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/alerts: + get: + summary: Get all alerts for a case + description: > + You must have `read` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the cases you're seeking. + x-technical-preview: true + operationId: getCaseAlertsDefaultSpace + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_case_id' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: array + items: + $ref: '#/components/schemas/Cases_alert_response_properties' + examples: + getCaseAlertsResponse: + $ref: '#/components/examples/Cases_get_case_alerts_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/comments: + post: + summary: Add a case comment or alert + operationId: addCaseCommentDefaultSpace + description: > + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the case you're creating. + NOTE: Each case can have a maximum of 1,000 alerts. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' requestBody: required: true content: application/json: schema: - type: array - items: - type: object + $ref: '#/components/schemas/Cases_add_case_comment_request' + examples: + createCaseCommentRequest: + $ref: '#/components/examples/Cases_add_comment_request' responses: '200': - description: > - Indicates a successful call. NOTE: This HTTP response code indicates - that the bulk operation succeeded. Errors pertaining to individual - objects will be returned in the response body. + description: Indicates a successful call. content: application/json: schema: - type: object - '400': - description: Bad request + $ref: '#/components/schemas/Cases_case_response_properties' + examples: + createCaseCommentResponse: + $ref: '#/components/examples/Cases_add_comment_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_export: - post: - summary: Export saved objects in the default space - operationId: exportSavedObjectsDefault + $ref: '#/components/schemas/Cases_4xx_response' + delete: + summary: Delete all case comments and alerts + operationId: deleteCaseCommentsDefaultSpace description: > - Retrieve sets of saved objects that you want to import into Kibana. - - You must include `type` or `objects` in the request body. - - - NOTE: The `savedObjects.maxImportExportSize` configuration setting - limits the number of saved objects which may be exported. - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. + Deletes all comments and alerts from a case. You must have `all` + privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases you're deleting. tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' + responses: + '204': + description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + patch: + summary: Update a case comment or alert + operationId: updateCaseCommentDefaultSpace + description: > + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the case you're updating. + NOTE: You cannot change the comment type or the owner of a comment. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' requestBody: required: true content: application/json: schema: - type: object - properties: - excludeExportDetails: - description: Do not add export details entry at the end of the stream. - type: boolean - default: false - includeReferencesDeep: - description: >- - Includes all of the referenced objects in the exported - objects. - type: boolean - objects: - description: A list of objects to export. - type: array - items: - type: object - type: - description: >- - The saved object types to include in the export. Use `*` to - export all the types. - oneOf: - - type: string - - type: array - items: - type: string + $ref: '#/components/schemas/Cases_update_case_comment_request' examples: - exportSavedObjectsRequest: - $ref: '#/components/examples/Saved_objects_export_objects_request' + updateCaseCommentRequest: + $ref: '#/components/examples/Cases_update_comment_request' responses: '200': description: Indicates a successful call. content: - application/x-ndjson: + application/json: schema: - type: object - additionalProperties: true + $ref: '#/components/schemas/Cases_case_response_properties' examples: - exportSavedObjectsResponse: - $ref: '#/components/examples/Saved_objects_export_objects_response' - '400': - description: Bad request. + updateCaseCommentResponse: + $ref: '#/components/examples/Cases_update_comment_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_find: + $ref: '#/components/schemas/Cases_4xx_response' get: - summary: Search for saved objects - operationId: findSavedObjects - description: Retrieve a paginated set of Kibana saved objects. + summary: Get all case comments + operationId: getAllCaseCommentsDefaultSpace + description: > + Deprecated in 8.1.0. This API is deprecated and will be removed in a + future release; instead, use the get case comment API, which requires a + comment identifier in the path. You must have `read` privileges for the + **Cases** feature in the **Management**, **Observability**, or + **Security** section of the Kibana feature privileges, depending on the + owner of the cases with the comments you're seeking. deprecated: true tags: - - saved objects + - cases parameters: - - in: query - name: aggs - description: > - An aggregation structure, serialized as a string. The field format - is similar to filter, meaning that to use a saved object type - attribute in the aggregation, the `savedObjectType.attributes.title: - "myTitle"` format must be used. For root fields, the syntax is - `savedObjectType.rootField`. NOTE: As objects 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. - schema: - type: string - - in: query - name: default_search_operator - description: The default operator to use for the `simple_query_string`. - schema: - type: string - - in: query - name: fields - description: The fields to return in the attributes key of the response. - schema: - oneOf: - - type: string - - type: array - - in: query - name: filter - description: > - The filter is a KQL string with the caveat that if you filter with - an attribute from your saved object type, it should look like that: - `savedObjectType.attributes.title: "myTitle"`. However, if you use a - root attribute of a saved object such as `updated_at`, you will have - to define your filter like that: `savedObjectType.updated_at > - 2018-12-22`. - schema: - type: string - - in: query - name: has_no_reference - description: >- - Filters to objects that do not have a relationship with the type and - identifier combination. - schema: - type: object - - in: query - name: has_no_reference_operator - description: >- - The operator to use for the `has_no_reference` parameter. Either - `OR` or `AND`. Defaults to `OR`. - schema: - type: string - - in: query - name: has_reference - description: >- - Filters to objects that have a relationship with the type and ID - combination. - schema: - type: object - - in: query - name: has_reference_operator - description: >- - The operator to use for the `has_reference` parameter. Either `OR` - or `AND`. Defaults to `OR`. - schema: - type: string - - in: query - name: page - description: The page of objects to return. - schema: - type: integer - - in: query - name: per_page - description: The number of objects to return per page. - schema: - type: integer - - in: query - name: search - description: >- - An Elasticsearch `simple_query_string` query that filters the - objects in the response. - schema: - type: string - - in: query - name: search_fields - description: >- - The fields to perform the `simple_query_string` parsed query - against. - schema: - oneOf: - - type: string - - type: array - - in: query - name: sort_field - description: > - Sorts the response. Includes "root" and "type" fields. "root" fields - exist for all saved objects, such as "updated_at". "type" fields are - specific to an object type, such as fields returned in the - attributes key of the response. When a single type is defined in the - type parameter, the "root" and "type" fields are allowed, and - validity checks are made in that order. When multiple types are - defined in the type parameter, only "root" fields are allowed. - schema: - type: string - - in: query - name: type - description: The saved object types to include. - required: true - schema: - oneOf: - - type: string - - type: array + - $ref: '#/components/parameters/Cases_case_id' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - '400': - description: Bad request + $ref: '#/components/schemas/Cases_case_response_properties' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_import: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/comments/_find: + get: + summary: Find case comments and alerts + operationId: findCaseCommentsDefaultSpace + description: > + Retrieves a paginated list of comments for a case. You must have `read` + privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the cases with the comments you're + seeking. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_page_index' + - $ref: '#/components/parameters/Cases_page_size' + - $ref: '#/components/parameters/Cases_sort_order' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_case_response_properties' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/comments/{commentId}: + delete: + summary: Delete a case comment or alert + operationId: deleteCaseCommentDefaultSpace + description: > + You must have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the cases you're deleting. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_kbn_xsrf' + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_comment_id' + responses: + '204': + description: Indicates a successful call. + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + get: + summary: Get a case comment or alert + operationId: getCaseCommentDefaultSpace + description: > + You must have `read` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the cases with the + comments you're seeking. + tags: + - cases + parameters: + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_comment_id' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + oneOf: + - $ref: >- + #/components/schemas/Cases_alert_comment_response_properties + - $ref: >- + #/components/schemas/Cases_user_comment_response_properties + examples: + getCaseCommentResponse: + $ref: '#/components/examples/Cases_get_comment_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/connector/{connectorId}/_push: post: - summary: Import saved objects in the default space - operationId: importSavedObjectsDefault + summary: Push a case to an external service description: > - Create sets of Kibana saved objects from a file created by the export - API. - - Saved objects can be imported only into the same version, a newer minor - on the same major, or the next major. Exported saved objects are not - backwards compatible and cannot be imported into an older version of - Kibana. - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. + You must have `all` privileges for the **Actions and Connectors** + feature in the **Management** section of the Kibana feature privileges. + You must also have `all` privileges for the **Cases** feature in the + **Management**, **Observability**, or **Security** section of the Kibana + feature privileges, depending on the owner of the case you're pushing. + operationId: pushCaseDefaultSpace tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - in: query - name: createNewCopies - schema: - type: boolean - required: false - description: > - Creates copies of saved objects, regenerates each object ID, and - resets the origin. When used, potential conflict errors are avoided. - NOTE: This option cannot be used with the `overwrite` and - `compatibilityMode` options. - - in: query - name: overwrite - schema: - type: boolean - required: false - description: > - Overwrites saved objects when they already exist. When used, - potential conflict errors are automatically resolved by overwriting - the destination object. NOTE: This option cannot be used with the - `createNewCopies` option. - - in: query - name: compatibilityMode - schema: - type: boolean - required: false - description: > - Applies various adjustments to the saved objects that are being - imported to maintain compatibility between different Kibana - versions. Use this option only if you encounter issues with imported - saved objects. NOTE: This option cannot be used with the - `createNewCopies` option. + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_connector_id' + - $ref: '#/components/parameters/Cases_kbn_xsrf' requestBody: - required: true content: - multipart/form-data: + application/json: schema: type: object - properties: - file: - description: > - A file exported using the export API. NOTE: The - `savedObjects.maxImportExportSize` configuration setting - limits the number of saved objects which may be included in - this file. Similarly, the - `savedObjects.maxImportPayloadBytes` setting limits the - overall size of the file that can be imported. - examples: - importObjectsRequest: - $ref: '#/components/examples/Saved_objects_import_objects_request' + nullable: true responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - properties: - success: - type: boolean - description: > - Indicates when the import was successfully completed. When - set to false, some objects may not have been created. For - additional information, refer to the `errors` and - `successResults` properties. - successCount: - type: integer - description: Indicates the number of successfully imported records. - errors: - type: array - items: - type: object - description: > - Indicates the import was unsuccessful and specifies the - objects that failed to import. - - - NOTE: One object may result in multiple errors, which - requires separate steps to resolve. For instance, a - `missing_references` error and conflict error. - successResults: - type: array - items: - type: object - description: > - Indicates the objects that are successfully imported, with - any metadata if applicable. - - - NOTE: Objects are created only when all resolvable errors - are addressed, including conflicts and missing references. - If objects are created as new copies, each entry in the - `successResults` array includes a `destinationId` - attribute. + $ref: '#/components/schemas/Cases_case_response_properties' examples: - importObjectsResponse: - $ref: '#/components/examples/Saved_objects_import_objects_response' - '400': - description: Bad request. + pushCaseResponse: + $ref: '#/components/examples/Cases_push_case_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/_resolve_import_errors: - post: - summary: Resolve import errors - operationId: resolveImportErrors + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/user_actions: + get: + summary: Get case activity description: > - To resolve errors from the Import objects API, you can: - - - * Retry certain saved objects - - * Overwrite specific saved objects - - * Change references to different saved objects - - - This functionality is in technical preview and may be changed or removed - in a future release. Elastic will work to fix any issues, but features - in technical preview are not subject to the support SLA of official GA - features. + Returns all user activity for a case. Deprecated in 8.1.0. This API is + deprecated and will be removed in a future release; use the find user + actions API instead. You must have `read` privileges for the **Cases** + feature in the **Management**, **Observability**, or **Security** + section of the Kibana feature privileges, depending on the owner of the + case you're seeking. + deprecated: true + operationId: getCaseActivityDefaultSpace tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - in: query - name: compatibilityMode - schema: - type: boolean - required: false - description: > - Applies various adjustments to the saved objects that are being - imported to maintain compatibility between different Kibana - versions. When enabled during the initial import, also enable when - resolving import errors. This option cannot be used with the - `createNewCopies` option. - - in: query - name: createNewCopies - schema: - type: boolean - required: false - description: > - Creates copies of the saved objects, regenerates each object ID, and - resets the origin. When enabled during the initial import, also - enable when resolving import errors. - requestBody: - required: true - content: - multipart/form-data: - schema: - type: object - required: - - retries - properties: - file: - description: The same file given to the import API. - type: string - format: binary - retries: - description: >- - The retry operations, which can specify how to resolve - different types of errors. - type: array - items: - type: object - required: - - type - - id - properties: - type: - description: The saved object type. - type: string - id: - description: The saved object ID. - type: string - overwrite: - description: >- - When set to `true`, the source object overwrites the - conflicting destination object. When set to `false`, - does nothing. - type: boolean - destinationId: - description: >- - Specifies the destination ID that the imported object - should have, if different from the current ID. - type: string - replaceReferences: - description: >- - A list of `type`, `from`, and `to` used to change the - object references. - type: array - items: - type: object - properties: - type: - type: string - from: - type: string - to: - type: string - ignoreMissingReferences: - description: >- - When set to `true`, ignores missing reference errors. - When set to `false`, does nothing. - type: boolean - examples: - resolveImportErrorsRequest: - $ref: >- - #/components/examples/Saved_objects_resolve_missing_reference_request + - $ref: '#/components/parameters/Cases_case_id' responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - properties: - success: - type: boolean - description: > - Indicates a successful import. When set to `false`, some - objects may not have been created. For additional - information, refer to the `errors` and `successResults` - properties. - successCount: - type: number - description: | - Indicates the number of successfully resolved records. - errors: - type: array - description: > - Specifies the objects that failed to resolve. - - - NOTE: One object can result in multiple errors, which - requires separate steps to resolve. For instance, a - `missing_references` error and a `conflict` error. - items: - type: object - successResults: - type: array - description: > - Indicates the objects that are successfully imported, with - any metadata if applicable. - - - NOTE: Objects are only created when all resolvable errors - are addressed, including conflict and missing references. - items: - type: object - examples: - resolveImportErrorsResponse: - $ref: >- - #/components/examples/Saved_objects_resolve_missing_reference_response - '400': - description: Bad request. + type: array + items: + $ref: '#/components/schemas/Cases_user_actions_response_properties' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/{type}: - post: - summary: Create a saved object - operationId: createSavedObject - description: Create a Kibana saved object with a randomly generated identifier. - deprecated: true + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/{caseId}/user_actions/_find: + get: + summary: Find case activity + description: > + Retrives a paginated list of user activity for a case. You must have + `read` privileges for the **Cases** feature in the **Management**, + **Observability**, or **Security** section of the Kibana feature + privileges, depending on the owner of the case you're seeking. + operationId: findCaseActivityDefaultSpace tags: - - saved objects + - cases parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - - in: query - name: overwrite - description: If true, overwrites the document with the same identifier. - schema: - type: boolean - requestBody: - required: true - content: - application/json: - schema: - type: object - required: - - attributes - properties: - attributes: - $ref: '#/components/schemas/Saved_objects_attributes' - initialNamespaces: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' - references: - $ref: '#/components/schemas/Saved_objects_references' + - $ref: '#/components/parameters/Cases_case_id' + - $ref: '#/components/parameters/Cases_page_index' + - $ref: '#/components/parameters/Cases_page_size' + - $ref: '#/components/parameters/Cases_sort_order' + - $ref: '#/components/parameters/Cases_user_action_types' responses: '200': description: Indicates a successful call. @@ -2240,774 +3332,8691 @@ paths: application/json: schema: type: object - '409': - description: Indicates a conflict error. + properties: + page: + type: integer + perPage: + type: integer + total: + type: integer + userActions: + type: array + maxItems: 10000 + items: + $ref: >- + #/components/schemas/Cases_user_actions_find_response_properties + examples: + findCaseActivityResponse: + $ref: '#/components/examples/Cases_find_case_activity_response' + '401': + description: Authorization information is missing or invalid. content: application/json: schema: - type: object - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/{type}/{id}: + $ref: '#/components/schemas/Cases_4xx_response' + /api/cases/configure/connectors/_find: get: - summary: Get a saved object - operationId: getSavedObject - description: Retrieve a single Kibana saved object by identifier. - deprecated: true + summary: Get case connectors + operationId: findCaseConnectorsDefaultSpace + description: > + Get information about connectors that are supported for use in cases. + You must have `read` privileges for the **Actions and Connectors** + feature in the **Management** section of the Kibana feature privileges. tags: - - saved objects - parameters: - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - cases responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - post: - summary: Create a saved object - operationId: createSavedObjectId - description: >- - Create a Kibana saved object and specify its identifier instead of using - a randomly generated ID. - deprecated: true - tags: - - saved objects - parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' - - in: query - name: overwrite - description: If true, overwrites the document with the same identifier. - schema: - type: boolean + type: array + items: + type: object + properties: + actionTypeId: + $ref: '#/components/schemas/Cases_connector_types' + config: + type: object + properties: + apiUrl: + type: string + projectKey: + type: string + additionalProperties: true + id: + type: string + isDeprecated: + type: boolean + isMissingSecrets: + type: boolean + isPreconfigured: + type: boolean + name: + type: string + referencedByCount: + type: integer + maxItems: 1000 + examples: + findConnectorResponse: + $ref: '#/components/examples/Cases_find_connector_response' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Cases_4xx_response' + /api/actions/connector: + post: + summary: Create a connector with a random ID + operationId: createConnector + description: The connector identifier is randomly generated. + tags: + - connectors + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' requestBody: required: true content: application/json: schema: - type: object - required: - - attributes - properties: - attributes: - $ref: '#/components/schemas/Saved_objects_attributes' - initialNamespaces: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' - references: - $ref: '#/components/schemas/Saved_objects_initial_namespaces' + $ref: '#/components/schemas/Connectors_create_connector_request' + examples: + createEmailConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_email_connector_request + createIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_index_connector_request + createWebhookConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_webhook_connector_request + createXmattersConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_xmatters_connector_request responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - '409': - description: Indicates a conflict error. + $ref: '#/components/schemas/Connectors_connector_response_properties' + examples: + createEmailConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_email_connector_response + createIndexConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_index_connector_response + createWebhookConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_webhook_connector_response + createXmattersConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_xmatters_connector_response + '401': + $ref: '#/components/responses/Connectors_401' + /api/actions/connector/{connectorId}: + get: + summary: Get a connector information + operationId: getConnector + tags: + - connectors + parameters: + - $ref: '#/components/parameters/Connectors_connector_id' + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - type: object - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - put: - summary: Update a saved object - operationId: updateSavedObject - description: Update the attributes for Kibana saved objects. - deprecated: true + $ref: '#/components/schemas/Connectors_connector_response_properties' + examples: + getConnectorResponse: + $ref: '#/components/examples/Connectors_get_connector_response' + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + delete: + summary: Delete a connector + operationId: deleteConnector tags: - - saved objects + - connectors parameters: - - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' + responses: + '204': + description: Indicates a successful call. + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + post: + summary: Create a connector + operationId: createConnectorId + tags: + - connectors + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - in: path + name: connectorId + description: > + A UUID v1 or v4 identifier for the connector. If you omit this + parameter, an identifier is randomly generated. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 requestBody: required: true content: application/json: schema: - type: object + $ref: '#/components/schemas/Connectors_create_connector_request' + examples: + createIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_create_index_connector_request responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - '404': - description: Indicates the object was not found. - content: - application/json: - schema: - type: object - '409': - description: Indicates a conflict error. - content: - application/json: - schema: - type: object - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /api/saved_objects/resolve/{type}/{id}: - get: - summary: Resolve a saved object - operationId: resolveSavedObject - description: > - Retrieve a single Kibana saved object by identifier using any legacy URL - alias if it exists. Under certain circumstances, when Kibana is - upgraded, saved object migrations may necessitate regenerating some - object IDs to enable new features. When an object's ID is regenerated, a - legacy URL alias is created for that object, preserving its old ID. In - such a scenario, that object can be retrieved using either its new ID or - its old ID. - deprecated: true + $ref: '#/components/schemas/Connectors_connector_response_properties' + examples: + createIndexConnectorResponse: + $ref: >- + #/components/examples/Connectors_create_index_connector_response + '401': + $ref: '#/components/responses/Connectors_401' + put: + summary: Update a connector + operationId: updateConnector tags: - - saved objects + - connectors parameters: - - $ref: '#/components/parameters/Saved_objects_saved_object_id' - - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Connectors_update_connector_request' + examples: + updateIndexConnectorRequest: + $ref: >- + #/components/examples/Connectors_update_index_connector_request responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object + $ref: '#/components/schemas/Connectors_connector_response_properties' '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/Saved_objects_400_response' - security: - - Saved_objects_basicAuth: [] - - Saved_objects_apiKeyAuth: [] - /s/{spaceId}/api/observability/slos: + $ref: '#/components/responses/Connectors_401' + '401': + $ref: '#/components/responses/Connectors_401' + '404': + $ref: '#/components/responses/Connectors_404' + /api/actions/connector/{connectorId}/_execute: post: - summary: Create an SLO - operationId: createSloOp + summary: Run a connector + operationId: runConnector description: > - You must have `all` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + You can use this API to test an action that involves interaction with + Kibana services or integrations with third-party systems. You must have + `read` privileges for the **Actions and Connectors** feature in the + **Management** section of the Kibana feature privileges. If you use an + index connector, you must also have `all`, `create`, `index`, or `write` + indices privileges. tags: - - slo + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_connector_id' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/SLOs_create_slo_request' - responses: - '200': - description: Successful request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_create_slo_response' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' - '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '409': - description: Conflict - The SLO id already exists + $ref: '#/components/schemas/Connectors_run_connector_request' + examples: + runCasesWebhookConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_cases_webhook_connector_request + runEmailConnectorRequest: + $ref: '#/components/examples/Connectors_run_email_connector_request' + runIndexConnectorRequest: + $ref: '#/components/examples/Connectors_run_index_connector_request' + runJiraConnectorRequest: + $ref: '#/components/examples/Connectors_run_jira_connector_request' + runPagerDutyConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_pagerduty_connector_request + runServerLogConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_server_log_connector_request + runServiceNowITOMConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_servicenow_itom_connector_request + runSlackConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_slack_api_connector_request + runSwimlaneConnectorRequest: + $ref: >- + #/components/examples/Connectors_run_swimlane_connector_request + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_409_response' - servers: - - url: https://localhost:5601 + type: object + required: + - connector_id + - status + properties: + connector_id: + type: string + description: The identifier for the connector. + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + enum: + - error + - ok + examples: + runCasesWebhookConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_cases_webhook_connector_response + runEmailConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_email_connector_response + runIndexConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_index_connector_response + runJiraConnectorResponse: + $ref: '#/components/examples/Connectors_run_jira_connector_response' + runPagerDutyConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_pagerduty_connector_response + runServerLogConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_server_log_connector_response + runServiceNowITOMConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_servicenow_itom_connector_response + runSlackConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_slack_api_connector_response + runSwimlaneConnectorResponse: + $ref: >- + #/components/examples/Connectors_run_swimlane_connector_response + '401': + $ref: '#/components/responses/Connectors_401' + /api/actions/connectors: get: - summary: Get a paginated list of SLOs - operationId: findSlosOp - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + summary: Get all connectors + operationId: getConnectors tags: - - slo - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - name: kqlQuery - in: query - description: A valid kql query to filter the SLO with - schema: - type: string - example: 'slo.name:latency* and slo.tags : "prod"' - - name: page - in: query - description: The page to use for pagination, must be greater or equal than 1 - schema: - type: integer - default: 1 - example: 1 - - name: perPage - in: query - description: Number of SLOs returned by page - schema: - type: integer - default: 25 - maximum: 5000 - example: 25 - - name: sortBy - in: query - description: Sort by field - schema: - type: string - enum: - - sli_value - - status - - error_budget_consumed - - error_budget_remaining - default: status - example: status - - name: sortDirection - in: query - description: Sort order - schema: - type: string - enum: - - asc - - desc - default: asc - example: asc - - name: hideStale - in: query - description: >- - Hide stale SLOs from the list as defined by stale SLO threshold in - SLO settings - schema: - type: boolean + - connectors responses: '200': - description: Successful request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_find_slo_response' - '400': - description: Bad request + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_400_response' + type: array + items: + $ref: >- + #/components/schemas/Connectors_connector_response_properties + examples: + getConnectorsResponse: + $ref: '#/components/examples/Connectors_get_connectors_response' '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_404_response' - /s/{spaceId}/api/observability/slos/{sloId}: + $ref: '#/components/responses/Connectors_401' + /api/actions/connector_types: get: - summary: Get an SLO - operationId: getSloOp - description: > - You must have the `read` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + summary: Get all connector types + operationId: getConnectorTypes tags: - - slo + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - - name: instanceId - in: query - description: the specific instanceId used by the summary calculation + - in: query + name: feature_id + description: >- + A filter to limit the retrieved connector types to those that + support a specific feature (such as alerting or cases). schema: - type: string - example: host-abcde + $ref: '#/components/schemas/Connectors_features' responses: '200': - description: Successful request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_slo_with_summary_response' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' - '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_404_response' - put: - summary: Update an SLO - operationId: updateSloOp - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - tags: - - slo - parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_update_slo_request' - responses: - '200': - description: Successful request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' + title: Get connector types response body properties + description: The properties vary for each connector type. + type: array + items: + type: object + properties: + enabled: + type: boolean + description: >- + Indicates whether the connector type is enabled in + Kibana. + example: true + enabled_in_config: + type: boolean + description: >- + Indicates whether the connector type is enabled in the + Kibana configuration file. + example: true + enabled_in_license: + type: boolean + description: >- + Indicates whether the connector is enabled in the + license. + example: true + id: + $ref: '#/components/schemas/Connectors_connector_types' + is_system_action_type: + type: boolean + example: false + minimum_license_required: + type: string + description: The license that is required to use the connector type. + example: basic + name: + type: string + description: The name of the connector type. + example: Index + supported_feature_ids: + type: array + description: The features that are supported by the connector type. + items: + $ref: '#/components/schemas/Connectors_features' + example: + - alerting + - cases + - siem + examples: + getConnectorTypesServerlessResponse: + $ref: >- + #/components/examples/Connectors_get_connector_types_generativeai_response '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_404_response' + $ref: '#/components/responses/Connectors_401' + /api/actions/action/{actionId}: delete: - summary: Delete an SLO - operationId: deleteSloOp + summary: Delete a connector + operationId: legacyDeleteConnector + deprecated: true description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + Deprecated in 7.13.0. Use the delete connector API instead. WARNING: + When you delete a connector, it cannot be recovered. tags: - - slo + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' responses: '204': - description: Successful request - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' + description: Indicates a successful call. '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_404_response' - /s/{spaceId}/api/observability/slos/{sloId}/enable: - post: - summary: Enable an SLO - operationId: enableSloOp - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + $ref: '#/components/responses/Connectors_401' + get: + summary: Get connector information + operationId: legacyGetConnector + description: Deprecated in 7.13.0. Use the get connector API instead. + deprecated: true tags: - - slo + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' + - $ref: '#/components/parameters/Connectors_action_id' responses: - '204': - description: Successful request - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' + '200': + $ref: '#/components/responses/Connectors_200_actions' '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_404_response' - /s/{spaceId}/api/observability/slos/{sloId}/disable: - post: - summary: Disable an SLO - operationId: disableSloOp - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + $ref: '#/components/responses/Connectors_401' + put: + summary: Update a connector + operationId: legacyUpdateConnector + deprecated: true + description: Deprecated in 7.13.0. Use the update connector API instead. tags: - - slo + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' + requestBody: + required: true + content: + application/json: + schema: + title: Legacy update connector request body properties + description: The properties vary depending on the connector type. + type: object + properties: + config: + type: object + description: >- + The new connector configuration. Configuration properties + vary depending on the connector type. + name: + type: string + description: The new name for the connector. + secrets: + type: object + description: >- + The updated secrets configuration for the connector. Secrets + properties vary depending on the connector type. responses: '200': - description: Successful request - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' - '401': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_403_response' + $ref: '#/components/responses/Connectors_200_actions' '404': - description: Not found response + $ref: '#/components/responses/Connectors_404' + /api/actions: + get: + summary: Get all connectors + operationId: legacyGetConnectors + deprecated: true + description: Deprecated in 7.13.0. Use the get all connectors API instead. + tags: + - connectors + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_404_response' - /s/{spaceId}/api/observability/slos/{sloId}/_reset: + type: array + items: + $ref: '#/components/schemas/Connectors_action_response_properties' + '401': + $ref: '#/components/responses/Connectors_401' post: - summary: Reset an SLO - operationId: resetSloOp - description: > - You must have the `write` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. - tags: - - slo + summary: Create a connector + operationId: legacyCreateConnector + deprecated: true + description: Deprecated in 7.13.0. Use the create connector API instead. + tags: + - connectors parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' - - $ref: '#/components/parameters/SLOs_slo_id' + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + title: Legacy create connector request properties + type: object + properties: + actionTypeId: + type: string + description: The connector type identifier. + config: + type: object + description: >- + The configuration for the connector. Configuration + properties vary depending on the connector type. + name: + type: string + description: The display name for the connector. + secrets: + type: object + description: > + The secrets configuration for the connector. Secrets + configuration properties vary depending on the connector + type. NOTE: Remember these values. You must provide them + each time you update the connector. responses: - '204': - description: Successful request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_slo_definition_response' - '400': - description: Bad request + '200': + $ref: '#/components/responses/Connectors_200_actions' + '401': + $ref: '#/components/responses/Connectors_401' + /api/actions/list_action_types: + get: + summary: Get connector types + operationId: legacyGetConnectorTypes + deprecated: true + description: Deprecated in 7.13.0. Use the get all connector types API instead. + tags: + - connectors + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_400_response' + title: Legacy get connector types response body properties + description: The properties vary for each connector type. + type: array + items: + type: object + properties: + enabled: + type: boolean + description: >- + Indicates whether the connector type is enabled in + Kibana. + enabledInConfig: + type: boolean + description: >- + Indicates whether the connector type is enabled in the + Kibana `.yml` file. + enabledInLicense: + type: boolean + description: >- + Indicates whether the connector is enabled in the + license. + example: true + id: + type: string + description: The unique identifier for the connector type. + minimumLicenseRequired: + type: string + description: The license that is required to use the connector type. + name: + type: string + description: The name of the connector type. '401': - description: Unauthorized response + $ref: '#/components/responses/Connectors_401' + /api/actions/action/{actionId}/_execute: + post: + summary: Run a connector + operationId: legacyRunConnector + deprecated: true + description: Deprecated in 7.13.0. Use the run connector API instead. + tags: + - connectors + parameters: + - $ref: '#/components/parameters/Connectors_kbn_xsrf' + - $ref: '#/components/parameters/Connectors_action_id' + requestBody: + required: true + content: + application/json: + schema: + title: Legacy run connector request body properties + description: The properties vary depending on the connector type. + type: object + required: + - params + properties: + params: + type: object + description: >- + The parameters of the connector. Parameter properties vary + depending on the connector type. + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response + type: object + properties: + actionId: + type: string + data: + oneOf: + - type: object + description: Information returned from the action. + additionalProperties: true + - type: array + description: An array of information returned from the action. + items: + type: object + status: + type: string + description: The status of the action. + '401': + $ref: '#/components/responses/Connectors_401' + /api/data_views: + get: + summary: Get all data views + operationId: getAllDataViewsDefault + tags: + - data views + responses: + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_403_response' - '404': - description: Not found response + type: object + properties: + data_view: + type: array + items: + type: object + properties: + id: + type: string + name: + type: string + namespaces: + type: array + items: + type: string + title: + type: string + typeMeta: + type: object + examples: + getAllDataViewsResponse: + $ref: '#/components/examples/Data_views_get_data_views_response' + '400': + description: Bad request content: application/json: schema: - $ref: '#/components/schemas/SLOs_404_response' - /s/{spaceId}/api/observability/slos/_delete_instances: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/data_view: post: - summary: Batch delete rollup and summary data - operationId: deleteSloInstancesOp - description: > - The deletion occurs for the specified list of `sloId` and `instanceId`. - You must have `all` privileges for the **SLOs** feature in the - **Observability** section of the Kibana feature privileges. + summary: Create a data view + operationId: createDataViewDefaultw tags: - - slo + - data views parameters: - - $ref: '#/components/parameters/SLOs_kbn_xsrf' - - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/Data_views_kbn_xsrf' requestBody: required: true content: application/json: schema: - $ref: '#/components/schemas/SLOs_delete_slo_instances_request' + $ref: '#/components/schemas/Data_views_create_data_view_request_object' + examples: + createDataViewRequest: + $ref: '#/components/examples/Data_views_create_data_view_request' responses: - '204': - description: Successful request - '400': - description: Bad request - content: - application/json: - schema: - $ref: '#/components/schemas/SLOs_400_response' - '401': - description: Unauthorized response + '200': + description: Indicates a successful call. content: application/json: schema: - $ref: '#/components/schemas/SLOs_401_response' - '403': - description: Unauthorized response + $ref: '#/components/schemas/Data_views_data_view_response_object' + '400': + description: Bad request content: application/json: schema: - $ref: '#/components/schemas/SLOs_403_response' - servers: - - url: https://localhost:5601 - /api/status: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/data_view/{viewId}: get: - operationId: /api/status#0 + summary: Get a data view + operationId: getDataViewDefault + tags: + - data views parameters: - - description: The version of the API to use - in: header - name: elastic-api-version - schema: - default: '2023-10-31' - enum: - - '2023-10-31' - type: string - - description: Set to "true" to get the response in v7 format. - in: query - name: v7format - required: false - schema: - type: boolean - - description: Set to "true" to get the response in v8 format. - in: query - name: v8format - required: false - schema: - type: boolean + - $ref: '#/components/parameters/Data_views_view_id' responses: '200': + description: Indicates a successful call. content: - application/json; Elastic-Api-Version=2023-10-31: + application/json: schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_core_status_response' - - $ref: >- - #/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse - description: >- - Kibana's operational status. A minimal response is sent for - unauthorized users. - description: Overall status is OK and Kibana should be functioning normally. - '503': + $ref: '#/components/schemas/Data_views_data_view_response_object' + examples: + getDataViewResponse: + $ref: '#/components/examples/Data_views_get_data_view_response' + '404': + description: Object is not found. content: - application/json; Elastic-Api-Version=2023-10-31: + application/json: schema: - anyOf: - - $ref: '#/components/schemas/Kibana_HTTP_APIs_core_status_response' - - $ref: >- - #/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse - description: >- - Kibana's operational status. A minimal response is sent for - unauthorized users. - description: >- - Kibana or some of it's essential services are unavailable. Kibana - may be degraded or unavailable. - summary: Get Kibana's current status + $ref: '#/components/schemas/Data_views_404_response' + delete: + summary: Delete a data view + operationId: deleteDataViewDefault + description: | + WARNING: When you delete a data view, it cannot be recovered. tags: - - system - security: - - Kibana_HTTP_APIs_basicAuth: [] -components: - parameters: - Connectors_kbn_xsrf: - schema: - type: string - in: header - name: kbn-xsrf - description: Cross-site request forgery protection - required: true - Connectors_connector_id: - in: path - name: connectorId - description: An identifier for the connector. - required: true - schema: - type: string - example: df770e30-8b8b-11ed-a780-3b746c987a81 - Connectors_action_id: - in: path - name: actionId - description: An identifier for the action. - required: true - schema: - type: string - example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad - Data_views_kbn_xsrf: - schema: - type: string - in: header - name: kbn-xsrf - description: Cross-site request forgery protection - required: true - Data_views_view_id: - in: path - name: viewId - description: An identifier for the data view. - required: true - schema: - type: string - example: ff959d40-b880-11e8-a6d9-e546fe2bba5f - Data_views_field_name: - in: path - name: fieldName - description: The name of the runtime field. - required: true - schema: - type: string - example: hour_of_day - Machine_learning_APIs_simulateParam: - in: query - name: simulate - description: >- - When true, simulates the synchronization by returning only the list of - actions that would be performed. - required: false - schema: - type: boolean - example: 'true' - Saved_objects_kbn_xsrf: - schema: - type: string - in: header - name: kbn-xsrf - description: Cross-site request forgery protection - required: true - Saved_objects_saved_object_type: - in: path - name: type - description: >- - Valid options include `visualization`, `dashboard`, `search`, - `index-pattern`, `config`. - required: true - schema: - type: string - Saved_objects_saved_object_id: - in: path - name: id - description: An identifier for the saved object. - required: true - schema: - type: string - SLOs_kbn_xsrf: - schema: - type: string - in: header - name: kbn-xsrf - description: Cross-site request forgery protection - required: true - SLOs_space_id: - in: path - name: spaceId - description: >- - An identifier for the space. If `/s/` and the identifier are omitted - from the path, the default space is used. - required: true - schema: - type: string - example: default - SLOs_slo_id: - in: path - name: sloId - description: An identifier for the slo. - required: true - schema: - type: string - example: 9c235211-6834-11ea-a78c-6feb38a34414 - schemas: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '204': + description: Indicates a successful call. + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_404_response' + post: + summary: Update a data view + operationId: updateDataViewDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_update_data_view_request_object' + examples: + updateDataViewRequest: + $ref: '#/components/examples/Data_views_update_data_view_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_data_view_response_object' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/data_view/{viewId}/fields: + post: + summary: Update data view fields metadata + operationId: updateFieldsMetadataDefault + description: > + Update fields presentation metadata such as count, customLabel, + customDescription, and format. + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - fields + properties: + fields: + description: The field object. + type: object + examples: + updateFieldsMetadataRequest: + $ref: '#/components/examples/Data_views_update_field_metadata_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + acknowledged: + type: boolean + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/data_view/{viewId}/runtime_field: + post: + summary: Create a runtime field + operationId: createRuntimeFieldDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - runtimeField + properties: + name: + type: string + description: | + The name for a runtime field. + runtimeField: + type: object + description: | + The runtime field definition object. + examples: + createRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + put: + summary: Create or update a runtime field + operationId: createUpdateRuntimeFieldDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + - name: viewId + in: path + description: | + The ID of the data view fields you want to update. + required: true + schema: + type: string + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - name + - runtimeField + properties: + name: + type: string + description: | + The name for a runtime field. + runtimeField: + type: object + description: | + The runtime field definition object. + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_create_runtime_field_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + data_view: + type: object + fields: + type: array + items: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/data_view/{viewId}/runtime_field/{fieldName}: + get: + summary: Get a runtime field + operationId: getRuntimeFieldDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + data_view: + type: object + fields: + type: array + items: + type: object + examples: + getRuntimeFieldResponse: + $ref: '#/components/examples/Data_views_get_runtime_field_response' + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_404_response' + delete: + summary: Delete a runtime field from a data view + operationId: deleteRuntimeFieldDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + responses: + '200': + description: Indicates a successful call. + '404': + description: Object is not found. + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_404_response' + post: + summary: Update a runtime field + operationId: updateRuntimeFieldDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_field_name' + - $ref: '#/components/parameters/Data_views_view_id' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - runtimeField + properties: + runtimeField: + type: object + description: | + The runtime field definition object. + + You can update following fields: + + - `type` + - `script` + examples: + updateRuntimeFieldRequest: + $ref: '#/components/examples/Data_views_update_runtime_field_request' + responses: + '200': + description: Indicates a successful call. + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/default: + get: + summary: Get the default data view + operationId: getDefaultDataViewDefault + tags: + - data views + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + data_view_id: + type: string + examples: + getDefaultDataViewResponse: + $ref: >- + #/components/examples/Data_views_get_default_data_view_response + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + post: + summary: Set the default data view + operationId: setDefaultDatailViewDefault + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - data_view_id + properties: + data_view_id: + type: string + nullable: true + description: > + The data view identifier. NOTE: The API does not validate + whether it is a valid identifier. Use `null` to unset the + default data view. + force: + type: boolean + description: Update an existing default data view identifier. + default: false + examples: + setDefaultDataViewRequest: + $ref: '#/components/examples/Data_views_set_default_data_view_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + acknowledged: + type: boolean + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_400_response' + /api/data_views/swap_references: + post: + summary: Swap saved object references + operationId: swapDataViewsDefault + description: > + Changes saved object references from one data view identifier to + another. WARNING: Misuse can break large numbers of saved objects! + Practicing with a backup is recommended. + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' + examples: + swapDataViewRequest: + $ref: '#/components/examples/Data_views_swap_data_view_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + deleteStatus: + type: object + properties: + deletePerformed: + type: boolean + remainingRefs: + type: integer + result: + type: array + items: + type: object + properties: + id: + type: string + description: A saved object identifier. + type: + type: string + description: The saved object type. + /api/data_views/swap_references/_preview: + post: + summary: Preview a saved object reference swap + operationId: previewSwapDataViewsDefault + description: > + Preview the impact of swapping saved object references from one data + view identifier to another. + tags: + - data views + parameters: + - $ref: '#/components/parameters/Data_views_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/Data_views_swap_data_view_request_object' + examples: + previewSwapDataViewRequest: + $ref: >- + #/components/examples/Data_views_preview_swap_data_view_request + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + result: + type: array + items: + type: object + properties: + id: + type: string + description: A saved object identifier. + type: + type: string + description: The saved object type. + /api/ml/saved_objects/sync: + get: + summary: Sync saved objects in the default space + description: > + Synchronizes Kibana saved objects for machine learning jobs and trained + models in the default space. You must have `all` privileges for the + **Machine Learning** feature in the **Analytics** section of the Kibana + feature privileges. This API runs automatically when you start Kibana + and periodically thereafter. + operationId: mlSync + tags: + - ml + parameters: + - $ref: '#/components/parameters/Machine_learning_APIs_simulateParam' + responses: + '200': + description: Indicates a successful call + content: + application/json: + schema: + $ref: '#/components/schemas/Machine_learning_APIs_mlSync200Response' + examples: + syncExample: + $ref: '#/components/examples/Machine_learning_APIs_mlSyncExample' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/Machine_learning_APIs_mlSync4xxResponse' + /api/encrypted_saved_objects/_rotate_key: + post: + summary: Rotate a key for encrypted saved objects + operationId: rotateEncryptionKey + description: > + Superuser role required. + + + If a saved object cannot be decrypted using the primary encryption key, + then Kibana will attempt to decrypt it using the specified + decryption-only keys. In most of the cases this overhead is negligible, + but if you're dealing with a large number of saved objects and + experiencing performance issues, you may want to rotate the encryption + key. + + + This functionality is in technical preview and may be changed or removed + in a future release. Elastic will work to fix any issues, but features + in technical preview are not subject to the support SLA of official GA + features. + tags: + - saved objects + parameters: + - in: query + name: batch_size + schema: + type: number + default: 10000 + required: false + description: > + Specifies a maximum number of saved objects that Kibana can process + in a single batch. Bulk key rotation is an iterative process since + Kibana may not be able to fetch and process all required saved + objects in one go and splits processing into consequent batches. By + default, the batch size is 10000, which is also a maximum allowed + value. + - in: query + name: type + schema: + type: string + required: false + description: > + Limits encryption key rotation only to the saved objects with the + specified type. By default, Kibana tries to rotate the encryption + key for all saved object types that may contain encrypted + attributes. + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + total: + type: number + description: > + Indicates the total number of all encrypted saved objects + (optionally filtered by the requested `type`), regardless + of the key Kibana used for encryption. + successful: + type: number + description: > + Indicates the total number of all encrypted saved objects + (optionally filtered by the requested `type`), regardless + of the key Kibana used for encryption. + + + NOTE: In most cases, `total` will be greater than + `successful` even if `failed` is zero. The reason is that + Kibana may not need or may not be able to rotate + encryption keys for all encrypted saved objects. + failed: + type: number + description: > + Indicates the number of the saved objects that were still + encrypted with one of the old encryption keys that Kibana + failed to re-encrypt with the primary key. + examples: + rotateEncryptionKeyResponse: + $ref: '#/components/examples/Saved_objects_key_rotation_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + '429': + description: Already in progress. + content: + application/json: + schema: + type: object + /api/saved_objects/_bulk_create: + post: + summary: Create saved objects + operationId: bulkCreateSavedObjects + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - in: query + name: overwrite + description: When true, overwrites the document with the same identifier. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_bulk_delete: + post: + summary: Delete saved objects + operationId: bulkDeleteSavedObjects + description: | + WARNING: When you delete a saved object, it cannot be recovered. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - in: query + name: force + description: > + When true, force delete objects that exist in multiple namespaces. + Note that the option applies to the whole request. Use the delete + object API to specify per-object deletion behavior. TIP: Use this if + you attempted to delete objects and received an HTTP 400 error with + the following message: "Unable to delete saved object that exists in + multiple namespaces, use the force option to delete it anyway". + WARNING: When you bulk delete objects that exist in multiple + namespaces, the API also deletes legacy url aliases that reference + the object. These requests are batched to minimise the impact but + they can place a heavy load on Kibana. Make sure you limit the + number of objects that exist in multiple namespaces in a single bulk + delete operation. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + responses: + '200': + description: > + Indicates a successful call. NOTE: This HTTP response code indicates + that the bulk operation succeeded. Errors pertaining to individual + objects will be returned in the response body. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_bulk_get: + post: + summary: Get saved objects + operationId: bulkGetSavedObjects + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_bulk_resolve: + post: + summary: Resolve saved objects + operationId: bulkResolveSavedObjects + deprecated: true + description: > + Retrieve multiple Kibana saved objects by identifier using any legacy + URL aliases if they exist. Under certain circumstances when Kibana is + upgraded, saved object migrations may necessitate regenerating some + object IDs to enable new features. When an object's ID is regenerated, a + legacy URL alias is created for that object, preserving its old ID. In + such a scenario, that object can be retrieved by the bulk resolve API + using either its new ID or its old ID. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + responses: + '200': + description: > + Indicates a successful call. NOTE: This HTTP response code indicates + that the bulk operation succeeded. Errors pertaining to individual + objects will be returned in the response body. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_bulk_update: + post: + summary: Update saved objects + operationId: bulkUpdateSavedObjects + description: Update the attributes for multiple Kibana saved objects. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: array + items: + type: object + responses: + '200': + description: > + Indicates a successful call. NOTE: This HTTP response code indicates + that the bulk operation succeeded. Errors pertaining to individual + objects will be returned in the response body. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_export: + post: + summary: Export saved objects + operationId: exportSavedObjectsDefault + description: > + Retrieve sets of saved objects that you want to import into Kibana. + + You must include `type` or `objects` in the request body. + + + Exported saved objects are not backwards compatible and cannot be + imported into an older version of Kibana. + + + NOTE: The `savedObjects.maxImportExportSize` configuration setting + limits the number of saved objects which may be exported. + + + This functionality is in technical preview and may be changed or removed + in a future release. Elastic will work to fix any issues, but features + in technical preview are not subject to the support SLA of official GA + features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + requestBody: + required: true + content: + application/json: + schema: + type: object + properties: + excludeExportDetails: + description: Do not add export details entry at the end of the stream. + type: boolean + default: false + includeReferencesDeep: + description: >- + Includes all of the referenced objects in the exported + objects. + type: boolean + objects: + description: A list of objects to export. + type: array + items: + type: object + type: + description: >- + The saved object types to include in the export. Use `*` to + export all the types. + oneOf: + - type: string + - type: array + items: + type: string + examples: + exportSavedObjectsRequest: + $ref: '#/components/examples/Saved_objects_export_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/x-ndjson: + schema: + type: object + additionalProperties: true + examples: + exportSavedObjectsResponse: + $ref: '#/components/examples/Saved_objects_export_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_find: + get: + summary: Search for saved objects + operationId: findSavedObjects + description: Retrieve a paginated set of Kibana saved objects. + deprecated: true + tags: + - saved objects + parameters: + - in: query + name: aggs + description: > + An aggregation structure, serialized as a string. The field format + is similar to filter, meaning that to use a saved object type + attribute in the aggregation, the `savedObjectType.attributes.title: + "myTitle"` format must be used. For root fields, the syntax is + `savedObjectType.rootField`. NOTE: As objects 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. + schema: + type: string + - in: query + name: default_search_operator + description: The default operator to use for the `simple_query_string`. + schema: + type: string + - in: query + name: fields + description: The fields to return in the attributes key of the response. + schema: + oneOf: + - type: string + - type: array + - in: query + name: filter + description: > + The filter is a KQL string with the caveat that if you filter with + an attribute from your saved object type, it should look like that: + `savedObjectType.attributes.title: "myTitle"`. However, if you use a + root attribute of a saved object such as `updated_at`, you will have + to define your filter like that: `savedObjectType.updated_at > + 2018-12-22`. + schema: + type: string + - in: query + name: has_no_reference + description: >- + Filters to objects that do not have a relationship with the type and + identifier combination. + schema: + type: object + - in: query + name: has_no_reference_operator + description: >- + The operator to use for the `has_no_reference` parameter. Either + `OR` or `AND`. Defaults to `OR`. + schema: + type: string + - in: query + name: has_reference + description: >- + Filters to objects that have a relationship with the type and ID + combination. + schema: + type: object + - in: query + name: has_reference_operator + description: >- + The operator to use for the `has_reference` parameter. Either `OR` + or `AND`. Defaults to `OR`. + schema: + type: string + - in: query + name: page + description: The page of objects to return. + schema: + type: integer + - in: query + name: per_page + description: The number of objects to return per page. + schema: + type: integer + - in: query + name: search + description: >- + An Elasticsearch `simple_query_string` query that filters the + objects in the response. + schema: + type: string + - in: query + name: search_fields + description: >- + The fields to perform the `simple_query_string` parsed query + against. + schema: + oneOf: + - type: string + - type: array + - in: query + name: sort_field + description: > + Sorts the response. Includes "root" and "type" fields. "root" fields + exist for all saved objects, such as "updated_at". "type" fields are + specific to an object type, such as fields returned in the + attributes key of the response. When a single type is defined in the + type parameter, the "root" and "type" fields are allowed, and + validity checks are made in that order. When multiple types are + defined in the type parameter, only "root" fields are allowed. + schema: + type: string + - in: query + name: type + description: The saved object types to include. + required: true + schema: + oneOf: + - type: string + - type: array + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_import: + post: + summary: Import saved objects + operationId: importSavedObjectsDefault + description: > + Create sets of Kibana saved objects from a file created by the export + API. + + Saved objects can be imported only into the same version, a newer minor + on the same major, or the next major. Exported saved objects are not + backwards compatible and cannot be imported into an older version of + Kibana. + + + This functionality is in technical preview and may be changed or removed + in a future release. Elastic will work to fix any issues, but features + in technical preview are not subject to the support SLA of official GA + features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - in: query + name: createNewCopies + schema: + type: boolean + required: false + description: > + Creates copies of saved objects, regenerates each object ID, and + resets the origin. When used, potential conflict errors are avoided. + NOTE: This option cannot be used with the `overwrite` and + `compatibilityMode` options. + - in: query + name: overwrite + schema: + type: boolean + required: false + description: > + Overwrites saved objects when they already exist. When used, + potential conflict errors are automatically resolved by overwriting + the destination object. NOTE: This option cannot be used with the + `createNewCopies` option. + - in: query + name: compatibilityMode + schema: + type: boolean + required: false + description: > + Applies various adjustments to the saved objects that are being + imported to maintain compatibility between different Kibana + versions. Use this option only if you encounter issues with imported + saved objects. NOTE: This option cannot be used with the + `createNewCopies` option. + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + properties: + file: + description: > + A file exported using the export API. NOTE: The + `savedObjects.maxImportExportSize` configuration setting + limits the number of saved objects which may be included in + this file. Similarly, the + `savedObjects.maxImportPayloadBytes` setting limits the + overall size of the file that can be imported. + examples: + importObjectsRequest: + $ref: '#/components/examples/Saved_objects_import_objects_request' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + description: > + Indicates when the import was successfully completed. When + set to false, some objects may not have been created. For + additional information, refer to the `errors` and + `successResults` properties. + successCount: + type: integer + description: Indicates the number of successfully imported records. + errors: + type: array + items: + type: object + description: > + Indicates the import was unsuccessful and specifies the + objects that failed to import. + + + NOTE: One object may result in multiple errors, which + requires separate steps to resolve. For instance, a + `missing_references` error and conflict error. + successResults: + type: array + items: + type: object + description: > + Indicates the objects that are successfully imported, with + any metadata if applicable. + + + NOTE: Objects are created only when all resolvable errors + are addressed, including conflicts and missing references. + If objects are created as new copies, each entry in the + `successResults` array includes a `destinationId` + attribute. + examples: + importObjectsResponse: + $ref: '#/components/examples/Saved_objects_import_objects_response' + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/_resolve_import_errors: + post: + summary: Resolve import errors + operationId: resolveImportErrors + description: > + To resolve errors from the Import objects API, you can: + + + * Retry certain saved objects + + * Overwrite specific saved objects + + * Change references to different saved objects + + + This functionality is in technical preview and may be changed or removed + in a future release. Elastic will work to fix any issues, but features + in technical preview are not subject to the support SLA of official GA + features. + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - in: query + name: compatibilityMode + schema: + type: boolean + required: false + description: > + Applies various adjustments to the saved objects that are being + imported to maintain compatibility between different Kibana + versions. When enabled during the initial import, also enable when + resolving import errors. This option cannot be used with the + `createNewCopies` option. + - in: query + name: createNewCopies + schema: + type: boolean + required: false + description: > + Creates copies of the saved objects, regenerates each object ID, and + resets the origin. When enabled during the initial import, also + enable when resolving import errors. + requestBody: + required: true + content: + multipart/form-data: + schema: + type: object + required: + - retries + properties: + file: + description: The same file given to the import API. + type: string + format: binary + retries: + description: >- + The retry operations, which can specify how to resolve + different types of errors. + type: array + items: + type: object + required: + - type + - id + properties: + type: + description: The saved object type. + type: string + id: + description: The saved object ID. + type: string + overwrite: + description: >- + When set to `true`, the source object overwrites the + conflicting destination object. When set to `false`, + does nothing. + type: boolean + destinationId: + description: >- + Specifies the destination ID that the imported object + should have, if different from the current ID. + type: string + replaceReferences: + description: >- + A list of `type`, `from`, and `to` used to change the + object references. + type: array + items: + type: object + properties: + type: + type: string + from: + type: string + to: + type: string + ignoreMissingReferences: + description: >- + When set to `true`, ignores missing reference errors. + When set to `false`, does nothing. + type: boolean + examples: + resolveImportErrorsRequest: + $ref: >- + #/components/examples/Saved_objects_resolve_missing_reference_request + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + properties: + success: + type: boolean + description: > + Indicates a successful import. When set to `false`, some + objects may not have been created. For additional + information, refer to the `errors` and `successResults` + properties. + successCount: + type: number + description: | + Indicates the number of successfully resolved records. + errors: + type: array + description: > + Specifies the objects that failed to resolve. + + + NOTE: One object can result in multiple errors, which + requires separate steps to resolve. For instance, a + `missing_references` error and a `conflict` error. + items: + type: object + successResults: + type: array + description: > + Indicates the objects that are successfully imported, with + any metadata if applicable. + + + NOTE: Objects are only created when all resolvable errors + are addressed, including conflict and missing references. + items: + type: object + examples: + resolveImportErrorsResponse: + $ref: >- + #/components/examples/Saved_objects_resolve_missing_reference_response + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /api/saved_objects/{type}: + post: + summary: Create a saved object + operationId: createSavedObject + description: Create a Kibana saved object with a randomly generated identifier. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - in: query + name: overwrite + description: If true, overwrites the document with the same identifier. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - attributes + properties: + attributes: + $ref: '#/components/schemas/Saved_objects_attributes' + initialNamespaces: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + references: + $ref: '#/components/schemas/Saved_objects_references' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '409': + description: Indicates a conflict error. + content: + application/json: + schema: + type: object + /api/saved_objects/{type}/{id}: + get: + summary: Get a saved object + operationId: getSavedObject + description: Retrieve a single Kibana saved object by identifier. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + post: + summary: Create a saved object + operationId: createSavedObjectId + description: >- + Create a Kibana saved object and specify its identifier instead of using + a randomly generated ID. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + - in: query + name: overwrite + description: If true, overwrites the document with the same identifier. + schema: + type: boolean + requestBody: + required: true + content: + application/json: + schema: + type: object + required: + - attributes + properties: + attributes: + $ref: '#/components/schemas/Saved_objects_attributes' + initialNamespaces: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + references: + $ref: '#/components/schemas/Saved_objects_initial_namespaces' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '409': + description: Indicates a conflict error. + content: + application/json: + schema: + type: object + put: + summary: Update a saved object + operationId: updateSavedObject + description: Update the attributes for Kibana saved objects. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_kbn_xsrf' + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + requestBody: + required: true + content: + application/json: + schema: + type: object + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '404': + description: Indicates the object was not found. + content: + application/json: + schema: + type: object + '409': + description: Indicates a conflict error. + content: + application/json: + schema: + type: object + /api/saved_objects/resolve/{type}/{id}: + get: + summary: Resolve a saved object + operationId: resolveSavedObject + description: > + Retrieve a single Kibana saved object by identifier using any legacy URL + alias if it exists. Under certain circumstances, when Kibana is + upgraded, saved object migrations may necessitate regenerating some + object IDs to enable new features. When an object's ID is regenerated, a + legacy URL alias is created for that object, preserving its old ID. In + such a scenario, that object can be retrieved using either its new ID or + its old ID. + deprecated: true + tags: + - saved objects + parameters: + - $ref: '#/components/parameters/Saved_objects_saved_object_id' + - $ref: '#/components/parameters/Saved_objects_saved_object_type' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + type: object + '400': + description: Bad request. + content: + application/json: + schema: + $ref: '#/components/schemas/Saved_objects_400_response' + /s/{spaceId}/api/observability/slos: + post: + summary: Create an SLO + operationId: createSloOp + description: > + You must have `all` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_create_slo_request' + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_create_slo_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '409': + description: Conflict - The SLO id already exists + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_409_response' + servers: + - url: https://localhost:5601 + get: + summary: Get a paginated list of SLOs + operationId: findSlosOp + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - name: kqlQuery + in: query + description: A valid kql query to filter the SLO with + schema: + type: string + example: 'slo.name:latency* and slo.tags : "prod"' + - name: page + in: query + description: The page to use for pagination, must be greater or equal than 1 + schema: + type: integer + default: 1 + example: 1 + - name: perPage + in: query + description: Number of SLOs returned by page + schema: + type: integer + default: 25 + maximum: 5000 + example: 25 + - name: sortBy + in: query + description: Sort by field + schema: + type: string + enum: + - sli_value + - status + - error_budget_consumed + - error_budget_remaining + default: status + example: status + - name: sortDirection + in: query + description: Sort order + schema: + type: string + enum: + - asc + - desc + default: asc + example: asc + - name: hideStale + in: query + description: >- + Hide stale SLOs from the list as defined by stale SLO threshold in + SLO settings + schema: + type: boolean + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_find_slo_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + /s/{spaceId}/api/observability/slos/{sloId}: + get: + summary: Get an SLO + operationId: getSloOp + description: > + You must have the `read` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + - name: instanceId + in: query + description: the specific instanceId used by the summary calculation + schema: + type: string + example: host-abcde + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_slo_with_summary_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + put: + summary: Update an SLO + operationId: updateSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_update_slo_request' + responses: + '200': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_slo_definition_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + delete: + summary: Delete an SLO + operationId: deleteSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + responses: + '204': + description: Successful request + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + /s/{spaceId}/api/observability/slos/{sloId}/enable: + post: + summary: Enable an SLO + operationId: enableSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + responses: + '204': + description: Successful request + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + /s/{spaceId}/api/observability/slos/{sloId}/disable: + post: + summary: Disable an SLO + operationId: disableSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + responses: + '200': + description: Successful request + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + /s/{spaceId}/api/observability/slos/{sloId}/_reset: + post: + summary: Reset an SLO + operationId: resetSloOp + description: > + You must have the `write` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + - $ref: '#/components/parameters/SLOs_slo_id' + responses: + '204': + description: Successful request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_slo_definition_response' + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + '404': + description: Not found response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_404_response' + /s/{spaceId}/api/observability/slos/_delete_instances: + post: + summary: Batch delete rollup and summary data + operationId: deleteSloInstancesOp + description: > + The deletion occurs for the specified list of `sloId` and `instanceId`. + You must have `all` privileges for the **SLOs** feature in the + **Observability** section of the Kibana feature privileges. + tags: + - slo + parameters: + - $ref: '#/components/parameters/SLOs_kbn_xsrf' + - $ref: '#/components/parameters/SLOs_space_id' + requestBody: + required: true + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_delete_slo_instances_request' + responses: + '204': + description: Successful request + '400': + description: Bad request + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_400_response' + '401': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_401_response' + '403': + description: Unauthorized response + content: + application/json: + schema: + $ref: '#/components/schemas/SLOs_403_response' + servers: + - url: https://localhost:5601 + /api/status: + get: + operationId: /api/status#0 + parameters: + - description: The version of the API to use + in: header + name: elastic-api-version + schema: + default: '2023-10-31' + enum: + - '2023-10-31' + type: string + - description: Set to "true" to get the response in v7 format. + in: query + name: v7format + required: false + schema: + type: boolean + - description: Set to "true" to get the response in v8 format. + in: query + name: v8format + required: false + schema: + type: boolean + responses: + '200': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_core_status_response' + - $ref: >- + #/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse + description: >- + Kibana's operational status. A minimal response is sent for + unauthorized users. + description: Overall status is OK and Kibana should be functioning normally. + '503': + content: + application/json; Elastic-Api-Version=2023-10-31: + schema: + anyOf: + - $ref: '#/components/schemas/Kibana_HTTP_APIs_core_status_response' + - $ref: >- + #/components/schemas/Kibana_HTTP_APIs_core_status_redactedResponse + description: >- + Kibana's operational status. A minimal response is sent for + unauthorized users. + description: >- + Kibana or some of it's essential services are unavailable. Kibana + may be degraded or unavailable. + summary: Get Kibana's current status + tags: + - system + security: + - Kibana_HTTP_APIs_basicAuth: [] +components: + parameters: + Alerting_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + Alerting_rule_id: + in: path + name: ruleId + description: An identifier for the rule. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + Alerting_alert_id: + in: path + name: alertId + description: >- + An identifier for the alert. The identifier is generated by the rule and + might be any arbitrary string. + required: true + schema: + type: string + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + Cases_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + Cases_ids: + name: ids + description: > + The cases that you want to removed. All non-ASCII characters must be URL + encoded. + in: query + required: true + schema: + type: array + items: + type: string + minItems: 1 + maxItems: 100 + example: d4e7abb0-b462-11ec-9a8d-698504725a43 + Cases_assignees: + in: query + name: assignees + description: > + Filters the returned cases by assignees. Valid values are `none` or + unique identifiers for the user profiles. These identifiers can be found + by using the suggest user profile API. + schema: + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 100 + Cases_category: + in: query + name: category + description: Filters the returned cases by category. + schema: + oneOf: + - type: string + example: my-category + - type: array + items: + type: string + maxItems: 100 + Cases_defaultSearchOperator: + in: query + name: defaultSearchOperator + description: he default operator to use for the simple_query_string. + schema: + type: string + default: OR + example: OR + Cases_from: + in: query + name: from + description: > + Returns only cases that were created after a specific date. The date + must be specified as a KQL data range or date match expression. + schema: + type: string + example: now-1d + Cases_owner: + in: query + name: owner + description: > + A filter to limit the response to a specific set of applications. If + this parameter is omitted, the response contains information about all + the cases that the user has access to read. + schema: + oneOf: + - $ref: '#/components/schemas/Cases_owners' + - type: array + items: + $ref: '#/components/schemas/Cases_owners' + example: cases + Cases_page_index: + in: query + name: page + description: The page number to return. + required: false + schema: + type: integer + default: 1 + Cases_page_size: + in: query + name: perPage + description: The number of items to return. Limited to 100 items. + required: false + schema: + type: integer + default: 20 + maximum: 100 + Cases_reporters: + in: query + name: reporters + description: Filters the returned cases by the user name of the reporter. + schema: + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 100 + example: elastic + Cases_search: + in: query + name: search + description: >- + An Elasticsearch simple_query_string query that filters the objects in + the response. + schema: + type: string + Cases_searchFields: + in: query + name: searchFields + description: The fields to perform the simple_query_string parsed query against. + schema: + oneOf: + - $ref: '#/components/schemas/Cases_searchFieldsType' + - type: array + items: + $ref: '#/components/schemas/Cases_searchFieldsType' + Cases_severity: + in: query + name: severity + description: The severity of the case. + schema: + type: string + enum: + - critical + - high + - low + - medium + Cases_sortField: + in: query + name: sortField + description: Determines which field is used to sort the results. + schema: + type: string + enum: + - createdAt + - updatedAt + - closedAt + - title + - category + - status + - severity + default: createdAt + example: updatedAt + Cases_sort_order: + in: query + name: sortOrder + description: Determines the sort order. + required: false + schema: + type: string + enum: + - asc + - desc + default: desc + Cases_status: + in: query + name: status + description: Filters the returned cases by state. + schema: + type: string + enum: + - closed + - in-progress + - open + example: open + Cases_tags: + in: query + name: tags + description: Filters the returned cases by tags. + schema: + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 100 + example: tag-1 + Cases_to: + in: query + name: to + description: > + Returns only cases that were created before a specific date. The date + must be specified as a KQL data range or date match expression. + schema: + type: string + example: now+1d + Cases_alert_id: + in: path + name: alertId + description: An identifier for the alert. + required: true + schema: + type: string + example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 + Cases_configuration_id: + in: path + name: configurationId + description: An identifier for the configuration. + required: true + schema: + type: string + example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 + Cases_case_id: + in: path + name: caseId + description: >- + The identifier for the case. To retrieve case IDs, use the find cases + API. All non-ASCII characters must be URL encoded. + required: true + schema: + type: string + example: 9c235210-6834-11ea-a78c-6ffb38a34414 + Cases_includeComments: + in: query + name: includeComments + description: >- + Deprecated in 8.1.0. This parameter is deprecated and will be removed in + a future release. It determines whether case comments are returned. + deprecated: true + schema: + type: boolean + default: true + Cases_comment_id: + in: path + name: commentId + description: > + The identifier for the comment. To retrieve comment IDs, use the get + case or find cases APIs. + required: true + schema: + type: string + example: 71ec1870-725b-11ea-a0b2-c51ea50a58e2 + Cases_connector_id: + in: path + name: connectorId + description: >- + An identifier for the connector. To retrieve connector IDs, use the find + connectors API. + required: true + schema: + type: string + example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 + Cases_user_action_types: + in: query + name: types + description: Determines the types of user actions to return. + schema: + type: array + items: + type: string + enum: + - action + - alert + - assignees + - attachment + - comment + - connector + - create_case + - description + - pushed + - settings + - severity + - status + - tags + - title + - user + example: create_case + Connectors_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + Connectors_connector_id: + in: path + name: connectorId + description: An identifier for the connector. + required: true + schema: + type: string + example: df770e30-8b8b-11ed-a780-3b746c987a81 + Connectors_action_id: + in: path + name: actionId + description: An identifier for the action. + required: true + schema: + type: string + example: c55b6eb0-6bad-11eb-9f3b-611eebc6c3ad + Data_views_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + Data_views_view_id: + in: path + name: viewId + description: An identifier for the data view. + required: true + schema: + type: string + example: ff959d40-b880-11e8-a6d9-e546fe2bba5f + Data_views_field_name: + in: path + name: fieldName + description: The name of the runtime field. + required: true + schema: + type: string + example: hour_of_day + Machine_learning_APIs_simulateParam: + in: query + name: simulate + description: >- + When true, simulates the synchronization by returning only the list of + actions that would be performed. + required: false + schema: + type: boolean + example: 'true' + Saved_objects_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + Saved_objects_saved_object_type: + in: path + name: type + description: >- + Valid options include `visualization`, `dashboard`, `search`, + `index-pattern`, `config`. + required: true + schema: + type: string + Saved_objects_saved_object_id: + in: path + name: id + description: An identifier for the saved object. + required: true + schema: + type: string + SLOs_kbn_xsrf: + schema: + type: string + in: header + name: kbn-xsrf + description: Cross-site request forgery protection + required: true + SLOs_space_id: + in: path + name: spaceId + description: >- + An identifier for the space. If `/s/` and the identifier are omitted + from the path, the default space is used. + required: true + schema: + type: string + example: default + SLOs_slo_id: + in: path + name: sloId + description: An identifier for the slo. + required: true + schema: + type: string + example: 9c235211-6834-11ea-a78c-6feb38a34414 + schemas: + Alerting_create_anomaly_detection_alert_rule_request: + title: Create anomaly detection rule request + description: > + A rule that checks if the anomaly detection job results contain + anomalies that match the rule conditions. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an anomaly detection rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.ml.anomaly_detection_alert + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_anomaly_detection_jobs_health_rule_request: + title: Create anomaly detection jobs health rule request + description: > + An rule that monitors job health and alerts if an operational issue + occurred that may prevent the job from detecting anomalies. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an anomaly detection jobs health rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.ml.anomaly_detection_jobs_health + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_apm_anomaly_rule_request: + title: Create APM anomaly rule rule request + description: >- + A rule that detects when either the latency, throughput, or failed + transaction rate of a service is anomalous. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_apm_anomaly' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - apm.anomaly + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_apm_error_count_rule_request: + title: Create APM error count rule request + description: >- + A rule that detects when the number of errors in a service exceeds a + defined threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_apm_error_count' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - apm.error_rate + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_apm_transaction_duration_rule_request: + title: Create latency threshold rule request + description: >- + A rule that detects when the latency of a specific transaction type in a + service exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: >- + #/components/schemas/Alerting_params_property_apm_transaction_duration + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - apm.transaction_duration + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_apm_transaction_error_rate_rule_request: + title: Create APM transaction error rate rule request + description: >- + A rule that sends notifications when the rate of transaction errors in a + service exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: >- + #/components/schemas/Alerting_params_property_apm_transaction_error_rate + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - apm.transaction_error_rate + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_es_query_rule_request: + title: Create Elasticsearch query rule request + description: > + A rule that runs a user-configured query, compares the number of matches + to a configured threshold, and schedules actions to run when the + threshold condition is met. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_es_query_rule' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - .es-query + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_geo_containment_rule_request: + title: Create tracking containment rule request + description: > + A rule that runs an Elasticsearch query over indices to determine + whether any documents are currently contained within any boundaries from + the specified boundary index. In the event that an entity is contained + within a boundary, an alert may be generated. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an tracking containment rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - .geo-containment + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_index_threshold_rule_request: + title: Create index threshold rule request + description: >- + A rule that runs an Elasticsearch query, aggregates field values from + documents, compares them to threshold values, and schedules actions to + run when the thresholds are met. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_index_threshold_rule' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - .index-threshold + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_infra_inventory_rule_request: + title: Create infra inventory rule request + description: > + A rule that sends notifications when a metric has reached or exceeded a + value for a specific resource or a group of resources within your + infrastructure. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_infra_inventory' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - metrics.alert.inventory.threshold + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_infra_metric_anomaly_rule_request: + title: Create infrastructure anomaly rule request + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an infrastructure anomaly rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - metrics.alert.anomaly + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_infra_metric_threshold_rule_request: + title: Create infra metric threshold rule request + description: > + A rule that sends notifications when a metric has reached or exceeded a + value for a specific time period. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_infra_metric_threshold' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - metrics.alert.threshold + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_jvm_memory_usage_rule_request: + title: Create JVM memory usage rule request + description: A rule that detects when a node reports high memory usage. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a JVM memory usage rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_jvm_memory_usage + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_log_threshold_rule_request: + title: Create log threshold rule request + description: A rule that detects when a log aggregation exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_log_threshold' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - logs.alert.document.count + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_ccr_exceptions_rule_request: + title: Create CCR read exceptions rule request + description: A rule that detects cross-cluster replication (CCR) read exceptions. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a CCR read exceptions rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_ccr_read_exceptions + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_cluster_health_rule_request: + title: Create cluster health rule request + description: A rule that detects when the health of the cluster changes. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a cluster health rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_cluster_health + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_cpu_usage_rule_request: + title: Create CPU usage rule request + description: A rule that detects when the CPU load for a node is consistently high. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a CPU usage rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_cpu_usage + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_disk_usage_rule_request: + title: Create disk usage rule request + description: A rule that detects when the disk usage for a node is consistently high. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a disk usage rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_disk_usage + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_elasticsearch_version_mismatch_rule_request: + title: Create Elasticsearch version mismatch rule request + description: >- + A rule that detects when the cluster has multipe versions of + Elasticsearch. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a Elasticsearch version mismatch rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_elasticsearch_version_mismatch + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_license_expiration_rule_request: + title: Create license expiration rule request + description: A rule that detects when the cluster license is about to expire. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a license expiration rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_license_expiration + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_kibana_version_mismatch_rule_request: + title: Create Kibana version mismatch rule request + description: A rule that detects when the cluster has multiple versions of Kibana. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a Kibana version mismatch rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_kibana_version_mismatch + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_logstash_version_mismatch_rule_request: + title: Create Logstash version mismatch rule request + description: A rule that detects when the cluster has multiple versions of Logstash. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a Logstash version mismatch rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_logstash_version_mismatch + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_missing_data_rule_request: + title: Create missing monitoring data rule request + description: A rule that detects when monitoring data is missing. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a missing monitoring data rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_missing_monitoring_data + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_nodes_changed_rule_request: + title: Create nodes changed rule request + description: A rule that detects when nodes are added, removed, or restarted. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a nodes changed rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_nodes_changed + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_shard_size_rule_request: + title: Create shard size rule request + description: >- + A rule that detects when the average shard size is larger than a + threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a shard size rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_shard_size + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_thread_pool_search_rejections_rule_request: + title: Create thread pool search rejections rule request + description: >- + A rule that detects when the number of rejections in the thread pool + exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a thread pool search rejections rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_thread_pool_search_rejections + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_monitoring_thread_pool_write_rejections_rule_request: + title: Create thread pool write rejections rule request + description: >- + A rule that detects when the number of rejections in the write thread + pool exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a thread pool write rejections rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - monitoring_alert_thread_pool_write_rejections + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_eql_rule_request: + title: Create event correlation rule request + description: > + A rule that uses Event Query Language (EQL) to match events, generate + sequences, and stack data. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an event correlation rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.eqlRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_indicator_rule_request: + title: Create indicator match rule request + description: > + A rule that uses indicators from intelligence sources to detect matching + events and alerts. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for an indicator match rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.indicatorRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_ml_rule_request: + title: Create machine learning rule request + description: > + A rule that detects when a machine learning job discovers an anomaly + above the defined threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a machine learning rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.mlRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_new_terms_rule_request: + title: Create new terms rule request + description: A rule that finds documents with values that appear for the first time. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a new terms rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.newTermsRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_notifications_rule_request: + title: Create security solution notification (legacy) rule request + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a notification rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.notifications + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_query_rule_request: + title: Create custom query rule request + description: | + A rule that uses KQL or Lucene to detect issues across indices. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a custom query rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.queryRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_saved_query_rule_request: + title: Create saved query rule request + description: > + A rule that searches the defined indices and creates an alert when a + document matches the saved search. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a saved query rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.savedQueryRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_siem_threshold_rule_request: + title: Create threshold rule request + description: > + A rule that aggregates query results to detect when the number of + matches exceeds a threshold. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a threshold rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - siem.thresholdRule + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_slo_burn_rate_rule_request: + title: Create slo burn rate rule request + description: > + A rule that detects when the burn rate is above a defined threshold for + two different lookback periods. The two periods are a long period and a + short period that is 1/12th of the long period. For each lookback + period, the burn rate is computed as the error rate divided by the error + budget. When the burn rates for both periods surpass the threshold, an + alert occurs. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_slo_burn_rate' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - slo.rules.burnRate + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_synthetics_monitor_status_rule_request: + title: Create synthetics monitor status rule request + description: >- + A rule that detects when a monitor is down or an availability threshold + is breached. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for the synthetics monitor status rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.synthetics.alerts.monitorStatus + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_synthetics_uptime_duration_anomaly_rule_request: + title: Create synthetics uptime duration anomaly rule request + description: > + A rule that detects response durations for all of the geographic + locations of each monitor. When a monitor runs for an unusual amount of + time, at a particular time, an anomaly is recorded. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for the uptime duration anomaly rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.uptime.alerts.durationAnomaly + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_synthetics_uptime_tls_rule_request: + title: Create synthetics uptime TLS rule request + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: '#/components/schemas/Alerting_params_property_synthetics_uptime_tls' + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.uptime.alerts.tls + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_synthetics_uptime_tls_certificate_rule_request: + title: Create TLS certificate rule request + description: > + A rule that detects when a monitor has a TLS certificate expiring or + when it exceeds an age limit. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a TLS certificate rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.uptime.alerts.tlsCertificate + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_transform_health_rule_request: + title: Create transform health rule request + description: > + A rule that monitors transforms health and alerts if an operational + issue occurred. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for a transform health rule. + additionalProperties: true + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - transform_health + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_create_uptime_monitor_status_rule_request: + title: Create uptime monitor status rule request + description: A rule that detects monitor errors and outages. + type: object + required: + - consumer + - name + - params + - rule_type_id + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + consumer: + $ref: '#/components/schemas/Alerting_consumer' + enabled: + $ref: '#/components/schemas/Alerting_enabled_rule' + name: + $ref: '#/components/schemas/Alerting_name_rule' + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + $ref: >- + #/components/schemas/Alerting_params_property_synthetics_monitor_status + rule_type_id: + type: string + description: >- + The ID of the rule type that you want to call when the rule is + scheduled to run. + enum: + - xpack.uptime.alerts.monitorStatus + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_filter: + type: object + description: >- + A filter written in Elasticsearch Query Domain Specific Language (DSL) + as defined in the `kbn-es-query` package. + properties: + meta: + type: object + properties: + alias: + type: string + nullable: true + controlledBy: + type: string + disabled: + type: boolean + field: + type: string + group: + type: string + index: + type: string + isMultiIndex: + type: boolean + key: + type: string + negate: + type: boolean + params: + type: object + type: + type: string + value: + type: string + query: + type: object + $state: + type: object + Alerting_notify_when_action: + type: string + description: > + Indicates how often alerts generate actions. Valid values include: + `onActionGroupChange`: Actions run when the alert status changes; + `onActiveAlert`: Actions run when the alert becomes active and at each + check interval while the rule conditions are met; `onThrottleInterval`: + Actions run when the alert becomes active and at the interval specified + in the throttle property while the rule conditions are met. NOTE: You + cannot specify `notify_when` 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. + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval + example: onActiveAlert + Alerting_throttle_action: + 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 + example: 10m + Alerting_actions: + type: array + default: [] + nullable: true + items: + type: object + required: + - group + - id + - params + description: | + An action that runs under defined conditions. + properties: + alerts_filter: + type: object + description: > + Conditions that affect whether the action runs. If you specify + multiple conditions, all conditions must be met for the action to + run. For example, if an alert occurs within the specified time + frame and matches the query, the action runs. + properties: + query: + type: object + description: >- + Defines a query filter that determines whether the action + runs. + properties: + kql: + type: string + description: A filter written in Kibana Query Language (KQL). + filters: + type: array + items: + $ref: '#/components/schemas/Alerting_filter' + timeframe: + type: object + description: Defines a period that limits whether the action runs. + properties: + days: + type: array + 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 + hours: + type: object + description: > + Defines the range of time in a day that the action can + run. If the `start` value is `00:00` and the `end` value + is `24:00`, actions be generated all day. + properties: + end: + type: string + description: >- + The end of the time frame in 24-hour notation + (`hh:mm`). + example: '17:00' + start: + type: string + description: >- + The start of the time frame in 24-hour notation + (`hh:mm`). + 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. + example: 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 + readOnly: true + frequency: + type: object + description: > + The properties that affect how often actions are generated. If the + rule type supports setting `summary` to `true`, the action can be + a summary of alerts at the specified notification interval. + Otherwise, an action runs for each alert at the specified + notification interval. NOTE: You cannot specify these parameters + when `notify_when` or `throttle` are defined at the rule level. + required: + - notify_when + - summary + properties: + notify_when: + $ref: '#/components/schemas/Alerting_notify_when_action' + summary: + type: boolean + description: Indicates whether the action is a summary. + throttle: + $ref: '#/components/schemas/Alerting_throttle_action' + 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`. + example: default + id: + type: string + description: The identifier for the connector saved object. + 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. + additionalProperties: true + uuid: + type: string + description: A universally unique identifier (UUID) for the action. + example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + Alerting_alert_delay: + type: object + description: >- + Indicates that an alert occurs only when the specified number of + consecutive runs met the rule conditions. + required: + - active + properties: + active: + type: number + description: The number of consecutive runs that must meet the rule conditions. + example: 3 + Alerting_consumer: + type: string + description: > + The name of the application or feature that owns the rule. For example: + `alerts`, `apm`, `discover`, `infrastructure`, `logs`, `metrics`, `ml`, + `monitoring`, `securitySolution`, `siem`, `stackAlerts`, or `uptime`. + Alerting_enabled_rule: + type: boolean + description: >- + Indicates whether you want to run the rule on an interval basis after it + is created. + Alerting_name_rule: + type: string + description: > + The name of the rule. While this name does not have to be unique, a + distinctive name can help you identify a rule. + Alerting_notify_when: + type: string + description: > + Deprecated in 8.13.0. Use the `notify_when` property in the action + `frequency` object instead. Indicates how often alerts generate actions. + NOTE: You cannot specify `notify_when` 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. + enum: + - onActionGroupChange + - onActiveAlert + - onThrottleInterval + deprecated: true + example: onActiveAlert + Alerting_schedule: + type: object + description: >- + The check interval, which specifies how frequently the rule conditions + are checked. The interval is specified in seconds, minutes, hours, or + days. + properties: + interval: + type: string + example: 1m + Alerting_tags: + type: array + description: The tags for the rule. + items: + type: string + default: [] + Alerting_throttle: + 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 + example: 10m + Alerting_params_property_apm_anomaly: + required: + - windowSize + - windowUnit + - environment + - anomalySeverityType + properties: + serviceName: + type: string + description: The service name from APM + transactionType: + type: string + description: The transaction type from APM + windowSize: + type: number + example: 6 + description: The window size + windowUnit: + type: string + description: The window size unit + enum: + - m + - h + - d + environment: + type: string + description: The environment from APM + anomalySeverityType: + type: string + description: The anomaly threshold value + enum: + - critical + - major + - minor + - warning + Alerting_params_property_apm_error_count: + required: + - windowSize + - windowUnit + - threshold + - environment + properties: + serviceName: + type: string + description: The service name from APM + windowSize: + type: number + description: The window size + example: 6 + windowUnit: + type: string + description: The window size unit + enum: + - m + - h + - d + environment: + type: string + description: The environment from APM + threshold: + type: number + description: The error count threshold value + groupBy: + type: array + default: + - service.name + - service.environment + uniqueItems: true + items: + type: string + enum: + - service.name + - service.environment + - transaction.name + - error.grouping_key + errorGroupingKey: + type: string + Alerting_params_property_apm_transaction_duration: + required: + - windowSize + - windowUnit + - threshold + - environment + - aggregationType + properties: + serviceName: + type: string + description: The service name from APM + transactionType: + type: string + description: The transaction type from APM + transactionName: + type: string + description: The transaction name from APM + windowSize: + type: number + description: The window size + example: 6 + windowUnit: + type: string + description: ç + enum: + - m + - h + - d + environment: + type: string + threshold: + type: number + description: The latency threshold value + groupBy: + type: array + default: + - service.name + - service.environment + - transaction.type + uniqueItems: true + items: + type: string + enum: + - service.name + - service.environment + - transaction.type + - transaction.name + aggregationType: + type: string + enum: + - avg + - 95th + - 99th + Alerting_params_property_apm_transaction_error_rate: + required: + - windowSize + - windowUnit + - threshold + - environment + properties: + serviceName: + type: string + description: The service name from APM + transactionType: + type: string + description: The transaction type from APM + transactionName: + type: string + description: The transaction name from APM + windowSize: + type: number + description: The window size + example: 6 + windowUnit: + type: string + description: The window size unit + enum: + - m + - h + - d + environment: + type: string + description: The environment from APM + threshold: + type: number + description: The error rate threshold value + groupBy: + type: array + default: + - service.name + - service.environment + - transaction.type + uniqueItems: true + items: + type: string + enum: + - service.name + - service.environment + - transaction.type + - transaction.name + Alerting_aggfield: + description: > + The name of the numeric field that is used in the aggregation. This + property is required when `aggType` is `avg`, `max`, `min` or `sum`. + type: string + Alerting_aggtype: + description: The type of aggregation to perform. + type: string + enum: + - avg + - count + - max + - min + - sum + default: count + Alerting_excludehitsfrompreviousrun: + description: > + Indicates whether to exclude matches from previous runs. If `true`, you + can avoid alert duplication by excluding documents that have already + been detected by the previous rule run. This option is not available + when a grouping field is specified. + type: boolean + Alerting_groupby: + description: > + Indicates whether the aggregation is applied over all documents (`all`) + or split into groups (`top`) using a grouping field (`termField`). If + grouping is used, an alert will be created for each group when it + exceeds the threshold; only the top groups (up to `termSize` number of + groups) are checked. + type: string + enum: + - all + - top + default: all + Alerting_termsize: + description: > + This property is required when `groupBy` is `top`. It specifies the + number of groups to check against the threshold and therefore limits the + number of alerts on high cardinality fields. + type: integer + Alerting_timefield: + description: The field that is used to calculate the time window. + type: string + Alerting_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. + type: integer + example: 5 + Alerting_timewindowunit: + description: | + The type of units for the time window: seconds, minutes, hours, or days. + type: string + enum: + - s + - m + - h + - d + example: m + Alerting_size: + description: > + The number of documents to pass to the configured actions when the + threshold condition is met. + type: integer + Alerting_termfield: + description: > + The names of up to four fields that are used for grouping the + aggregation. This property is required when `groupBy` is `top`. + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 4 + Alerting_threshold: + description: > + The threshold value that is used with the `thresholdComparator`. If the + `thresholdComparator` is `between` or `notBetween`, you must specify the + boundary values. + type: array + items: + type: integer + example: 4000 + Alerting_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 + enum: + - '>' + - '>=' + - < + - <= + - between + - notBetween + example: '>' + Alerting_params_es_query_rule: + oneOf: + - type: object + x-technical-preview: true + description: > + The parameters for an Elasticsearch query rule that uses ES|QL to + define the query. This functionality is in technical pre view and + may be changed or removed in a future release. Elastic will work to + fix any issues, but features in technical preview are not subject to + the support SLA of official GA features. + required: + - esqlQuery + - searchType + - size + - threshold + - thresholdComparator + - timeWindowSize + - timeWindowUnit + properties: + aggField: + $ref: '#/components/schemas/Alerting_aggfield' + aggType: + $ref: '#/components/schemas/Alerting_aggtype' + esqlQuery: + type: object + required: + - esql + properties: + esql: + description: >- + The query definition, which uses Elasticsearch Query + Language. + type: string + excludeHitsFromPreviousRun: + $ref: '#/components/schemas/Alerting_excludehitsfrompreviousrun' + groupBy: + $ref: '#/components/schemas/Alerting_groupby' + searchType: + description: >- + The type of query, in this case a query that uses Elasticsearch + Query Language (ES|QL). + type: string + enum: + - esqlQuery + example: esqlQuery + size: + type: integer + description: > + When `searchType` is `esqlQuery`, this property is required but + it does not affect the rule behavior. + example: 0 + termSize: + $ref: '#/components/schemas/Alerting_termsize' + threshold: + type: array + items: + type: integer + minimum: 0 + maximum: 0 + description: > + The threshold value that is used with the `thresholdComparator`. + When `searchType` is `esqlQuery`, this property is required and + must be set to zero. + thresholdComparator: + type: string + description: > + 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: '>' + timeField: + $ref: '#/components/schemas/Alerting_timefield' + timeWindowSize: + $ref: '#/components/schemas/Alerting_timewindowsize' + timeWindowUnit: + $ref: '#/components/schemas/Alerting_timewindowunit' + - type: object + description: >- + The parameters for an Elasticsearch query rule that uses KQL or + Lucene to define the query. + required: + - searchType + - size + - threshold + - thresholdComparator + - timeWindowSize + - timeWindowUnit + properties: + aggField: + $ref: '#/components/schemas/Alerting_aggfield' + aggType: + $ref: '#/components/schemas/Alerting_aggtype' + excludeHitsFromPreviousRun: + $ref: '#/components/schemas/Alerting_excludehitsfrompreviousrun' + groupBy: + $ref: '#/components/schemas/Alerting_groupby' + searchConfiguration: + description: >- + The query definition, which uses KQL or Lucene to fetch the + documents from Elasticsearch. + type: object + properties: + filter: + type: array + items: + $ref: '#/components/schemas/Alerting_filter' + index: + description: The indices to query. + oneOf: + - type: string + - type: array + items: + type: string + query: + type: object + properties: + language: + type: string + example: kuery + query: + type: string + searchType: + description: >- + The type of query, in this case a text-based query that uses KQL + or Lucene. + type: string + enum: + - searchSource + example: searchSource + size: + $ref: '#/components/schemas/Alerting_size' + termField: + $ref: '#/components/schemas/Alerting_termfield' + termSize: + $ref: '#/components/schemas/Alerting_termsize' + threshold: + $ref: '#/components/schemas/Alerting_threshold' + thresholdComparator: + $ref: '#/components/schemas/Alerting_thresholdcomparator' + timeField: + $ref: '#/components/schemas/Alerting_timefield' + timeWindowSize: + $ref: '#/components/schemas/Alerting_timewindowsize' + timeWindowUnit: + $ref: '#/components/schemas/Alerting_timewindowunit' + - type: object + description: >- + The parameters for an Elasticsearch query rule that uses + Elasticsearch Query DSL to define the query. + required: + - esQuery + - index + - threshold + - thresholdComparator + - timeField + - timeWindowSize + - timeWindowUnit + properties: + aggField: + $ref: '#/components/schemas/Alerting_aggfield' + aggType: + $ref: '#/components/schemas/Alerting_aggtype' + esQuery: + description: The query definition, which uses Elasticsearch Query DSL. + type: string + excludeHitsFromPreviousRun: + $ref: '#/components/schemas/Alerting_excludehitsfrompreviousrun' + groupBy: + $ref: '#/components/schemas/Alerting_groupby' + index: + description: The indices to query. + oneOf: + - type: array + items: + type: string + - type: string + searchType: + description: >- + The type of query, in this case a query that uses Elasticsearch + Query DSL. + type: string + enum: + - esQuery + default: esQuery + example: esQuery + size: + $ref: '#/components/schemas/Alerting_size' + termField: + $ref: '#/components/schemas/Alerting_termfield' + termSize: + $ref: '#/components/schemas/Alerting_termsize' + threshold: + $ref: '#/components/schemas/Alerting_threshold' + thresholdComparator: + $ref: '#/components/schemas/Alerting_thresholdcomparator' + timeField: + $ref: '#/components/schemas/Alerting_timefield' + timeWindowSize: + $ref: '#/components/schemas/Alerting_timewindowsize' + timeWindowUnit: + $ref: '#/components/schemas/Alerting_timewindowunit' + Alerting_params_index_threshold_rule: + type: object + description: The parameters for an index threshold rule. + required: + - index + - threshold + - thresholdComparator + - timeField + - timeWindowSize + - timeWindowUnit + properties: + aggField: + $ref: '#/components/schemas/Alerting_aggfield' + aggType: + $ref: '#/components/schemas/Alerting_aggtype' + filterKuery: + description: A KQL expression thats limits the scope of alerts. + type: string + groupBy: + $ref: '#/components/schemas/Alerting_groupby' + index: + description: The indices to query. + type: array + items: + type: string + termField: + $ref: '#/components/schemas/Alerting_termfield' + termSize: + $ref: '#/components/schemas/Alerting_termsize' + threshold: + $ref: '#/components/schemas/Alerting_threshold' + thresholdComparator: + $ref: '#/components/schemas/Alerting_thresholdcomparator' + timeField: + $ref: '#/components/schemas/Alerting_timefield' + timeWindowSize: + $ref: '#/components/schemas/Alerting_timewindowsize' + timeWindowUnit: + $ref: '#/components/schemas/Alerting_timewindowunit' + Alerting_params_property_infra_inventory: + properties: + criteria: + type: array + items: + type: object + properties: + metric: + type: string + enum: + - count + - cpu + - diskLatency + - load + - memory + - memoryTotal + - tx + - rx + - logRate + - diskIOReadBytes + - diskIOWriteBytes + - s3TotalRequests + - s3NumberOfObjects + - s3BucketSize + - s3DownloadBytes + - s3UploadBytes + - rdsConnections + - rdsQueriesExecuted + - rdsActiveTransactions + - rdsLatency + - sqsMessagesVisible + - sqsMessagesDelayed + - sqsMessagesSent + - sqsMessagesEmpty + - sqsOldestMessage + - custom + timeSize: + type: number + timeUnit: + type: string + enum: + - s + - m + - h + - d + sourceId: + type: string + threshold: + type: array + items: + type: number + comparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + customMetric: + type: object + properties: + type: + type: string + enum: + - custom + field: + type: string + aggregation: + type: string + enum: + - avg + - max + - min + - rate + id: + type: string + label: + type: string + warningThreshold: + type: array + items: + type: number + warningComparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + filterQuery: + type: string + filterQueryText: + type: string + nodeType: + type: string + enum: + - host + - pod + - container + - awsEC2 + - awsS3 + - awsSQS + - awsRDS + sourceId: + type: string + alertOnNoData: + type: boolean + Alerting_params_property_infra_metric_threshold: + properties: + criteria: + type: array + items: + oneOf: + - title: non count criterion + type: object + properties: + threshold: + type: array + items: + type: number + comparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + timeUnit: + type: string + timeSize: + type: number + warningThreshold: + type: array + items: + type: number + warningComparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + metric: + type: string + aggType: + type: string + enum: + - avg + - max + - min + - cardinality + - rate + - count + - sum + - p95 + - p99 + - custom + - title: count criterion + type: object + properties: + threshold: + type: array + items: + type: number + comparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + timeUnit: + type: string + timeSize: + type: number + warningThreshold: + type: array + items: + type: number + warningComparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + aggType: + type: string + enum: + - count + - title: custom criterion + type: object + properties: + threshold: + type: array + items: + type: number + comparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + timeUnit: + type: string + timeSize: + type: number + warningThreshold: + type: array + items: + type: number + warningComparator: + type: string + enum: + - < + - <= + - '>' + - '>=' + - between + - outside + aggType: + type: string + enum: + - custom + customMetric: + type: array + items: + oneOf: + - type: object + properties: + name: + type: string + aggType: + type: string + enum: + - avg + - sum + - max + - min + - cardinality + field: + type: string + - type: object + properties: + name: + type: string + aggType: + type: string + enum: + - count + filter: + type: string + equation: + type: string + label: + type: string + groupBy: + oneOf: + - type: string + - type: array + items: + type: string + filterQuery: + type: string + sourceId: + type: string + alertOnNoData: + type: boolean + alertOnGroupDisappear: + type: boolean + Alerting_params_property_log_threshold: + oneOf: + - title: Count + type: object + required: + - count + - timeSize + - timeUnit + - logView + properties: + criteria: + type: array + items: + type: object + properties: + field: + type: string + example: my.field + comparator: + type: string + enum: + - more than + - more than or equals + - less than + - less than or equals + - equals + - does not equal + - matches + - does not match + - matches phrase + - does not match phrase + value: + oneOf: + - type: number + example: 42 + - type: string + example: value + count: + type: object + properties: + comparator: + type: string + enum: + - more than + - more than or equals + - less than + - less than or equals + - equals + - does not equal + - matches + - does not match + - matches phrase + - does not match phrase + value: + type: number + example: 100 + timeSize: + type: number + example: 6 + timeUnit: + type: string + enum: + - s + - m + - h + - d + logView: + type: object + properties: + logViewId: + type: string + type: + type: string + enum: + - log-view-reference + example: log-view-reference + groupBy: + type: array + items: + type: string + - title: Ratio + type: object + required: + - count + - timeSize + - timeUnit + - logView + properties: + criteria: + type: array + items: + minItems: 2 + maxItems: 2 + type: array + items: + type: object + properties: + field: + type: string + example: my.field + comparator: + type: string + enum: + - more than + - more than or equals + - less than + - less than or equals + - equals + - does not equal + - matches + - does not match + - matches phrase + - does not match phrase + value: + oneOf: + - type: number + example: 42 + - type: string + example: value + count: + type: object + properties: + comparator: + type: string + enum: + - more than + - more than or equals + - less than + - less than or equals + - equals + - does not equal + - matches + - does not match + - matches phrase + - does not match phrase + value: + type: number + example: 100 + timeSize: + type: number + example: 6 + timeUnit: + type: string + enum: + - s + - m + - h + - d + logView: + type: object + properties: + logViewId: + type: string + type: + type: string + enum: + - log-view-reference + example: log-view-reference + groupBy: + type: array + items: + type: string + Alerting_params_property_slo_burn_rate: + properties: + sloId: + description: The SLO identifier used by the rule + type: string + example: 8853df00-ae2e-11ed-90af-09bb6422b258 + burnRateThreshold: + description: The burn rate threshold used to trigger the alert + type: number + example: 14.4 + maxBurnRateThreshold: + description: >- + The maximum burn rate threshold value defined by the SLO error + budget + type: number + example: 168 + longWindow: + description: The duration of the long window used to compute the burn rate + type: object + properties: + value: + description: The duration value + type: number + example: 6 + unit: + description: The duration unit + type: string + example: h + shortWindow: + description: The duration of the short window used to compute the burn rate + type: object + properties: + value: + description: The duration value + type: number + example: 30 + unit: + description: The duration unit + type: string + example: m + Alerting_params_property_synthetics_uptime_tls: + properties: + search: + type: string + certExpirationThreshold: + type: number + certAgeThreshold: + type: number + Alerting_params_property_synthetics_monitor_status: + required: + - numTimes + - shouldCheckStatus + - shouldCheckAvailability + properties: + availability: + type: object + properties: + range: + type: number + rangeUnit: + type: string + threshold: + type: string + filters: + oneOf: + - type: string + - type: object + deprecated: true + properties: + monitor.type: + type: array + items: + type: string + observer.geo.name: + type: array + items: + type: string + tags: + type: array + items: + type: string + url.port: + type: array + items: + type: string + locations: + deprecated: true + type: array + items: + type: string + numTimes: + type: number + search: + type: string + shouldCheckStatus: + type: boolean + shouldCheckAvailability: + type: boolean + timerangeCount: + type: number + timerangeUnit: + type: string + timerange: + deprecated: true + type: object + properties: + from: + type: string + to: + type: string + version: + type: number + isAutoGenerated: + type: boolean + Alerting_create_rule_request: + title: Create rule request body properties + description: The properties vary depending on the rule type. + oneOf: + - $ref: >- + #/components/schemas/Alerting_create_anomaly_detection_alert_rule_request + - $ref: >- + #/components/schemas/Alerting_create_anomaly_detection_jobs_health_rule_request + - $ref: '#/components/schemas/Alerting_create_apm_anomaly_rule_request' + - $ref: '#/components/schemas/Alerting_create_apm_error_count_rule_request' + - $ref: >- + #/components/schemas/Alerting_create_apm_transaction_duration_rule_request + - $ref: >- + #/components/schemas/Alerting_create_apm_transaction_error_rate_rule_request + - $ref: '#/components/schemas/Alerting_create_es_query_rule_request' + - $ref: '#/components/schemas/Alerting_create_geo_containment_rule_request' + - $ref: '#/components/schemas/Alerting_create_index_threshold_rule_request' + - $ref: '#/components/schemas/Alerting_create_infra_inventory_rule_request' + - $ref: >- + #/components/schemas/Alerting_create_infra_metric_anomaly_rule_request + - $ref: >- + #/components/schemas/Alerting_create_infra_metric_threshold_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_jvm_memory_usage_rule_request + - $ref: '#/components/schemas/Alerting_create_log_threshold_rule_request' + - $ref: >- + #/components/schemas/Alerting_create_monitoring_ccr_exceptions_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_cluster_health_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_cpu_usage_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_disk_usage_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_elasticsearch_version_mismatch_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_license_expiration_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_kibana_version_mismatch_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_logstash_version_mismatch_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_missing_data_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_nodes_changed_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_shard_size_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_thread_pool_search_rejections_rule_request + - $ref: >- + #/components/schemas/Alerting_create_monitoring_thread_pool_write_rejections_rule_request + - $ref: '#/components/schemas/Alerting_create_siem_eql_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_indicator_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_ml_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_new_terms_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_notifications_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_query_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_saved_query_rule_request' + - $ref: '#/components/schemas/Alerting_create_siem_threshold_rule_request' + - $ref: '#/components/schemas/Alerting_create_slo_burn_rate_rule_request' + - $ref: >- + #/components/schemas/Alerting_create_synthetics_monitor_status_rule_request + - $ref: >- + #/components/schemas/Alerting_create_synthetics_uptime_duration_anomaly_rule_request + - $ref: >- + #/components/schemas/Alerting_create_synthetics_uptime_tls_rule_request + - $ref: >- + #/components/schemas/Alerting_create_synthetics_uptime_tls_certificate_rule_request + - $ref: '#/components/schemas/Alerting_create_transform_health_rule_request' + - $ref: >- + #/components/schemas/Alerting_create_uptime_monitor_status_rule_request + discriminator: + propertyName: rule_type_id + mapping: + xpack.ml.anomaly_detection_alert: >- + #/components/schemas/Alerting_create_anomaly_detection_alert_rule_request + xpack.ml.anomaly_detection_jobs_health: >- + #/components/schemas/Alerting_create_anomaly_detection_jobs_health_rule_request + apm.anomaly: '#/components/schemas/Alerting_create_apm_anomaly_rule_request' + apm.error_rate: '#/components/schemas/Alerting_create_apm_error_count_rule_request' + apm.transaction_duration: >- + #/components/schemas/Alerting_create_apm_transaction_duration_rule_request + apm.transaction_error_rate: >- + #/components/schemas/Alerting_create_apm_transaction_error_rate_rule_request + .es-query: '#/components/schemas/Alerting_create_es_query_rule_request' + .geo-containment: '#/components/schemas/Alerting_create_geo_containment_rule_request' + .index-threshold: '#/components/schemas/Alerting_create_index_threshold_rule_request' + metrics.alert.inventory.threshold: '#/components/schemas/Alerting_create_infra_inventory_rule_request' + metrics.alert.anomaly: >- + #/components/schemas/Alerting_create_infra_metric_anomaly_rule_request + metrics.alert.threshold: >- + #/components/schemas/Alerting_create_infra_metric_threshold_rule_request + monitoring_alert_jvm_memory_usage: >- + #/components/schemas/Alerting_create_monitoring_jvm_memory_usage_rule_request + logs.alert.document.count: '#/components/schemas/Alerting_create_log_threshold_rule_request' + monitoring_ccr_read_exceptions: >- + #/components/schemas/Alerting_create_monitoring_ccr_exceptions_rule_request + monitoring_alert_cluster_health: >- + #/components/schemas/Alerting_create_monitoring_cluster_health_rule_request + monitoring_alert_cpu_usage: >- + #/components/schemas/Alerting_create_monitoring_cpu_usage_rule_request + monitoring_alert_disk_usage: >- + #/components/schemas/Alerting_create_monitoring_disk_usage_rule_request + monitoring_alert_elasticsearch_version_mismatch: >- + #/components/schemas/Alerting_create_monitoring_elasticsearch_version_mismatch_rule_request + monitoring_alert_license_expiration: >- + #/components/schemas/Alerting_create_monitoring_license_expiration_rule_request + monitoring_alert_kibana_version_mismatch: >- + #/components/schemas/Alerting_create_monitoring_kibana_version_mismatch_rule_request + monitoring_alert_logstash_version_mismatch: >- + #/components/schemas/Alerting_create_monitoring_logstash_version_mismatch_rule_request + monitoring_alert_missing_monitoring_data: >- + #/components/schemas/Alerting_create_monitoring_missing_data_rule_request + monitoring_alert_nodes_changed: >- + #/components/schemas/Alerting_create_monitoring_nodes_changed_rule_request + monitoring_shard_size: >- + #/components/schemas/Alerting_create_monitoring_shard_size_rule_request + monitoring_alert_thread_pool_search_rejections: >- + #/components/schemas/Alerting_create_monitoring_thread_pool_search_rejections_rule_request + monitoring_alert_thread_pool_write_rejections: >- + #/components/schemas/Alerting_create_monitoring_thread_pool_write_rejections_rule_request + siem.eqlRule: '#/components/schemas/Alerting_create_siem_eql_rule_request' + siem.indicatorRule: '#/components/schemas/Alerting_create_siem_indicator_rule_request' + siem.mlRule: '#/components/schemas/Alerting_create_siem_ml_rule_request' + siem.newTermsRule: '#/components/schemas/Alerting_create_siem_new_terms_rule_request' + siem.notifications: '#/components/schemas/Alerting_create_siem_notifications_rule_request' + siem.queryRule: '#/components/schemas/Alerting_create_siem_query_rule_request' + siem.savedQueryRule: '#/components/schemas/Alerting_create_siem_saved_query_rule_request' + siem.thresholdRule: '#/components/schemas/Alerting_create_siem_threshold_rule_request' + slo.rules.burnRate: '#/components/schemas/Alerting_create_slo_burn_rate_rule_request' + xpack.synthetics.alerts.monitorStatus: >- + #/components/schemas/Alerting_create_synthetics_monitor_status_rule_request + xpack.uptime.alerts.durationAnomaly: >- + #/components/schemas/Alerting_create_synthetics_uptime_duration_anomaly_rule_request + xpack.uptime.alerts.tls: >- + #/components/schemas/Alerting_create_synthetics_uptime_tls_rule_request + xpack.uptime.alerts.tlsCertificate: >- + #/components/schemas/Alerting_create_synthetics_uptime_tls_certificate_rule_request + transform_health: '#/components/schemas/Alerting_create_transform_health_rule_request' + xpack.uptime.alerts.monitorStatus: >- + #/components/schemas/Alerting_create_uptime_monitor_status_rule_request + Alerting_rule_response_properties: + title: Rule response properties + type: object + required: + - actions + - api_key_owner + - consumer + - created_at + - created_by + - enabled + - execution_status + - id + - mute_all + - muted_alert_ids + - name + - params + - rule_type_id + - schedule + - tags + - throttle + - updated_at + - updated_by + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + 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 + api_key_owner: + type: string + description: > + The owner of the API key that is associated with the rule and used + to run background tasks. + 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`. + example: 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' + created_by: + type: string + description: The identifier for the user that created the rule. + nullable: true + example: elastic + enabled: + type: boolean + description: Indicates whether the rule is currently enabled. + example: true + execution_status: + type: object + properties: + last_duration: + type: integer + example: 55 + last_execution_date: + 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 rule. + example: b530fed0-74f5-11ed-9801-35303b735aef + last_run: + type: object + properties: + alerts_count: + type: object + properties: + active: + type: integer + ignored: + type: integer + new: + type: integer + recovered: + type: integer + outcome: + type: string + example: succeeded + outcome_msg: + type: array + items: + type: string + nullable: true + outcome_order: + type: integer + warning: + type: string + nullable: true + example: null + muted_alert_ids: + type: array + nullable: true + items: + type: string + mute_all: + type: boolean + example: false + name: + type: string + description: The name of the rule. + example: cluster_health_rule + next_run: + type: string + format: date-time + nullable: true + example: '2022-12-06T00:14:43.818Z' + notify_when: + type: string + description: Indicates how often alerts generate actions. + nullable: true + params: + type: object + description: The parameters for the rule. + additionalProperties: true + revision: + type: integer + description: The rule revision number. + 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`. + example: monitoring_alert_cluster_health + running: + type: boolean + description: Indicates whether the rule is running. + schedule: + $ref: '#/components/schemas/Alerting_schedule' + scheduled_task_id: + type: string + example: b530fed0-74f5-11ed-9801-35303b735aef + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + updated_at: + type: string + description: The date and time that the rule was updated most recently. + example: '2022-12-05T23:36:58.284Z' + updated_by: + type: string + description: The identifier for the user that updated this rule most recently. + nullable: true + example: elastic + Alerting_401_response: + type: object + title: Unsuccessful rule API response + properties: + error: + type: string + example: Unauthorized + enum: + - Unauthorized + message: + type: string + statusCode: + type: integer + example: 401 + enum: + - 401 + Alerting_404_response: + type: object + properties: + error: + type: string + example: Not Found + enum: + - Not Found + message: + type: string + example: Saved object [alert/caaad6d0-920c-11ed-b36a-874bd1548a00] not found + statusCode: + type: integer + example: 404 + enum: + - 404 + Alerting_update_rule_request: + title: Update rule request + description: > + The update rule API request body varies depending on the type of rule + and actions. + type: object + required: + - name + - params + - schedule + properties: + actions: + $ref: '#/components/schemas/Alerting_actions' + alert_delay: + $ref: '#/components/schemas/Alerting_alert_delay' + name: + type: string + description: The name of the rule. + example: cluster_health_rule + notify_when: + $ref: '#/components/schemas/Alerting_notify_when' + params: + type: object + description: The parameters for the rule. + additionalProperties: true + schedule: + $ref: '#/components/schemas/Alerting_schedule' + tags: + $ref: '#/components/schemas/Alerting_tags' + throttle: + $ref: '#/components/schemas/Alerting_throttle' + Alerting_fieldmap_properties: + title: Field map objects in the get rule types response + type: object + properties: + array: + type: boolean + description: Indicates whether the field is an array. + dynamic: + type: boolean + description: Indicates whether it is a dynamic field mapping. + format: + type: string + description: > + Indicates the format of the field. For example, if the `type` is + `date_range`, the `format` can be + `epoch_millis||strict_date_optional_time`. + ignore_above: + type: integer + description: >- + Specifies the maximum length of a string field. Longer strings are + not indexed or stored. + index: + type: boolean + description: Indicates whether field values are indexed. + path: + type: string + description: TBD + properties: + type: object + description: > + Details about the object properties. This property is applicable + when `type` is `object`. + additionalProperties: + type: object + properties: + type: + type: string + description: The data type for each object property. + required: + type: boolean + description: Indicates whether the field is required. + scaling_factor: + type: integer + description: > + The scaling factor to use when encoding values. This property is + applicable when `type` is `scaled_float`. Values will be multiplied + by this factor at index time and rounded to the closest long value. + type: + type: string + description: Specifies the data type for the field. + example: scaled_float + Alerting_400_response: + title: Bad request + type: object + required: + - error + - message + - statusCode + properties: + error: + type: string + enum: + - Bad Request + message: + type: string + statusCode: + type: integer + enum: + - 400 + Alerting_alert_response_properties: + 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 + Cases_assignees: + type: array + description: An array containing users that are assigned to the case. + maxItems: 10 + nullable: true + items: + type: object + required: + - uid + properties: + uid: + type: string + description: >- + A unique identifier for the user profile. These identifiers can be + found by using the suggest user profile API. + example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + Cases_connector_properties_none: + title: Create or update case request properties for no connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.none`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. To create a case without + a connector, specify null. To update a case to remove the connector, + specify null. + nullable: true + type: string + example: null + id: + description: >- + The identifier for the connector. To create a case without a + connector, use `none`. To update a case to remove the connector, + specify `none`. + type: string + example: none + name: + description: >- + The name of the connector. To create a case without a connector, use + `none`. To update a case to remove the connector, specify `none`. + type: string + example: none + type: + description: >- + The type of connector. To create a case without a connector, use + `.none`. To update a case to remove the connector, specify `.none`. + type: string + example: .none + enum: + - .none + Cases_connector_properties_cases_webhook: + title: Create or upate case request properties for Cases Webhook connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.cases-webhook`. + type: object + properties: + fields: + type: string + nullable: true + example: null + id: + description: >- + The identifier for the connector. To retrieve connector IDs, use the + find connectors API. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .cases-webhook + enum: + - .cases-webhook + Cases_connector_properties_jira: + title: Create or update case request properties for a Jira connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.jira`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. + type: object + required: + - issueType + - parent + - priority + properties: + issueType: + description: The type of issue. + type: string + nullable: true + parent: + description: The key of the parent issue, when the issue type is sub-task. + type: string + nullable: true + priority: + description: The priority of the issue. + type: string + nullable: true + id: + description: >- + The identifier for the connector. To retrieve connector IDs, use the + find connectors API. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .jira + enum: + - .jira + Cases_connector_properties_resilient: + title: Create case request properties for a IBM Resilient connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.resilient`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. + type: object + nullable: true + required: + - issueTypes + - severityCode + properties: + issueTypes: + description: The type of incident. + type: array + items: + type: string + severityCode: + description: The severity code of the incident. + type: string + id: + description: The identifier for the connector. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .resilient + enum: + - .resilient + Cases_connector_properties_servicenow: + title: Create case request properties for a ServiceNow ITSM connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.servicenow`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. + type: object + required: + - category + - impact + - severity + - subcategory + - urgency + properties: + category: + description: The category of the incident. + type: string + nullable: true + impact: + description: The effect an incident had on business. + type: string + nullable: true + severity: + description: The severity of the incident. + type: string + nullable: true + subcategory: + description: The subcategory of the incident. + type: string + nullable: true + urgency: + description: The extent to which the incident resolution can be delayed. + type: string + nullable: true + id: + description: >- + The identifier for the connector. To retrieve connector IDs, use the + find connectors API. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .servicenow + enum: + - .servicenow + Cases_connector_properties_servicenow_sir: + title: Create case request properties for a ServiceNow SecOps connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.servicenow-sir`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. + type: object + required: + - category + - destIp + - malwareHash + - malwareUrl + - priority + - sourceIp + - subcategory + properties: + category: + description: The category of the incident. + type: string + nullable: true + destIp: + description: >- + Indicates whether cases will send a comma-separated list of + destination IPs. + type: boolean + nullable: true + malwareHash: + description: >- + Indicates whether cases will send a comma-separated list of + malware hashes. + type: boolean + nullable: true + malwareUrl: + description: >- + Indicates whether cases will send a comma-separated list of + malware URLs. + type: boolean + nullable: true + priority: + description: The priority of the issue. + type: string + nullable: true + sourceIp: + description: >- + Indicates whether cases will send a comma-separated list of + source IPs. + type: boolean + nullable: true + subcategory: + description: The subcategory of the incident. + type: string + nullable: true + id: + description: >- + The identifier for the connector. To retrieve connector IDs, use the + find connectors API. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .servicenow-sir + enum: + - .servicenow-sir + Cases_connector_properties_swimlane: + title: Create case request properties for a Swimlane connector + required: + - fields + - id + - name + - type + description: Defines properties for connectors when type is `.swimlane`. + type: object + properties: + fields: + description: >- + An object containing the connector fields. If you want to omit any + individual field, specify null as its value. + type: object + required: + - caseId + properties: + caseId: + description: The case identifier for Swimlane connectors. + type: string + nullable: true + id: + description: >- + The identifier for the connector. To retrieve connector IDs, use the + find connectors API. + type: string + name: + description: The name of the connector. + type: string + type: + description: The type of connector. + type: string + example: .swimlane + enum: + - .swimlane + Cases_case_description: + description: The description for the case. + type: string + maxLength: 30000 + Cases_owners: + type: string + description: > + The application that owns the cases: Stack Management, Observability, or + Elastic Security. + enum: + - cases + - observability + - securitySolution + example: cases + Cases_settings: + type: object + description: An object that contains the case settings. + required: + - syncAlerts + properties: + syncAlerts: + description: Turns alert syncing on or off. + type: boolean + example: true + Cases_case_severity: + type: string + description: The severity of the case. + enum: + - critical + - high + - low + - medium + default: low + Cases_case_tags: + description: > + The words and phrases that help categorize cases. It can be an empty + array. + type: array + maxItems: 200 + items: + type: string + maxLength: 256 + Cases_case_category: + description: A word or phrase that categorizes the case. + type: string + maxLength: 50 + Cases_case_title: + description: A title for the case. + type: string + maxLength: 160 + Cases_create_case_request: + title: Create case request + description: >- + The create case API request body varies depending on the type of + connector. + type: object + required: + - connector + - description + - owner + - settings + - tags + - title + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + connector: + oneOf: + - $ref: '#/components/schemas/Cases_connector_properties_none' + - $ref: '#/components/schemas/Cases_connector_properties_cases_webhook' + - $ref: '#/components/schemas/Cases_connector_properties_jira' + - $ref: '#/components/schemas/Cases_connector_properties_resilient' + - $ref: '#/components/schemas/Cases_connector_properties_servicenow' + - $ref: '#/components/schemas/Cases_connector_properties_servicenow_sir' + - $ref: '#/components/schemas/Cases_connector_properties_swimlane' + description: + $ref: '#/components/schemas/Cases_case_description' + owner: + $ref: '#/components/schemas/Cases_owners' + settings: + $ref: '#/components/schemas/Cases_settings' + severity: + $ref: '#/components/schemas/Cases_case_severity' + tags: + $ref: '#/components/schemas/Cases_case_tags' + category: + $ref: '#/components/schemas/Cases_case_category' + title: + $ref: '#/components/schemas/Cases_case_title' + customFields: + type: array + description: > + Custom field values for a case. Any optional custom fields that are + not specified in the request are set to null. + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + key: + description: > + The unique identifier for the custom field. The key value must + exist in the case configuration settings. + type: string + type: + description: > + The custom field type. It must match the type specified in the + case configuration settings. + type: string + enum: + - text + - toggle + value: + description: > + The custom field value. If the custom field is required, it + cannot be explicitly set to null. However, for cases that + existed when the required custom field was added, the default + value stored in Elasticsearch is `undefined`. The value + returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean + Cases_case_response_closed_by_properties: + title: Case response properties for closed_by + type: object + nullable: true + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + Cases_alert_comment_response_properties: + title: Add case comment response properties for alerts + type: object + required: + - type + properties: + alertId: + type: array + items: + type: string + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + created_at: + type: string + format: date-time + example: '2023-11-06T19:29:38.424Z' + created_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + id: + type: string + example: 73362370-ab1a-11ec-985f-97e55adae8b9 + index: + type: array + items: + type: string + example: .internal.alerts-security.alerts-default-000001 + owner: + $ref: '#/components/schemas/Cases_owners' + pushed_at: + type: string + format: date-time + example: null + nullable: true + pushed_by: + type: object + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + rule: + type: object + properties: + id: + description: The rule identifier. + type: string + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + name: + description: The rule name. + type: string + example: security_rule + type: + type: string + example: alert + enum: + - alert + updated_at: + type: string + format: date-time + nullable: true + updated_by: + type: object + nullable: true + required: + - email + - full_name + - username + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + version: + type: string + example: WzMwNDgsMV0= + Cases_user_comment_response_properties: + title: Case response properties for user comments + type: object + required: + - type + properties: + comment: + type: string + example: A new comment. + created_at: + type: string + format: date-time + example: '2022-05-13T09:16:17.416Z' + created_by: + $ref: '#/components/schemas/Cases_case_response_created_by_properties' + id: + type: string + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + owner: + $ref: '#/components/schemas/Cases_owners' + pushed_at: + type: string + format: date-time + nullable: true + example: null + pushed_by: + $ref: '#/components/schemas/Cases_case_response_pushed_by_properties' + type: + type: string + example: user + enum: + - user + updated_at: + type: string + format: date-time + nullable: true + example: null + updated_by: + $ref: '#/components/schemas/Cases_case_response_updated_by_properties' + version: + type: string + example: WzIwNDMxLDFd + Cases_case_response_created_by_properties: + title: Case response properties for created_by + type: object + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + Cases_case_response_pushed_by_properties: + title: Case response properties for pushed_by + type: object + nullable: true + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + Cases_case_response_updated_by_properties: + title: Case response properties for updated_by + type: object + nullable: true + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + Cases_external_service: + type: object + nullable: true + properties: + connector_id: + type: string + connector_name: + type: string + external_id: + type: string + external_title: + type: string + external_url: + type: string + pushed_at: + type: string + format: date-time + pushed_by: + type: object + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true + Cases_case_status: + type: string + description: The status of the case. + enum: + - closed + - in-progress + - open + Cases_case_response_properties: + title: Case response properties + type: object + required: + - closed_at + - closed_by + - comments + - connector + - created_at + - created_by + - description + - duration + - external_service + - id + - owner + - settings + - severity + - status + - tags + - title + - totalAlerts + - totalComment + - updated_at + - updated_by + - version + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + category: + type: string + description: The case category. + nullable: true + closed_at: + type: string + format: date-time + nullable: true + closed_by: + $ref: '#/components/schemas/Cases_case_response_closed_by_properties' + comments: + title: Case response properties for comments + description: An array of comment objects for the case. + type: array + maxItems: 10000 + items: + oneOf: + - $ref: '#/components/schemas/Cases_alert_comment_response_properties' + - $ref: '#/components/schemas/Cases_user_comment_response_properties' + discriminator: + propertyName: type + mapping: + alert: '#/components/schemas/Cases_alert_comment_response_properties' + user: '#/components/schemas/Cases_user_comment_response_properties' + connector: + title: Case response properties for connectors + oneOf: + - $ref: '#/components/schemas/Cases_connector_properties_none' + - $ref: '#/components/schemas/Cases_connector_properties_cases_webhook' + - $ref: '#/components/schemas/Cases_connector_properties_jira' + - $ref: '#/components/schemas/Cases_connector_properties_resilient' + - $ref: '#/components/schemas/Cases_connector_properties_servicenow' + - $ref: '#/components/schemas/Cases_connector_properties_servicenow_sir' + - $ref: '#/components/schemas/Cases_connector_properties_swimlane' + discriminator: + propertyName: type + mapping: + .none: '#/components/schemas/Cases_connector_properties_none' + .cases-webhook: '#/components/schemas/Cases_connector_properties_cases_webhook' + .jira: '#/components/schemas/Cases_connector_properties_jira' + .resilient: '#/components/schemas/Cases_connector_properties_resilient' + .servicenow: '#/components/schemas/Cases_connector_properties_servicenow' + .servicenow-sir: '#/components/schemas/Cases_connector_properties_servicenow_sir' + .swimlane: '#/components/schemas/Cases_connector_properties_swimlane' + created_at: + type: string + format: date-time + example: '2022-05-13T09:16:17.416Z' + created_by: + $ref: '#/components/schemas/Cases_case_response_created_by_properties' + customFields: + type: array + description: Custom field values for the case. + items: + type: object + properties: + key: + description: > + The unique identifier for the custom field. The key value must + exist in the case configuration settings. + type: string + type: + description: > + The custom field type. It must match the type specified in the + case configuration settings. + type: string + enum: + - text + - toggle + value: + description: > + The custom field value. If the custom field is required, it + cannot be explicitly set to null. However, for cases that + existed when the required custom field was added, the default + value stored in Elasticsearch is `undefined`. The value + returned in the API and user interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean + description: + type: string + example: A case description. + duration: + type: integer + description: > + The elapsed time from the creation of the case to its closure (in + seconds). If the case has not been closed, the duration is set to + null. If the case was closed after less than half a second, the + duration is rounded down to zero. + nullable: true + example: 120 + external_service: + $ref: '#/components/schemas/Cases_external_service' + id: + type: string + example: 66b9aa00-94fa-11ea-9f74-e7e108796192 + owner: + $ref: '#/components/schemas/Cases_owners' + settings: + $ref: '#/components/schemas/Cases_settings' + severity: + $ref: '#/components/schemas/Cases_case_severity' + status: + $ref: '#/components/schemas/Cases_case_status' + tags: + type: array + items: + type: string + example: + - tag-1 + title: + type: string + example: Case title 1 + totalAlerts: + type: integer + example: 0 + totalComment: + type: integer + example: 0 + updated_at: + type: string + format: date-time + nullable: true + updated_by: + $ref: '#/components/schemas/Cases_case_response_updated_by_properties' + version: + type: string + example: WzUzMiwxXQ== + Cases_4xx_response: + type: object + title: Unsuccessful cases API response + properties: + error: + type: string + example: Unauthorized + message: + type: string + statusCode: + type: integer + example: 401 + Cases_update_case_request: + title: Update case request + description: >- + The update case API request body varies depending on the type of + connector. + type: object + required: + - cases + properties: + cases: + type: array + description: An array containing one or more case objects. + maxItems: 100 + minItems: 1 + items: + type: object + required: + - id + - version + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + category: + $ref: '#/components/schemas/Cases_case_category' + connector: + oneOf: + - $ref: '#/components/schemas/Cases_connector_properties_none' + - $ref: >- + #/components/schemas/Cases_connector_properties_cases_webhook + - $ref: '#/components/schemas/Cases_connector_properties_jira' + - $ref: '#/components/schemas/Cases_connector_properties_resilient' + - $ref: '#/components/schemas/Cases_connector_properties_servicenow' + - $ref: >- + #/components/schemas/Cases_connector_properties_servicenow_sir + - $ref: '#/components/schemas/Cases_connector_properties_swimlane' + customFields: + type: array + description: > + Custom field values for a case. Any optional custom fields + that are not specified in the request are set to null. + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - type + - value + properties: + key: + description: > + The unique identifier for the custom field. The key + value must exist in the case configuration settings. + type: string + type: + description: > + The custom field type. It must match the type specified + in the case configuration settings. + type: string + enum: + - text + - toggle + value: + description: > + The custom field value. If the custom field is required, + it cannot be explicitly set to null. However, for cases + that existed when the required custom field was added, + the default value stored in Elasticsearch is + `undefined`. The value returned in the API and user + interface in this case is `null`. + oneOf: + - type: string + minLength: 1 + maxLength: 160 + nullable: true + - type: boolean + description: + $ref: '#/components/schemas/Cases_case_description' + id: + description: The identifier for the case. + type: string + maxLength: 30000 + settings: + $ref: '#/components/schemas/Cases_settings' + severity: + $ref: '#/components/schemas/Cases_case_severity' + status: + $ref: '#/components/schemas/Cases_case_status' + tags: + $ref: '#/components/schemas/Cases_case_tags' + title: + $ref: '#/components/schemas/Cases_case_title' + version: + description: >- + The current version of the case. To determine this value, use + the get case or find cases APIs. + type: string + Cases_searchFieldsType: + type: string + description: The fields to perform the `simple_query_string` parsed query against. + enum: + - description + - title + Cases_closure_types: + type: string + description: >- + Indicates whether a case is automatically closed when it is pushed to + external systems (`close-by-pushing`) or not automatically closed + (`close-by-user`). + enum: + - close-by-pushing + - close-by-user + example: close-by-user + Cases_connector_types: + type: string + description: The type of connector. + enum: + - .cases-webhook + - .jira + - .none + - .resilient + - .servicenow + - .servicenow-sir + - .swimlane + example: .none + Cases_template_tags: + description: > + The words and phrases that help categorize templates. It can be an empty + array. + type: array + maxItems: 200 + items: + type: string + maxLength: 256 + Cases_templates: + type: array + x-technical-preview: true + items: + type: object + properties: + caseFields: + type: object + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + category: + $ref: '#/components/schemas/Cases_case_category' + connector: + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are not + used and are not propagated to individual cases, therefore + it is recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want a + default connector, use `none`. To retrieve connector IDs, + use the find connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a default + connector, use `none`. To retrieve connector names, use + the find connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + customFields: + type: array + x-technical-preview: true + description: Custom field values in the template. + items: + type: object + properties: + key: + type: string + description: The unique key for the custom field. + type: + type: string + enum: + - text + - toggle + description: The type of the custom field. + value: + oneOf: + - type: string + - type: boolean + description: > + The default value for the custom field when a case uses + the template. If the `type` is `text`, the default value + must be a string. If the `type` is `toggle`, the default + value must be boolean. + description: + $ref: '#/components/schemas/Cases_case_description' + settings: + $ref: '#/components/schemas/Cases_settings' + severity: + $ref: '#/components/schemas/Cases_case_severity' + tags: + $ref: '#/components/schemas/Cases_case_tags' + title: + $ref: '#/components/schemas/Cases_case_title' + description: + type: string + description: A description for the template. + key: + type: string + description: > + A unique key for the template. Must be lower case and composed + only of a-z, 0-9, '_', and '-' characters. It is used in API calls + to refer to a specific template. + name: + type: string + description: The name of the template. + tags: + $ref: '#/components/schemas/Cases_template_tags' + Cases_set_case_configuration_request: + title: Set case configuration request + description: >- + External connection details, such as the closure type and default + connector for cases. + type: object + required: + - closure_type + - connector + - owner + properties: + closure_type: + $ref: '#/components/schemas/Cases_closure_types' + connector: + description: An object that contains the connector configuration. + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are not used and + are not propagated to individual cases, therefore it is + recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want a default + connector, use `none`. To retrieve connector IDs, use the find + connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a default + connector, use `none`. To retrieve connector names, use the find + connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + required: + - fields + - id + - name + - type + customFields: + type: array + description: Custom fields case configuration. + minItems: 0 + maxItems: 10 + items: + type: object + required: + - key + - label + - required + - type + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. If the `type` is `text`, + the default value must be a string. If the `type` is `toggle`, + the default value must be boolean. + key: + description: > + A unique key for the custom field. Must be lower case and + composed only of a-z, 0-9, '_', and '-' characters. It is used + in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: > + Indicates whether the field is required. If `false`, the + custom field can be set to null or omitted when a case is + created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle + owner: + $ref: '#/components/schemas/Cases_owners' + templates: + $ref: '#/components/schemas/Cases_templates' + Cases_update_case_configuration_request: + title: Update case configuration request + description: > + You can update settings such as the closure type, custom fields, + templates, and the default connector for cases. + type: object + required: + - version + properties: + closure_type: + $ref: '#/components/schemas/Cases_closure_types' + connector: + description: An object that contains the connector configuration. + type: object + properties: + fields: + description: >- + The fields specified in the case configuration are not used and + are not propagated to individual cases, therefore it is + recommended to set it to `null`. + nullable: true + type: object + id: + description: >- + The identifier for the connector. If you do not want a default + connector, use `none`. To retrieve connector IDs, use the find + connectors API. + type: string + example: none + name: + description: >- + The name of the connector. If you do not want a default + connector, use `none`. To retrieve connector names, use the find + connectors API. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + required: + - fields + - id + - name + - type + customFields: + type: array + description: Custom fields case configuration. + items: + type: object + required: + - key + - label + - required + - type + properties: + defaultValue: + oneOf: + - type: string + - type: boolean + description: > + A default value for the custom field. If the `type` is `text`, + the default value must be a string. If the `type` is `toggle`, + the default value must be boolean. + key: + description: > + A unique key for the custom field. Must be lower case and + composed only of a-z, 0-9, '_', and '-' characters. It is used + in API calls to refer to a specific custom field. + type: string + minLength: 1 + maxLength: 36 + label: + description: The custom field label that is displayed in the case. + type: string + minLength: 1 + maxLength: 50 + required: + description: > + Indicates whether the field is required. If `false`, the + custom field can be set to null or omitted when a case is + created or updated. + type: boolean + type: + description: The type of the custom field. + type: string + enum: + - text + - toggle + templates: + $ref: '#/components/schemas/Cases_templates' + version: + description: > + The version of the connector. To retrieve the version value, use the + get configuration API. + type: string + example: WzIwMiwxXQ== + Cases_alert_response_properties: + type: object + properties: + attached_at: + type: string + format: date-time + id: + description: The alert identifier. + type: string + index: + description: The alert index. + type: string + Cases_add_alert_comment_request_properties: + title: Add case comment request properties for alerts + required: + - alertId + - index + - owner + - rule + - type + description: Defines properties for case comment requests when type is alert. + type: object + properties: + alertId: + $ref: '#/components/schemas/Cases_alert_identifiers' + index: + $ref: '#/components/schemas/Cases_alert_indices' + owner: + $ref: '#/components/schemas/Cases_owners' + rule: + $ref: '#/components/schemas/Cases_rule' + type: + description: The type of comment. + type: string + example: alert + enum: + - alert + Cases_add_user_comment_request_properties: + title: Add case comment request properties for user comments + description: Defines properties for case comment requests when type is user. + type: object + properties: + comment: + description: The new comment. It is required only when `type` is `user`. + type: string + maxLength: 30000 + example: A new comment. + owner: + $ref: '#/components/schemas/Cases_owners' + type: + type: string + description: The type of comment. + example: user + enum: + - user + required: + - comment + - owner + - type + Cases_alert_identifiers: + title: Alert identifiers + description: > + The alert identifiers. It is required only when `type` is `alert`. You + can use an array of strings to add multiple alerts to a case, provided + that they all relate to the same rule; `index` must also be an array + with the same length or number of elements. Adding multiple alerts in + this manner is recommended rather than calling the API multiple times. + This functionality is in technical preview and may be changed or removed + in a future release. Elastic will work to fix any issues, but features + in technical preview are not subject to the support SLA of official GA + features. + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 1000 + x-technical-preview: true + example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + Cases_alert_indices: + title: Alert indices + description: > + The alert indices. It is required only when `type` is `alert`. If you + are adding multiple alerts to a case, use an array of strings; the + position of each index name in the array must match the position of the + corresponding alert identifier in the `alertId` array. This + functionality is in technical preview and may be changed or removed in a + future release. Elastic will work to fix any issues, but features in + technical preview are not subject to the support SLA of official GA + features. + oneOf: + - type: string + - type: array + items: + type: string + maxItems: 1000 + x-technical-preview: true + Cases_rule: + title: Alerting rule + description: > + The rule that is associated with the alerts. It is required only when + `type` is `alert`. This functionality is in technical preview and may be + changed or removed in a future release. Elastic will work to fix any + issues, but features in technical preview are not subject to the support + SLA of official GA features. + type: object + x-technical-preview: true + properties: + id: + description: The rule identifier. + type: string + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + name: + description: The rule name. + type: string + example: security_rule + Cases_add_case_comment_request: + title: Add case comment request + description: >- + The add comment to case API request body varies depending on whether you + are adding an alert or a comment. + oneOf: + - $ref: '#/components/schemas/Cases_add_alert_comment_request_properties' + - $ref: '#/components/schemas/Cases_add_user_comment_request_properties' + discriminator: + propertyName: type + mapping: + alert: '#/components/schemas/Cases_add_alert_comment_request_properties' + user: '#/components/schemas/Cases_add_user_comment_request_properties' + Cases_update_alert_comment_request_properties: + title: Update case comment request properties for alerts + description: Defines properties for case comment requests when type is alert. + required: + - alertId + - id + - index + - owner + - rule + - type + - version + type: object + properties: + alertId: + $ref: '#/components/schemas/Cases_alert_identifiers' + id: + type: string + description: > + The identifier for the comment. To retrieve comment IDs, use the get + comments API. + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + index: + $ref: '#/components/schemas/Cases_alert_indices' + owner: + $ref: '#/components/schemas/Cases_owners' + rule: + $ref: '#/components/schemas/Cases_rule' + type: + description: The type of comment. + type: string + enum: + - alert + example: alert + version: + description: > + The current comment version. To retrieve version values, use the get + comments API. + type: string + example: Wzk1LDFd + Cases_update_user_comment_request_properties: + title: Update case comment request properties for user comments + description: Defines properties for case comment requests when type is user. + type: object + properties: + comment: + description: The new comment. It is required only when `type` is `user`. + type: string + maxLength: 30000 + example: A new comment. + id: + type: string + description: > + The identifier for the comment. To retrieve comment IDs, use the get + comments API. + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + owner: + $ref: '#/components/schemas/Cases_owners' + type: + type: string + description: The type of comment. + enum: + - user + example: user + version: + description: > + The current comment version. To retrieve version values, use the get + comments API. + type: string + example: Wzk1LDFd + required: + - comment + - id + - owner + - type + - version + Cases_update_case_comment_request: + title: Update case comment request + description: >- + The update case comment API request body varies depending on whether you + are updating an alert or a comment. + oneOf: + - $ref: '#/components/schemas/Cases_update_alert_comment_request_properties' + - $ref: '#/components/schemas/Cases_update_user_comment_request_properties' + discriminator: + propertyName: type + mapping: + alert: '#/components/schemas/Cases_update_alert_comment_request_properties' + user: '#/components/schemas/Cases_update_user_comment_request_properties' + Cases_actions: + type: string + enum: + - add + - create + - delete + - push_to_service + - update + example: create + Cases_payload_alert_comment: + type: object + properties: + comment: + type: object + properties: + alertId: + oneOf: + - type: string + example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d + - type: array + items: + type: string + index: + oneOf: + - type: string + example: .alerts-observability.logs.alerts-default + - type: array + items: + type: string + owner: + $ref: '#/components/schemas/Cases_owners' + rule: + type: object + properties: + id: + description: The rule identifier. + type: string + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 + name: + description: The rule name. + type: string + example: security_rule + type: + type: string + enum: + - alert + Cases_payload_assignees: + type: object + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + Cases_payload_connector: + type: object + properties: + connector: + type: object + properties: + fields: + description: >- + An object containing the connector fields. To create a case + without a connector, specify null. If you want to omit any + individual field, specify null as its value. + nullable: true + type: object + properties: + caseId: + description: The case identifier for Swimlane connectors. + type: string + category: + description: >- + The category of the incident for ServiceNow ITSM and + ServiceNow SecOps connectors. + type: string + destIp: + description: >- + Indicates whether cases will send a comma-separated list of + destination IPs for ServiceNow SecOps connectors. + type: boolean + nullable: true + impact: + description: >- + The effect an incident had on business for ServiceNow ITSM + connectors. + type: string + issueType: + description: The type of issue for Jira connectors. + type: string + issueTypes: + description: The type of incident for IBM Resilient connectors. + type: array + items: + type: string + malwareHash: + description: >- + Indicates whether cases will send a comma-separated list of + malware hashes for ServiceNow SecOps connectors. + type: boolean + nullable: true + malwareUrl: + description: >- + Indicates whether cases will send a comma-separated list of + malware URLs for ServiceNow SecOps connectors. + type: boolean + nullable: true + parent: + description: >- + The key of the parent issue, when the issue type is sub-task + for Jira connectors. + type: string + priority: + description: >- + The priority of the issue for Jira and ServiceNow SecOps + connectors. + type: string + severity: + description: The severity of the incident for ServiceNow ITSM connectors. + type: string + severityCode: + description: >- + The severity code of the incident for IBM Resilient + connectors. + type: string + sourceIp: + description: >- + Indicates whether cases will send a comma-separated list of + source IPs for ServiceNow SecOps connectors. + type: boolean + nullable: true + subcategory: + description: >- + The subcategory of the incident for ServiceNow ITSM + connectors. + type: string + urgency: + description: >- + The extent to which the incident resolution can be delayed + for ServiceNow ITSM connectors. + type: string + example: null + id: + description: >- + The identifier for the connector. To create a case without a + connector, use `none`. + type: string + example: none + name: + description: >- + The name of the connector. To create a case without a connector, + use `none`. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + Cases_payload_create_case: + type: object + properties: + assignees: + $ref: '#/components/schemas/Cases_assignees' + connector: + type: object + properties: + fields: + description: >- + An object containing the connector fields. To create a case + without a connector, specify null. If you want to omit any + individual field, specify null as its value. + nullable: true + type: object + properties: + caseId: + description: The case identifier for Swimlane connectors. + type: string + category: + description: >- + The category of the incident for ServiceNow ITSM and + ServiceNow SecOps connectors. + type: string + destIp: + description: >- + Indicates whether cases will send a comma-separated list of + destination IPs for ServiceNow SecOps connectors. + type: boolean + nullable: true + impact: + description: >- + The effect an incident had on business for ServiceNow ITSM + connectors. + type: string + issueType: + description: The type of issue for Jira connectors. + type: string + issueTypes: + description: The type of incident for IBM Resilient connectors. + type: array + items: + type: string + malwareHash: + description: >- + Indicates whether cases will send a comma-separated list of + malware hashes for ServiceNow SecOps connectors. + type: boolean + nullable: true + malwareUrl: + description: >- + Indicates whether cases will send a comma-separated list of + malware URLs for ServiceNow SecOps connectors. + type: boolean + nullable: true + parent: + description: >- + The key of the parent issue, when the issue type is sub-task + for Jira connectors. + type: string + priority: + description: >- + The priority of the issue for Jira and ServiceNow SecOps + connectors. + type: string + severity: + description: The severity of the incident for ServiceNow ITSM connectors. + type: string + severityCode: + description: >- + The severity code of the incident for IBM Resilient + connectors. + type: string + sourceIp: + description: >- + Indicates whether cases will send a comma-separated list of + source IPs for ServiceNow SecOps connectors. + type: boolean + nullable: true + subcategory: + description: >- + The subcategory of the incident for ServiceNow ITSM + connectors. + type: string + urgency: + description: >- + The extent to which the incident resolution can be delayed + for ServiceNow ITSM connectors. + type: string + example: null + id: + description: >- + The identifier for the connector. To create a case without a + connector, use `none`. + type: string + example: none + name: + description: >- + The name of the connector. To create a case without a connector, + use `none`. + type: string + example: none + type: + $ref: '#/components/schemas/Cases_connector_types' + description: + type: string + owner: + $ref: '#/components/schemas/Cases_owners' + settings: + $ref: '#/components/schemas/Cases_settings' + severity: + $ref: '#/components/schemas/Cases_case_severity' + status: + $ref: '#/components/schemas/Cases_case_status' + tags: + type: array + items: + type: string + example: + - tag-1 + title: + type: string + Cases_payload_delete: + type: object + description: >- + If the `action` is `delete` and the `type` is `delete_case`, the payload + is nullable. + nullable: true + Cases_payload_description: + type: object + properties: + description: + type: string + Cases_payload_pushed: + type: object + properties: + externalService: + $ref: '#/components/schemas/Cases_external_service' + Cases_payload_settings: + type: object + properties: + settings: + $ref: '#/components/schemas/Cases_settings' + Cases_payload_severity: + type: object + properties: + severity: + $ref: '#/components/schemas/Cases_case_severity' + Cases_payload_status: + type: object + properties: + status: + $ref: '#/components/schemas/Cases_case_status' + Cases_payload_tags: + type: object + properties: + tags: + type: array + items: + type: string + example: + - tag-1 + Cases_payload_title: + type: object + properties: + title: + type: string + Cases_payload_user_comment: + type: object + properties: + comment: + type: object + properties: + comment: + type: string + owner: + $ref: '#/components/schemas/Cases_owners' + type: + type: string + enum: + - user + Cases_action_types: + type: string + description: The type of action. + enum: + - assignees + - create_case + - comment + - connector + - delete_case + - description + - pushed + - tags + - title + - status + - settings + - severity + example: create_case + Cases_user_actions_response_properties: + type: object + required: + - action + - action_id + - case_id + - comment_id + - created_at + - created_by + - owner + - payload + - type + properties: + action: + $ref: '#/components/schemas/Cases_actions' + action_id: + type: string + example: 22fd3e30-03b1-11ed-920c-974bfa104448 + case_id: + type: string + example: 22df07d0-03b1-11ed-920c-974bfa104448 + comment_id: + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 + created_at: + type: string + format: date-time + example: '2022-05-13T09:16:17.416Z' + created_by: + type: object + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + owner: + $ref: '#/components/schemas/Cases_owners' + payload: + oneOf: + - $ref: '#/components/schemas/Cases_payload_alert_comment' + - $ref: '#/components/schemas/Cases_payload_assignees' + - $ref: '#/components/schemas/Cases_payload_connector' + - $ref: '#/components/schemas/Cases_payload_create_case' + - $ref: '#/components/schemas/Cases_payload_delete' + - $ref: '#/components/schemas/Cases_payload_description' + - $ref: '#/components/schemas/Cases_payload_pushed' + - $ref: '#/components/schemas/Cases_payload_settings' + - $ref: '#/components/schemas/Cases_payload_severity' + - $ref: '#/components/schemas/Cases_payload_status' + - $ref: '#/components/schemas/Cases_payload_tags' + - $ref: '#/components/schemas/Cases_payload_title' + - $ref: '#/components/schemas/Cases_payload_user_comment' + type: + $ref: '#/components/schemas/Cases_action_types' + Cases_user_actions_find_response_properties: + type: object + required: + - action + - comment_id + - created_at + - created_by + - id + - owner + - payload + - type + - version + properties: + action: + $ref: '#/components/schemas/Cases_actions' + comment_id: + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 + created_at: + type: string + format: date-time + example: '2022-05-13T09:16:17.416Z' + created_by: + type: object + properties: + email: + type: string + example: null + nullable: true + full_name: + type: string + example: null + nullable: true + username: + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + required: + - email + - full_name + - username + id: + type: string + example: 22fd3e30-03b1-11ed-920c-974bfa104448 + owner: + $ref: '#/components/schemas/Cases_owners' + payload: + oneOf: + - $ref: '#/components/schemas/Cases_payload_alert_comment' + - $ref: '#/components/schemas/Cases_payload_assignees' + - $ref: '#/components/schemas/Cases_payload_connector' + - $ref: '#/components/schemas/Cases_payload_create_case' + - $ref: '#/components/schemas/Cases_payload_delete' + - $ref: '#/components/schemas/Cases_payload_description' + - $ref: '#/components/schemas/Cases_payload_pushed' + - $ref: '#/components/schemas/Cases_payload_settings' + - $ref: '#/components/schemas/Cases_payload_severity' + - $ref: '#/components/schemas/Cases_payload_status' + - $ref: '#/components/schemas/Cases_payload_tags' + - $ref: '#/components/schemas/Cases_payload_title' + - $ref: '#/components/schemas/Cases_payload_user_comment' + version: + type: string + example: WzM1ODg4LDFd + type: + type: string + description: The type of action. + enum: + - assignees + - create_case + - comment + - connector + - description + - pushed + - tags + - title + - status + - settings + - severity + example: create_case Connectors_create_connector_request_bedrock: title: Create Amazon Bedrock connector request description: >- @@ -8952,6 +17961,1994 @@ components: - metrics type: object examples: + Alerting_create_es_query_esql_rule_request: + summary: >- + Create an Elasticsearch query rule that uses Elasticsearch Query + Language (ES|QL). + value: + name: my Elasticsearch query ESQL rule + params: + searchType: esqlQuery + esqlQuery: + esql: >- + FROM kibana_sample_data_logs | KEEP bytes, clientip, host, + geo.dest | where geo.dest != "GB" | STATS sumbytes = sum(bytes) by + clientip, host | WHERE sumbytes > 5000 | SORT sumbytes desc | + LIMIT 10 + timeField: '@timestamp' + timeWindowSize: 1 + timeWindowUnit: d + size: 0 + thresholdComparator: '>' + threshold: + - 0 + consumer: stackAlerts + rule_type_id: .es-query + schedule: + interval: 1d + actions: + - group: query matched + id: d0db1fe0-78d6-11ee-9177-f7d404c8c945 + params: + level: info + message: >- + Elasticsearch query rule '{{rule.name}}' is active: + + - Value: {{context.value}} - Conditions Met: + {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - + Timestamp: {{context.date}} - Link: {{context.link}} + frequency: + summary: false + notify_when: onActiveAlert + Alerting_create_es_query_rule_request: + summary: >- + Create an Elasticsearch query rule that uses Elasticsearch query domain + specific language (DSL) to define its query and a server log connector + to send notifications. + value: + actions: + - group: query matched + params: + level: info + message: >- + The system has detected {{alerts.new.count}} new, + {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} + recovered alerts. + id: fdbece50-406c-11ee-850e-c71febc4ca7f + frequency: + throttle: 1d + summary: true + notify_when: onThrottleInterval + - group: recovered + params: + level: info + message: Recovered + id: fdbece50-406c-11ee-850e-c71febc4ca7f + frequency: + summary: false + notify_when: onActionGroupChange + consumer: alerts + name: my Elasticsearch query rule + params: + esQuery: '"""{"query":{"match_all" : {}}}"""' + index: + - kibana_sample_data_logs + size: 100 + threshold: + - 100 + thresholdComparator: '>' + timeField: '@timestamp' + timeWindowSize: 1 + timeWindowUnit: d + rule_type_id: .es-query + schedule: + interval: 1d + Alerting_create_es_query_kql_rule_request: + summary: >- + Create an Elasticsearch query rule that uses Kibana query language + (KQL). + value: + consumer: alerts + name: my Elasticsearch query KQL rule + params: + aggType: count + excludeHitsFromPreviousRun: true + groupBy: all + searchConfiguration: + query: + query: '""geo.src : "US" ""' + language: kuery + index: 90943e30-9a47-11e8-b64d-95841ca0b247 + searchType: searchSource + size: 100 + threshold: + - 1000 + thresholdComparator: '>' + timeWindowSize: 5 + timeWindowUnit: m + rule_type_id: .es-query + schedule: + interval: 1m + Alerting_create_index_threshold_rule_request: + summary: Create an index threshold rule. + value: + actions: + - id: 48de3460-f401-11ed-9f8e-399c75a2deeb + frequency: + notify_when: onActionGroupChange + summary: false + group: threshold met + params: + level: info + message: >- + Rule '{{rule.name}}' is active for group '{{context.group}}': + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date}} + alert_delay: + active: 3 + consumer: alerts + name: my rule + params: + aggType: avg + termSize: 6 + thresholdComparator: '>' + timeWindowSize: 5 + timeWindowUnit: m + groupBy: top + threshold: + - 1000 + index: + - .test-index + timeField: '@timestamp' + aggField: sheet.version + termField: name.keyword + rule_type_id: .index-threshold + schedule: + interval: 1m + tags: + - cpu + Alerting_create_tracking_containment_rule_request: + summary: Create a tracking containment rule. + value: + consumer: alerts + name: my tracking rule + params: + index: kibana_sample_data_logs + dateField": '@timestamp' + geoField: geo.coordinates + entity: agent.keyword + boundaryType: entireIndex + boundaryIndexTitle: boundary* + boundaryGeoField: location + boundaryNameField: name + indexId: 90943e30-9a47-11e8-b64d-95841ca0b247 + boundaryIndexId: 0cd90abf-abe7-44c7-909a-f621bbbcfefc + rule_type_id: .geo-containment + schedule: + interval: 1h + Alerting_create_es_query_esql_rule_response: + summary: >- + The create rule API returns a JSON object that contains details about + the rule. + value: + id: e0d62360-78e8-11ee-9177-f7d404c8c945 + enabled: true + name: my Elasticsearch query ESQL rule + tags: [] + rule_type_id: .es-query + consumer: stackAlerts + schedule: + interval: 1d + actions: + - group: query matched + id: d0db1fe0-78d6-11ee-9177-f7d404c8c945 + params: + level: info + message: >- + Elasticsearch query rule '{{rule.name}}' is active: + + - Value: {{context.value}} - Conditions Met: + {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - + Timestamp: {{context.date}} - Link: {{context.link}} + connector_type_id: .server-log + frequency: + summary: false + notify_when: onActiveAlert + throttle: null + uuid: bfe370a3-531b-4855-bbe6-ad739f578844 + params: + searchType: esqlQuery + esqlQuery: + esql: >- + FROM kibana_sample_data_logs | keep bytes, clientip, host, + geo.dest | WHERE geo.dest != "GB" | stats sumbytes = sum(bytes) by + clientip, host | WHERE sumbytes > 5000 | sort sumbytes desc | + limit 10 + timeField: '@timestamp' + timeWindowSize: 1 + timeWindowUnit: d + size: 0 + thresholdComparator: '>' + threshold: + - 0 + excludeHitsFromPreviousRun": true, + aggType: count + groupBy: all + scheduled_task_id: e0d62360-78e8-11ee-9177-f7d404c8c945 + created_by: elastic + updated_by: elastic", + created_at: '2023-11-01T19:00:10.453Z' + updated_at: '2023-11-01T19:00:10.453Z' + api_key_owner: elastic + api_key_created_by_user: false + throttle: null + mute_all: false + notify_when: null + muted_alert_ids: [] + execution_status: + status: pending + last_execution_date: '2023-11-01T19:00:10.453Z' + revision: 0 + running: false + Alerting_create_es_query_rule_response: + summary: >- + The create rule API returns a JSON object that contains details about + the rule. + value: + id: 58148c70-407f-11ee-850e-c71febc4ca7f + enabled: true + name: my Elasticsearch query rule + tags: [] + rule_type_id: .es-query + consumer: alerts + schedule: + interval: 1d + actions: + - group: query matched + id: fdbece50-406c-11ee-850e-c71febc4ca7f + params: + level: info + message: >- + The system has detected {{alerts.new.count}} new, + {{alerts.ongoing.count}} ongoing, and {{alerts.recovered.count}} + recovered alerts. + connector_type_id: .server-log + frequency: + summary: true + notify_when: onThrottleInterval + throttle: 1d + uuid: 53f3c2a3-e5d0-4cfa-af3b-6f0881385e78 + - group: recovered + id: fdbece50-406c-11ee-850e-c71febc4ca7f + params: + level: info + message: Recovered + connector_type_id: .server-log + frequency: + summary: false + notify_when: onActionGroupChange + throttle: null + uuid: 2324e45b-c0df-45c7-9d70-4993e30be758 + params: + thresholdComparator: '>' + timeWindowSize: 1 + timeWindowUnit: d + threshold: + - 100 + size: 100 + timeField: '@timestamp' + index: + - kibana_sample_data_logs + esQuery: '"""{"query":{"match_all" : {}}}"""' + excludeHitsFromPreviousRun: true + aggType: count + groupBy: all + searchType: esQuery + scheduled_task_id: 58148c70-407f-11ee-850e-c71febc4ca7f + created_by: elastic + updated_by: elastic + created_at: '2023-08-22T00:03:38.263Z' + updated_at: '2023-08-22T00:03:38.263Z' + api_key_owner: elastic + api_key_created_by_user: false + throttle: null + mute_all: false + notify_when: null + muted_alert_ids: [] + execution_status: + status: pending + last_execution_date: '2023-08-22T00:03:38.263Z' + revision: 0 + running: false + Alerting_create_es_query_kql_rule_response: + summary: >- + The create rule API returns a JSON object that contains details about + the rule. + value: + id: 7bd506d0-2284-11ee-8fad-6101956ced88 + enabled: true + name: my Elasticsearch query KQL rule" + tags: [] + rule_type_id: .es-query + consumer: alerts + schedule: + interval: 1m + actions: [] + params: + searchConfiguration: + query: + query: '""geo.src : "US" ""' + language: kuery + index: 90943e30-9a47-11e8-b64d-95841ca0b247 + searchType: searchSource + timeWindowSize: 5 + timeWindowUnit: m + threshold: + - 1000 + thresholdComparator: '>' + size: 100 + aggType: count + groupBy: all + excludeHitsFromPreviousRun: true + created_by: elastic + updated_by: elastic + created_at: '2023-07-14T20:24:50.729Z' + updated_at: '2023-07-14T20:24:50.729Z' + api_key_owner: elastic + api_key_created_by_user: false + throttle: null + notify_when: null + mute_all: false + muted_alert_ids: [] + scheduled_task_id: 7bd506d0-2284-11ee-8fad-6101956ced88 + execution_status: + status: pending + last_execution_date: '2023-07-14T20:24:50.729Z' + revision: 0 + running: false + Alerting_create_index_threshold_rule_response: + summary: >- + The create rule API returns a JSON object that contains details about + the rule. + value: + actions: + - group: threshold met + id: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2 + uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d + connector_type_id: .server-log + frequency: + notify_when: onActionGroupChange + summary: false + throttle: null + params: + level: info + message: >- + Rule {{rule.name}} is active for group {{context.group} : + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date}} + alert_delay: + active: 3 + api_key_created_by_user: false + api_key_owner: elastic + consumer: alerts + created_at: '2022-06-08T17:20:31.632Z' + created_by: elastic + enabled: true + execution_status: + last_execution_date: '2022-06-08T17:20:31.632Z' + status: pending + id: 41893910-6bca-11eb-9e0d-85d233e3ee35 + muted_alert_ids: [] + mute_all: false + name: my rule + notify_when: null + params: + aggType: avg + termSize: 6 + thresholdComparator: '>' + timeWindowSize: 5 + timeWindowUnit: m + groupBy: top + threshold: + - 1000 + index: + - .test-index + timeField: '@timestamp' + aggField: sheet.version + termField: name.keyword + revision: 0 + rule_type_id: .index-threshold + running: false + schedule: + interval: 1m + scheduled_task_id: 425b0800-6bca-11eb-9e0d-85d233e3ee35 + tags: + - cpu + throttle: null + updated_at: '2022-06-08T17:20:31.632Z' + updated_by: elastic + Alerting_create_tracking_containment_rule_response: + summary: >- + The create rule API returns a JSON object that contains details about + the rule. + value: + id: b6883f9d-5f70-4758-a66e-369d7c26012f + name: my tracking rule + tags: [] + enabled: true + consumer: alerts + throttle: null + revision: 1 + running: false + schedule: + interval: 1h + params: + index: kibana_sample_data_logs + dateField: '@timestamp' + geoField: geo.coordinates + entity: agent.keyword + boundaryType: entireIndex + boundaryIndexTitle: boundary* + boundaryGeoField: location + boundaryNameField: name + indexId: 90943e30-9a47-11e8-b64d-95841ca0b247 + boundaryIndexId: 0cd90abf-abe7-44c7-909a-f621bbbcfefc + rule_type_id: .geo-containment + created_by: elastic + updated_by: elastic + created_at: '2024-02-14T19:52:55.920Z' + updated_at: '2024-02-15T03:24:32.574Z' + api_key_owner: elastic + notify_when: null + mute_all: false + muted_alert_ids: [] + scheduled_task_id: b6883f9d-5f70-4758-a66e-369d7c26012f + execution_status: + status: ok + last_execution_date: '2024-02-15T03:25:38.125Z' + last_duration: 74 + actions: [] + last_run: + alerts_count: + active: 0 + new: 0 + recovered: 0 + ignored: 0 + outcome_msg: null + outcome_order: 0 + outcome: succeeded + warning: null + next_run: '2024-02-15T03:26:38.033Z' + api_key_created_by_user: false + Alerting_get_rule_response: + summary: >- + The get rule API returns a JSON object that contains details about the + rule. + value: + id: 31697a40-7b36-11ed-aa79-f742c05329b2 + consumer: alerts + tags: + - cpu + name: my alert + enabled: true + throttle: null + schedule: + interval: 1m + params: + aggType: avg + termSize: 6 + thresholdComparator: '>' + timeWindowSize: 5 + timeWindowUnit: m + groupBy: top + threshold: + - 1000 + index: + - test-index + timeField: '@timestamp' + aggField: sheet.version + termField: name.keyword + revision: 1 + rule_type_id: .index-threshold + created_by: elastic + updated_by: elastic + created_at: '2022-12-13T22:33:41.163Z' + updated_at: '2022-12-13T22:33:41.163Z' + api_key_owner: elastic + notify_when: null + muted_alert_ids: [] + mute_all: false + scheduled_task_id: 31697a40-7b36-11ed-aa79-f742c05329b2 + execution_status: + status: ok + last_execution_date: '2022-12-13T22:33:44.388Z' + last_duration: 83 + actions: + - group: threshold met + id: 1007a0c0-7a6e-11ed-89d5-abec321c0def + uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + params: + level: info + message: >- + Rule {{rule.name}} is active for group {{context.group}}: + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date} + connector_type_id: .server-log + connector_type_id: .server-log + frequency: + throttle: null + summary: false + notify_when: onActionGroupChange + last_run: + alerts_count: + new: 0 + ignored: 0 + recovered: 0 + active: 0 + outcome_msg: null + warning: null + outcome: succeeded + next_run: '2022-12-13T22:34:44.314Z' + api_key_created_by_user: false + Alerting_update_rule_request: + summary: Update an index threshold rule. + value: + actions: + - frequency: + summary: false + notify_when: onActionGroupChange + group: threshold met + id: 96b668d0-a1b6-11ed-afdf-d39a49596974 + params: + level: info + message: >- + Rule {{rule.name}} is active for group {{context.group}}: + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date}} + params: + aggField: sheet.version + aggType: avg + index: + - .updated-index + groupBy: top + termField: name.keyword + termSize: 6 + threshold: + - 1000 + thresholdComparator: '>' + timeField: '@timestamp' + timeWindowSize: 5 + timeWindowUnit: m + name: new name + schedule: + interval: 1m + tags: [] + Alerting_update_rule_response: + summary: >- + The update rule API returns a JSON object that contains details about + the rule. + value: + id: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + consumer: alerts + tags: [] + name: new name + enabled: true + throttle: null + revision: 1 + running: false + schedule: + interval: 1m + params: + index: + - .updated-index + timeField: '@timestamp' + groupBy: top + aggType: avg + timeWindowSize: 5 + timeWindowUnit: m + thresholdComparator: '>' + threshold: + - 1000 + aggField: sheet.version + termField: name.keyword + termSize: 6 + api_key_owner: elastic + created_by: elastic + updated_by: elastic + rule_type_id: .index-threshold + scheduled_task_id: 4c5eda00-e74f-11ec-b72f-5b18752ff9ea + created_at: '2024-03-26T23:13:20.985Z' + updated_at: '2024-03-26T23:22:59.949Z' + mute_all: false + muted_alert_ids: [] + execution_status: + status: ok + last_execution_date: '2024-03-26T23:22:51.390Z' + last_duration: 52 + actions: + - group: threshold met + params: + level: info + message: >- + Rule {{rule.name}} is active for group {{context.group}}: + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date} + id: 96b668d0-a1b6-11ed-afdf-d39a49596974 + uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d + connector_type_id: .server-log + frequency: + summary: false + throttle: null + notify_when: onActionGroupChange + last_run: + alerts_count: + new: 0 + ignored: 0 + recovered: 0 + active: 0 + outcome_msg: null + warning: null + outcome: succeeded + next_run: '2024-03-26T23:23:51.316Z' + api_key_created_by_user: false + Alerting_find_rules_response: + summary: Retrieve information about a rule. + value: + page: 1 + total: 1 + per_page: 10 + data: + - id: 3583a470-74f6-11ed-9801-35303b735aef + consumer: alerts + tags: + - cpu + name: my alert + enabled: true + throttle: null + schedule: + interval: 1m + params: + aggType: avg + termSize: 6 + thresholdComparator: '>' + timeWindowSize: 5 + timeWindowUnit: m + groupBy: top + threshold: + - 1000 + index: + - test-index + timeField: '@timestamp' + aggField: sheet.version + termField: name.keyword + revision: 1 + rule_type_id: .index-threshold + created_by: elastic + updated_by: elastic + created_at: '2022-12-05T23:40:33.132Z' + updated_at: '2022-12-05T23:40:33.132Z' + api_key_owner: elastic + mute_all: false + muted_alert_ids: [] + scheduled_task_id: 3583a470-74f6-11ed-9801-35303b735aef + execution_status: + status: ok + last_execution_date: '2022-12-06T01:44:23.983Z' + last_duration: 48 + actions: + - id: 9dca3e00-74f5-11ed-9801-35303b735aef + group: threshold met + uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + params: + level: info + message: >- + Rule {{rule.name}} is active for group {{context.group}}: + + + - Value: {{context.value}} + + - Conditions Met: {{context.conditions}} over + {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} + + - Timestamp: {{context.date}} + connector_type_id: .server-log + frequency: + summary: false + notify_when: onActionGroupChange + throttle: null + last_run: + alerts_count: + new: 0 + ignored: 0 + recovered: 0 + active: 0 + outcome_msg: null + warning: null + outcome: succeeded + next_run: '2022-12-06T01:45:23.912Z' + api_key_created_by_user: false + Alerting_find_rules_response_conditional_action: + summary: Retrieve information about a rule that has conditional actions. + value: + page: 1 + total: 1 + per_page: 10 + data: + - id: 6107a8f0-f401-11ed-9f8e-399c75a2deeb + name: security_rule + consumer: siem + enabled: true + tags: [] + throttle: null + revision: 1 + running: false + schedule: + interval: 1m + params: + author: [] + description: A security threshold rule. + ruleId: an_internal_rule_id + falsePositives: [] + from: now-3660s + immutable: false + license: '' + outputIndex: '' + meta: + from: 1h + kibana_siem_app_url: https://localhost:5601/app/security + maxSignals: 100 + riskScore: 21 + riskScoreMapping: [] + severity: low + severityMapping: [] + threat: [] + to: now + references: [] + version: 1 + exceptionsList: [] + type: threshold + language: kuery + index: + - kibana_sample_data_logs + query: '*' + filters: [] + threshold: + field: + - bytes + value: 1 + cardinality: [] + rule_type_id: siem.thresholdRule + created_by: elastic + updated_by: elastic + created_at: '2023-05-16T15:50:28.358Z' + updated_at: '2023-05-16T20:25:42.559Z' + api_key_owner: elastic + notify_when: null + mute_all: false + muted_alert_ids: [] + scheduled_task_id: 6107a8f0-f401-11ed-9f8e-399c75a2deeb + execution_status: + status: ok + last_execution_date: '2023-05-16T20:26:49.590Z' + last_duration: 166 + actions: + - group: default + id: 49eae970-f401-11ed-9f8e-399c75a2deeb + params: + documents: + - rule_id: + '[object Object]': null + rule_name: + '[object Object]': null + alert_id: + '[object Object]': null + context_message: + '[object Object]': null + connector_type_id: .index + frequency: + summary: true + notify_when: onActiveAlert + throttle: null + uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + alerts_filter: + timeframe: + days: + - 7 + timezone: UTC + hours: + start: '08:00' + end: '17:00' + query: + kql: '' + filters: + - meta: + disabled: false + negate: false + alias: null + index: c4bdca79-e69e-4d80-82a1-e5192c621bea + key: client.geo.region_iso_code + field: client.geo.region_iso_code + params: + query: CA-QC + type: phrase + $state: + store: appState + query: + match_phrase: + client.geo.region_iso_code: CA-QC + last_run: + alerts_count: + new: 0 + ignored: 0 + recovered: 0 + active: 0 + outcome_msg: + - Rule execution completed successfully + outcome_order: 0 + warning: null + outcome: succeeded + next_run: '2023-05-16T20:27:49.507Z' + api_key_created_by_user: false + Alerting_get_health_response: + summary: Retrieve information about the health of the alerting framework. + value: + is_sufficiently_secure: true + has_permanent_encryption_key: true + alerting_framework_health: + decryption_health: + status: ok + timestamp: '2023-01-13T01:28:00.280Z' + execution_health: + status: ok + timestamp: '2023-01-13T01:28:00.280Z' + read_health: + status: ok + timestamp: '2023-01-13T01:28:00.280Z' + Alerting_get_rule_types_response: + summary: Retrieve rule types associated with Kibana machine learning features + value: + - id: xpack.ml.anomaly_detection_alert + name: Anomaly detection alert + category: management + producer: ml + alerts: + context: ml.anomaly-detection + mappings: + fieldMap: + kibana.alert.job_id: + type: keyword + array: false + required: true + kibana.alert.anomaly_score: + type: double + array: false + required: false + kibana.alert.is_interim: + type: boolean + array: false + required: false + kibana.alert.anomaly_timestamp: + type: date + array: false + required: false + kibana.alert.top_records: + type: object + array: true + required: false + dynamic: false + properties: + job_id: + type: keyword + record_score: + type: double + initial_record_score: + type: double + detector_index: + type: integer + is_interim: + type: boolean + timestamp: + type: date + partition_field_name: + type: keyword + partition_field_value: + type: keyword + over_field_name: + type: keyword + over_field_value: + type: keyword + by_field_name: + type: keyword + by_field_value: + type: keyword + function: + type: keyword + typical: + type: double + actual: + type: double + field_name: + type: keyword + kibana.alert.top_influencers: + type: object + array: true + required: false + dynamic: false + properties: + job_id: + type: keyword + influencer_field_name: + type: keyword + influencer_field_value: + type: keyword + influencer_score: + type: double + initial_influencer_score: + type: double + is_interim: + type: boolean + timestamp: + type: date + shouldWrite: true + enabled_in_license: true + recovery_action_group: + id: recovered + name: Recovered + action_groups: + - id: anomaly_score_match + name: Anomaly score matched the condition + - id: recovered + name: Recovered + default_action_group_id: anomaly_score_match + minimum_license_required: platinum + is_exportable: true + rule_task_timeout: 5m + action_variables: + context: + - name: timestamp + description: The bucket timestamp of the anomaly + - name: timestampIso8601 + description: The bucket time of the anomaly in ISO8601 format + - name: jobIds + description: List of job IDs that triggered the alert + - name: message + description: Alert info message + - name: isInterim + description: Indicate if top hits contain interim results + - name: score + description: Anomaly score at the time of the notification action + - name: topRecords + description: Top records + - name: topInfluencers + description: Top influencers + - name: anomalyExplorerUrl + description: URL to open in the Anomaly Explorer + useWithTripleBracesInTemplates: true + state: [] + params: [] + authorized_consumers: + alerts: + read: true + all: true + stackAlerts: + read: true + all: true + slo: + read: true + all: true + ml: + read: true + all: true + uptime: + read: true + all: true + infrastructure: + read: true + all: true + logs: + read: true + all: true + monitoring: + read: true + all: true + siem: + read: true + all: true + apm: + read: true + all: true + discover: + read: true + all: true + does_set_recovery_context: true + has_alerts_mappings: true + has_fields_for_a_a_d: false + - id: xpack.ml.anomaly_detection_jobs_health + name: Anomaly detection jobs health + category: management + producer: ml + enabled_in_license: true + recovery_action_group: + id: recovered + name: Recovered + action_groups: + - id: anomaly_detection_realtime_issue + name: Issue detected + - id: recovered + name: Recovered + default_action_group_id: anomaly_detection_realtime_issue + minimum_license_required: platinum + is_exportable: true + rule_task_timeout: 5m + action_variables: + context: + - name: results + description: Results of the rule execution + - name: message + description: Alert info message + state: [] + params: [] + authorized_consumers: + alerts: + read: true + all: true + stackAlerts: + read: true + all: true + slo: + read: true + all: true + ml: + read: true + all: true + uptime: + read: true + all: true + infrastructure: + read: true + all: true + logs: + read: true + all: true + monitoring: + read: true + all: true + siem: + read: true + all: true + apm: + read: true + all: true + discover: + read: true + all: true + does_set_recovery_context: true + has_alerts_mappings: false + has_fields_for_a_a_d: false + Cases_create_case_request: + summary: Create a security case that uses a Jira connector. + value: + description: A case description. + title: Case title 1 + tags: + - tag-1 + connector: + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + fields: + issueType: '10006' + priority: High + parent: null + settings: + syncAlerts: true + owner: cases + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value + Cases_create_case_response: + summary: >- + The create case API returns a JSON object that contains details about + the case. + value: + comments: [] + totalAlerts: 0 + id: 66b9aa00-94fa-11ea-9f74-e7e108796192 + version: WzUzMiwxXQ== + totalComment: 0 + title: Case title 1 + tags: + - tag 1 + assignees: [] + description: A case description. + settings: + syncAlerts: true + owner: cases + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2022-10-13T15:33:50.604Z' + created_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: null + updated_by: null + connector: + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + fields: + issueType: '10006' + parent: null + priority: High + external_service: null + Cases_update_case_request: + summary: Update the case description, tags, and connector. + value: + cases: + - id: a18b38a0-71b0-11ea-a0b2-c51ea50a58e2 + version: WzIzLDFd + connector: + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + fields: + issueType: '10006' + priority: null + parent: null + description: A case description. + tags: + - tag-1 + settings: + syncAlerts: true + customFields: + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + Cases_update_case_response: + summary: >- + This is an example response when the case description, tags, and + connector were updated. + value: + - id: 66b9aa00-94fa-11ea-9f74-e7e108796192 + version: WzU0OCwxXQ== + comments: [] + totalComment: 0 + totalAlerts: 0 + title: Case title 1 + tags: + - tag-1 + settings: + syncAlerts: true + owner: cases + description: A case description. + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2023-10-13T09:16:17.416Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: '2023-10-13T09:48:33.043Z' + updated_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + assignees: [] + category: null + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + connector: + id: 131d4448-abe0-4789-939d-8ef60680b498 + name: My connector + type: .jira + fields: + issueType: '10006' + parent: null + priority: null + external_service: + external_title: IS-4 + pushed_by: + full_name: null + email: null + username: elastic + external_url: https://hms.atlassian.net/browse/IS-4 + pushed_at: '2023-10-13T09:20:40.672Z' + connector_id: 05da469f-1fde-4058-99a3-91e4807e2de8 + external_id: '10003' + connector_name: Jira + Cases_find_case_response: + summary: >- + Retrieve the first five cases with the `tag-1` tag, in ascending order + by last update time. + value: + page: 1 + per_page: 5 + total: 1 + cases: + - id: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 + version: WzExMCwxXQ== + comments: [] + totalComment: 1 + totalAlerts: 0 + title: Case title + tags: + - tag-1 + description: Case description + settings: + syncAlerts: true + owner: cases + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2023-10-12T00:16:36.371Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: '2023-10-12T00:27:58.162Z' + updated_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + assignees: [] + category: null + connector: + id: none + name: none + type: .none + fields: null + external_service: null + count_open_cases: 1 + count_in_progress_cases: 0 + count_closed_cases: 0 + Cases_get_case_configuration_response: + summary: Get the case configuration. + value: + - id: 856ee650-6c82-11ee-a20a-6164169afa58 + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + defaultValue: Custom text field value. + label: my-text-field + required: false + type: text + owner: cases + created_at: '2024-07-01T17:07:17.767Z' + created_by: + username: elastic + email: null + full_name: null + updated_at: null + updated_by: null + connector: + id: none + name: none + type: .none + fields: null + mappings: [] + version: WzEyLDNd + error: null + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + type: .none + fields: null + name: none + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: Default text field value. + type: text + settings: + syncAlerts: false + description: A description of the template. + tags: + - Template tag 1 + Cases_set_case_configuration_request: + summary: >- + Set the closure type, custom fields, and default connector for Stack + Management cases. + value: + owner: cases + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 + Cases_set_case_configuration_response: + summary: This is an example response for case settings. + value: + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: false + type: text + defaultValue: My custom field default value. + templates: + - key: 505932fe-ee3a-4960-a661-c781b5acdb05 + name: template-1 + caseFields: + title: Default case title + tags: + - Default case tag + category: Default-category + description: A default description for cases. + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: A text field value for the template. + description: A description of the template. + tags: + - Template tag 1 + owner: cases + created_at: '2024-07-01T17:07:17.767Z' + created_by: + username: elastic + email: null, + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + updated_at: null + updated_by: null + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + mappings: + - source: title + target: summary + action_type: overwrite + - source: description + target: description + action_type: overwrite + - source: comments + target: comments + action_type: append + - source: tags + target: labels + action_type: overwrite + version: WzIwNzMsMV0= + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + Cases_update_case_configuration_request: + summary: Update the case settings. + value: + version: WzExOSw0XQ== + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + defaultValue: A new default value. + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle + Cases_update_case_configuration_response: + summary: This is an example response when the case configuration was updated. + value: + closure_type: close-by-user + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + label: my-text-field + required: true + type: text + defaultValue: A new default value. + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + label: my-toggle + required: false + type: toggle + owner: cases + created_at: '2024-07-01T17:07:17.767Z' + created_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + updated_at: '2024-07-19T00:52:42.401Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: 5e656730-e1ca-11ec-be9b-9b1838238ee6 + name: my-jira-connector + type: .jira + fields: null + mappings: + - source: title + target: summary + action_type: overwrite + - source: description + target: description + action_type: overwrite + - source: tags + target: labels + action_type: overwrite + - source: comments + target: comments + action_type: append + version: WzI2LDNd + error: null + id: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + templates: [] + Cases_get_reporters_response: + summary: A list of two users that opened cases + value: + - username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + - username: jdoe + full_name: Jane Doe + email: jdoe@example.com + profile_uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + Cases_get_tags_response: + summary: A list of tags that are used in cases + value: + - observability + - security + - tag 1 + - tag 2 + Cases_get_case_response: + summary: Retrieves information about a case including its comments. + value: + id: 31cdada0-02c1-11ed-85f2-4f7c222ca2fa + version: WzM2LDFd + comments: + - id: 2134c1d0-02c2-11ed-85f2-4f7c222ca2fa + version: WzM3LDFd + type: user + owner: cases + comment: A new comment + created_at: '2023-10-13T15:40:32.335Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + totalComment: 1 + totalAlerts: 0 + title: Case title 1 + tags: + - tag 1 + settings: + syncAlerts: true + owner: cases + category: null + customFields: + - type: text + key: d312efda-ec2b-42ec-9e2c-84981795c581 + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + description: A case description + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2023-10-13T15:33:50.604Z' + created_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: '2023-10-13T15:40:32.335Z' + updated_by: + full_name: null + email: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + assignees: + - uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + name: none + type: .none + fields: null + external_service: null + Cases_get_case_observability_response: + summary: >- + Retrieves information about an Observability case including its alerts + and comments. + value: + description: An Observability case description. + owner: observability + settings: + syncAlerts: false + tags: + - observability + - tag 1 + title: Observability case title 1 + category: null + customFields: [] + assignees: + - uid: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + connector: + id: none + type: .none + fields: null + name: none + severity: low + status: in-progress + duration: null + closed_at: null + closed_by: null + created_at: '2023-11-06T19:29:04.086Z' + created_by: + username: elastic + full_name: null + email: null + updated_at: '2023-11-06T19:47:55.662Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + external_service: null + id: c3ff7550-def1-4e90-b6bc-c9969a4a09b1 + version: WzI0NywyXQ== + totalComment: 1 + totalAlerts: 1 + comments: + - alertId: + - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + index: + - .internal.alerts-observability.logs.alerts-default-000001 + type: alert + rule: + id: 03e4eb87-62ca-4e5d-9570-3d7625e9669d + name: Observability rule + owner: observability + created_at: '2023-11-06T19:29:38.424Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: 59d438d0-79a9-4864-8d4b-e63adacebf6e + version: WzY3LDJd + - comment: The first comment. + type: user + owner: observability + created_at: '2023-11-06T19:29:57.812Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + id: d99342d3-3aa3-4b80-90ec-a702607604f5 + version: WzcyLDJd + Cases_get_case_alerts_response: + summary: Retrieves all alerts attached to a case + value: + - id: f6a7d0c3-d52d-432c-b2e6-447cd7fce04d + index: .alerts-observability.logs.alerts-default + attached_at: '2022-07-25T20:09:40.963Z' + Cases_add_comment_request: + summary: Adds a comment to a case. + value: + type: user + comment: A new comment. + owner: cases + Cases_add_comment_response: + summary: >- + The add comment to case API returns a JSON object that contains details + about the case and its comments. + value: + comments: + - id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + version: WzIwNDMxLDFd + type: user + owner: cases + comment: A new comment. + created_at: '2022-10-02T00:49:47.716Z' + created_by: + username: elastic + email: null + full_name: null + totalAlerts: 0 + id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 + version: WzIzMzgsMV0= + totalComment: 1 + title: Case title 1 + tags: + - tag 1 + description: A case description. + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: Field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: true + settings: + syncAlerts: false + owner: cases + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2022-03-24T00:37:03.906Z' + created_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: '2022-06-03T00:49:47.716Z' + updated_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + name: none + type: .none + fields: null + external_service: null + Cases_update_comment_request: + summary: Updates a comment of a case. + value: + id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + version: Wzk1LDFd + type: user + comment: An updated comment. + owner: cases + Cases_update_comment_response: + summary: >- + The add comment to case API returns a JSON object that contains details + about the case and its comments. + value: + comments: + - id: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + version: WzIwNjM3LDFd + comment: An updated comment. + type: user + owner: cases + created_at: '2023-10-24T00:37:10.832Z' + created_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: '2023-10-24T01:27:06.210Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + totalAlerts: 0 + id: 293f1bc0-74f6-11ea-b83a-553aecdb28b6 + version: WzIwNjM2LDFd + totalComment: 1 + title: Case title 1 + tags: + - tag 1 + description: A case description. + settings: + syncAlerts: false + owner: cases + category: null + assignees: [] + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My new field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: false + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2023-10-24T00:37:03.906Z' + created_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + status: open + updated_at: '2023-10-24T01:27:06.210Z' + updated_by: + username: elastic + full_name: null + email: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + connector: + id: none + name: none + type: .none + fields: null + external_service: null + Cases_get_comment_response: + summary: A single user comment retrieved from a case + value: + id: 8048b460-fe2b-11ec-b15d-779a7c8bbcc3 + version: WzIzLDFd + type: user + owner: cases + comment: A new comment + created_at: '2023-10-07T19:32:13.104Z' + created_by: + email: null + full_name: null + username: elastic + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + pushed_at: null + pushed_by: null + updated_at: null + updated_by: null + Cases_push_case_response: + summary: >- + The push case API returns a JSON object with details about the case and + the external service. + value: + id: b917f300-0ed9-11ed-bd18-65557fe66949 + version: WzE3NjgsM10= + comments: [] + totalComment: 0 + totalAlerts: 0 + description: A case description. + title: Case title 1 + tags: + - tag 1 + settings: + syncAlerts: true + owner: cases + duration: null + severity: low + closed_at: null + closed_by: null + created_at: '2022-07-29T00:59:39.444Z' + created_by: + username: elastic + email: null + full_name: null + status: open + updated_at: '2022-07-29T01:20:58.436Z' + updated_by: + username: elastic + full_name: null + email: null + connector: + id: 09f8c0b0-0eda-11ed-bd18-65557fe66949 + name: My connector + type: .jira + fields: + issueType: '10006' + parent: null + priority: Low + external_service: + pushed_at: '2022-07-29T01:20:58.436Z' + pushed_by: + username: elastic + full_name: null + email: null + connector_name: My connector + external_id: '71926' + external_title: ES-554 + external_url: https://cases.jira.com + connector_id: 09f8c0b0-0eda-11ed-bd18-65557fe66949 + Cases_find_case_activity_response: + summary: Retrieves all activity for a case + value: + page: 1 + perPage: 20 + total: 3 + userActions: + - id: b4cd0770-07c9-11ed-a5fd-47154cb8767e + action: create + comment_id: null + created_at: '2023-10-20T01:17:22.150Z' + created_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + owner: cases + payload: + assignees: [] + connector: + name: none + type: .none + fields: null + id: none + description: A case description. + tags: + - tag 1 + title: Case title 1 + owner: cases + settings: + syncAlerts: false + severity: low + status: open + category: null + customFields: + - key: d312efda-ec2b-42ec-9e2c-84981795c581 + type: text + value: My field value + - key: fcc6840d-eb14-42df-8aaf-232201a705ec + type: toggle + value: null + version: WzM1ODg4LDFd + type: create_case + - id: 57af14a0-03b1-11ed-920c-974bfa104448 + action: create + comment_id: 578608d0-03b1-11ed-920c-974bfa104448 + created_at: '2023-10-14T20:12:53.354Z' + created_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + owner: cases + payload: + comment: A new comment + owner: cases + type: user + version: WzM1ODg4LDFa + type: comment + - id: 573c6980-6123-11ed-aa41-81a0a61fe447 + action: add + comment_id: null + created_at: '2023-10-20T01:10:28.238Z' + created_by: + username: elastic + email: null + full_name: null + profile_uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + owner: cases + payload: + assignees: + uid: u_mGBROF_q5bmFCATbLXAcCwKa0k8JvONAwSruelyKA5E_0 + version: WzM1ODg4LDFb + type: assignees + Cases_find_connector_response: + summary: Retrieve information about the connectors and their settings. + value: + - id: 61787f53-4eee-4741-8df6-8fe84fa616f7 + actionTypeId: .jira + name: my-Jira + isMissingSecrets: false + config: + apiUrl: https://elastic.atlassian.net/ + projectKey: ES + isPreconfigured: false + isDeprecated: false + referencedByCount: 0 Connectors_create_email_connector_request: summary: Create an email connector. value: @@ -11104,14 +22101,6 @@ components: schema: $ref: '#/components/schemas/Connectors_action_response_properties' securitySchemes: - Saved_objects_basicAuth: - type: http - scheme: basic - Saved_objects_apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' Kibana_HTTP_APIs_apiKeyAuth: in: header name: Authorization @@ -11120,10 +22109,16 @@ components: scheme: basic type: http x-tagGroups: + - name: Alerting + tags: + - alerting - name: APM UI tags: - APM agent keys - APM annotations + - name: Cases + tags: + - cases - name: Connectors tags: - connectors diff --git a/package.json b/package.json index 79b44d5663831..2c2e3f5a21820 100644 --- a/package.json +++ b/package.json @@ -1696,7 +1696,7 @@ "json5": "^2.2.3", "jsondiffpatch": "0.4.1", "license-checker": "^25.0.1", - "listr2": "^8.2.1", + "listr2": "^8.2.3", "lmdb": "^2.9.2", "loader-utils": "^2.0.4", "marge": "^1.0.1", diff --git a/packages/core/base/core-base-common/src/plugins.ts b/packages/core/base/core-base-common/src/plugins.ts index 3fbd7bcefbffd..d51ba4a88b0dd 100644 --- a/packages/core/base/core-base-common/src/plugins.ts +++ b/packages/core/base/core-base-common/src/plugins.ts @@ -6,7 +6,7 @@ * Side Public License, v 1. */ -import { ConfigPath } from '@kbn/config'; +import type { ConfigPath } from '@kbn/config'; /** * Dedicated type for plugin name/id that is supposed to make Map/Set/Arrays diff --git a/packages/core/overlays/core-overlays-browser-internal/src/flyout/flyout_service.tsx b/packages/core/overlays/core-overlays-browser-internal/src/flyout/flyout_service.tsx index d93498f6c9bfc..7ab844789828b 100644 --- a/packages/core/overlays/core-overlays-browser-internal/src/flyout/flyout_service.tsx +++ b/packages/core/overlays/core-overlays-browser-internal/src/flyout/flyout_service.tsx @@ -8,7 +8,7 @@ /* eslint-disable max-classes-per-file */ -import { EuiFlyout } from '@elastic/eui'; +import { EuiFlyout, EuiFlyoutResizable } from '@elastic/eui'; import React from 'react'; import { render, unmountComponentAtNode } from 'react-dom'; import { Subject } from 'rxjs'; @@ -102,11 +102,26 @@ export class FlyoutService { } }; - render( - + const getWrapper = (children: JSX.Element) => { + return options?.isResizable ? ( + + {children} + + ) : ( - + {children} + ); + }; + + render( + + {getWrapper()} , this.targetDomElement ); diff --git a/packages/core/overlays/core-overlays-browser/src/flyout.ts b/packages/core/overlays/core-overlays-browser/src/flyout.ts index 23e86c08e4434..8903f48e198cd 100644 --- a/packages/core/overlays/core-overlays-browser/src/flyout.ts +++ b/packages/core/overlays/core-overlays-browser/src/flyout.ts @@ -5,7 +5,7 @@ * in compliance with, at your election, the Elastic License 2.0 or the Server * Side Public License, v 1. */ -import type { EuiFlyoutProps } from '@elastic/eui'; +import type { EuiFlyoutProps, EuiFlyoutResizableProps } from '@elastic/eui'; import type { MountPoint, OverlayRef } from '@kbn/core-mount-utils-browser'; /** @@ -28,10 +28,11 @@ export interface OverlayFlyoutStart { /** * @public */ -export type OverlayFlyoutOpenOptions = Omit & { +export type OverlayFlyoutOpenOptions = Omit & { /** * EuiFlyout onClose handler. * If provided the consumer is responsible for calling flyout.close() to close the flyout; */ onClose?: (flyout: OverlayRef) => void; + isResizable?: boolean; }; diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts index 35c8fc305d062..d61394acf9215 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_create.ts @@ -37,6 +37,7 @@ export const registerBulkCreateRoute = ( summary: `Create saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { query: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts index 0f7219386a07b..2a0867ed82382 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_delete.ts @@ -37,6 +37,7 @@ export const registerBulkDeleteRoute = ( summary: `Delete saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts index c54069c0aae5c..90be20c4aeaa5 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_get.ts @@ -37,6 +37,7 @@ export const registerBulkGetRoute = ( summary: `Get saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts index d59c5e096aa2e..fc446393e6c19 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_resolve.ts @@ -37,6 +37,9 @@ export const registerBulkResolveRoute = ( summary: `Resolve saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, + description: `Retrieve multiple Kibana saved objects by ID, using any legacy URL aliases if they exist. + Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved with the bulk resolve API using either its new ID or its old ID.`, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts index cd401ba4f2061..9d2dbf2297cc9 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/bulk_update.ts @@ -37,6 +37,7 @@ export const registerBulkUpdateRoute = ( summary: `Update saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { body: schema.arrayOf( diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts index 5fb3a2964c701..b9be159af9491 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/create.ts @@ -37,6 +37,7 @@ export const registerCreateRoute = ( summary: `Create a saved object`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts index eb01f092ba585..841cccf379dc0 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/delete.ts @@ -37,6 +37,7 @@ export const registerDeleteRoute = ( summary: `Delete a saved object`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts index ea2adb976d07f..79c4cdc2cd9bc 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/export.ts @@ -147,6 +147,8 @@ export const registerExportRoute = ( summary: `Export saved objects`, tags: ['oas-tag:saved objects'], access: 'public', + description: + 'Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. \nExported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. \nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.', }, validate: { body: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts index 525e80e7637b6..3d305b96f5f5a 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/find.ts @@ -41,6 +41,7 @@ export const registerFindRoute = ( summary: `Search for saved objects`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { query: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts index 5d0ffb9a11964..7c63519dc3752 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/get.ts @@ -37,6 +37,7 @@ export const registerGetRoute = ( summary: `Get a saved object`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts index 69042c7ce6a31..11f2223d936ca 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/import.ts @@ -39,6 +39,8 @@ export const registerImportRoute = ( summary: `Import saved objects`, tags: ['oas-tag:saved objects'], access: 'public', + description: + 'Create sets of Kibana saved objects from a file created by the export API. Saved objects can only be imported into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.', body: { maxBytes: maxImportPayloadBytes, output: 'stream', diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts index 2139deda867dc..0994a4cb88c3e 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve.ts @@ -33,6 +33,9 @@ export const registerResolveRoute = ( summary: `Resolve a saved object`, tags: ['oas-tag:saved objects'], access, + deprecated: true, + description: `Retrieve a single Kibana saved object by ID, using any legacy URL alias if it exists. + Under certain circumstances, when Kibana is upgraded, saved object migrations may necessitate regenerating some object IDs to enable new features. When an object's ID is regenerated, a legacy URL alias is created for that object, preserving its old ID. In such a scenario, that object can be retrieved with the resolve API using either its new ID or its old ID.`, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts index e9020b200b048..b77ead750be71 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/resolve_import_errors.ts @@ -40,6 +40,8 @@ export const registerResolveImportErrorsRoute = ( summary: `Resolve import errors`, tags: ['oas-tag:saved objects'], access: 'public', + description: + 'To resolve errors from the import objects API, you can retry certain saved objects, overwrite specific saved objects, and change references to different saved objects', body: { maxBytes: maxImportPayloadBytes, output: 'stream', diff --git a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts index c0b5b9ae26d3b..b2dceac69bbc4 100644 --- a/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts +++ b/packages/core/saved-objects/core-saved-objects-server-internal/src/routes/update.ts @@ -38,6 +38,7 @@ export const registerUpdateRoute = ( summary: `Update a saved object`, tags: ['oas-tag:saved objects'], access, + deprecated: true, }, validate: { params: schema.object({ diff --git a/packages/core/saved-objects/docs/openapi/README.md b/packages/core/saved-objects/docs/openapi/README.md index a64b4289935f8..ec5070ff9b09e 100644 --- a/packages/core/saved-objects/docs/openapi/README.md +++ b/packages/core/saved-objects/docs/openapi/README.md @@ -14,14 +14,8 @@ A guide about the openApi specification can be found at [https://swagger.io/docs To validate and bundle the docs, you can use [Redocly](https://redocly.com/docs/cli/) and [Swagger/OpenAPI CLI](https://www.npmjs.com/package/swagger-cli). -For example, run the following commands from the `packages/core/saved-objects/docs/openapi/` folder: -```bash -npx swagger-cli validate entrypoint.yaml -npx swagger-cli validate entrypoint-serverless.yaml -``` - -Then you can generate the `bundled` files by running the following commands: +Generate the `bundled` files by running the following commands: ```bash npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml @@ -30,9 +24,4 @@ npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.y npx @redocly/cli bundle entrypoint_serverless.yaml --output bundled_serverless.json --ext json ``` -After generating the json bundle ensure that it is also valid by running the following command: - -```bash -npx @redocly/cli lint bundled.json -npx @redocly/cli lint bundled_serverless.json -``` +Then join these files with the rest of the Kibana APIs per `oas_docs/README.md` diff --git a/packages/core/saved-objects/docs/openapi/bundled.json b/packages/core/saved-objects/docs/openapi/bundled.json index 32e429e0d9c51..06010e44e1a19 100644 --- a/packages/core/saved-objects/docs/openapi/bundled.json +++ b/packages/core/saved-objects/docs/openapi/bundled.json @@ -17,14 +17,6 @@ "url": "/" } ], - "security": [ - { - "basicAuth": [] - }, - { - "apiKeyAuth": [] - } - ], "tags": [ { "name": "saved objects", @@ -385,9 +377,9 @@ }, "/api/saved_objects/_export": { "post": { - "summary": "Export saved objects in the default space", + "summary": "Export saved objects", "operationId": "exportSavedObjectsDefault", - "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nExported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ "saved objects" ], @@ -644,7 +636,7 @@ }, "/api/saved_objects/_import": { "post": { - "summary": "Import saved objects in the default space", + "summary": "Import saved objects", "operationId": "importSavedObjectsDefault", "description": "Create sets of Kibana saved objects from a file created by the export API.\nSaved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ @@ -1208,18 +1200,6 @@ } }, "components": { - "securitySchemes": { - "basicAuth": { - "type": "http", - "scheme": "basic" - }, - "apiKeyAuth": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "e.g. Authorization: ApiKey base64AccessApiKey" - } - }, "examples": { "key_rotation_response": { "summary": "Encryption key rotation using default parameters.", diff --git a/packages/core/saved-objects/docs/openapi/bundled.yaml b/packages/core/saved-objects/docs/openapi/bundled.yaml index 53874b9a469cf..d616131ac494e 100644 --- a/packages/core/saved-objects/docs/openapi/bundled.yaml +++ b/packages/core/saved-objects/docs/openapi/bundled.yaml @@ -10,9 +10,6 @@ info: url: https://www.elastic.co/licensing/elastic-license servers: - url: / -security: - - basicAuth: [] - - apiKeyAuth: [] tags: - name: saved objects description: Manage Kibana saved objects, including dashboards, visualizations, and more. @@ -253,12 +250,14 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_export: post: - summary: Export saved objects in the default space + summary: Export saved objects operationId: exportSavedObjectsDefault description: | Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. + Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. @@ -416,7 +415,7 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_import: post: - summary: Import saved objects in the default space + summary: Import saved objects operationId: importSavedObjectsDefault description: | Create sets of Kibana saved objects from a file created by the export API. @@ -798,15 +797,6 @@ paths: schema: $ref: '#/components/schemas/400_response' components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' examples: key_rotation_response: summary: Encryption key rotation using default parameters. diff --git a/packages/core/saved-objects/docs/openapi/bundled_serverless.json b/packages/core/saved-objects/docs/openapi/bundled_serverless.json index 9fdd5303eaf46..6bc767088bbec 100644 --- a/packages/core/saved-objects/docs/openapi/bundled_serverless.json +++ b/packages/core/saved-objects/docs/openapi/bundled_serverless.json @@ -22,11 +22,6 @@ } } ], - "security": [ - { - "apiKeyAuth": [] - } - ], "tags": [ { "name": "saved objects", @@ -36,9 +31,9 @@ "paths": { "/api/saved_objects/_export": { "post": { - "summary": "Export saved objects in the default space", + "summary": "Export saved objects", "operationId": "exportSavedObjectsDefault", - "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", + "description": "Retrieve sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nExported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ "saved objects" ], @@ -126,7 +121,7 @@ }, "/api/saved_objects/_import": { "post": { - "summary": "Import saved objects in the default space", + "summary": "Import saved objects", "operationId": "importSavedObjectsDefault", "description": "Create sets of Kibana saved objects from a file created by the export API.\nSaved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", "tags": [ @@ -236,147 +231,9 @@ } } } - }, - "/s/{spaceId}/api/saved_objects/_export": { - "post": { - "summary": "Export saved objects", - "operationId": "exportSavedObjects", - "description": "Retrieves sets of saved objects that you want to import into Kibana.\nYou must include `type` or `objects` in the request body.\n\nNOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", - "tags": [ - "saved objects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/export_objects_request" - }, - "examples": { - "exportSavedObjectsRequest": { - "$ref": "#/components/examples/export_objects_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/x-ndjson": { - "schema": { - "type": "object", - "additionalProperties": true - }, - "examples": { - "exportSavedObjectsResponse": { - "$ref": "#/components/examples/export_objects_response" - } - } - } - } - }, - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/400_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/saved_objects/_import": { - "post": { - "summary": "Import saved objects", - "operationId": "importSavedObjects", - "description": "Creates sets of Kibana saved objects from a file created by the export API.\nSaved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana.\n\nThis functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.\n", - "tags": [ - "saved objects" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/compatibility_mode" - }, - { - "$ref": "#/components/parameters/create_new_copies" - }, - { - "$ref": "#/components/parameters/overwrite" - } - ], - "requestBody": { - "required": true, - "content": { - "multipart/form-data": { - "schema": { - "$ref": "#/components/schemas/import_objects_request" - }, - "examples": { - "importObjectsRequest": { - "$ref": "#/components/examples/import_objects_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/200_import_objects_response" - }, - "examples": { - "importObjectsResponse": { - "$ref": "#/components/examples/import_objects_response" - } - } - } - } - }, - "400": { - "description": "Bad request.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/400_response" - } - } - } - } - } - } } }, "components": { - "securitySchemes": { - "apiKeyAuth": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "Serverless APIs support only key-based authentication. You must create an API key and use the encoded value in the request header. For example: 'Authorization: ApiKey base64AccessApiKey'.\n" - } - }, "parameters": { "kbn_xsrf": { "schema": { @@ -386,43 +243,6 @@ "name": "kbn-xsrf", "description": "Cross-site request forgery protection", "required": true - }, - "space_id": { - "in": "path", - "name": "spaceId", - "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", - "required": true, - "schema": { - "type": "string", - "example": "default" - } - }, - "compatibility_mode": { - "in": "query", - "name": "compatibilityMode", - "schema": { - "type": "boolean" - }, - "required": false, - "description": "Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option.\n" - }, - "create_new_copies": { - "in": "query", - "name": "createNewCopies", - "schema": { - "type": "boolean" - }, - "required": false, - "description": "Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options.\n" - }, - "overwrite": { - "in": "query", - "name": "overwrite", - "schema": { - "type": "boolean" - }, - "required": false, - "description": "Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option.\n" } }, "examples": { @@ -527,76 +347,6 @@ ] } } - }, - "export_objects_request": { - "type": "object", - "properties": { - "excludeExportDetails": { - "description": "Do not add export details entry at the end of the stream.", - "type": "boolean", - "default": false - }, - "includeReferencesDeep": { - "description": "Includes all of the referenced objects in the exported objects.", - "type": "boolean" - }, - "objects": { - "description": "A list of objects to export.", - "type": "array", - "items": { - "type": "object" - } - }, - "type": { - "description": "The saved object types to include in the export. Use `*` to export all the types.", - "oneOf": [ - { - "type": "string" - }, - { - "type": "array", - "items": { - "type": "string" - } - } - ] - } - } - }, - "import_objects_request": { - "type": "object", - "properties": { - "file": { - "description": "A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported.\n" - } - } - }, - "200_import_objects_response": { - "type": "object", - "properties": { - "success": { - "type": "boolean", - "description": "Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties.\n" - }, - "successCount": { - "type": "integer", - "description": "Indicates the number of successfully imported records." - }, - "errors": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Indicates the import was unsuccessful and specifies the objects that failed to import.\n\nNOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error.\n" - }, - "successResults": { - "type": "array", - "items": { - "type": "object" - }, - "description": "Indicates the objects that are successfully imported, with any metadata if applicable.\n\nNOTE: Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute.\n" - } - } } } } diff --git a/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml b/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml index cf07e2b72669c..a8dc8b30fffe2 100644 --- a/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml +++ b/packages/core/saved-objects/docs/openapi/bundled_serverless.yaml @@ -13,20 +13,20 @@ servers: variables: kibana_url: default: localhost:5601 -security: - - apiKeyAuth: [] tags: - name: saved objects description: Manage Kibana saved objects, including dashboards, visualizations, and more. paths: /api/saved_objects/_export: post: - summary: Export saved objects in the default space + summary: Export saved objects operationId: exportSavedObjectsDefault description: | Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. + Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. @@ -82,7 +82,7 @@ paths: $ref: '#/components/schemas/400_response' /api/saved_objects/_import: post: - summary: Import saved objects in the default space + summary: Import saved objects operationId: importSavedObjectsDefault description: | Create sets of Kibana saved objects from a file created by the export API. @@ -167,98 +167,7 @@ paths: application/json: schema: $ref: '#/components/schemas/400_response' - /s/{spaceId}/api/saved_objects/_export: - post: - summary: Export saved objects - operationId: exportSavedObjects - description: | - Retrieves sets of saved objects that you want to import into Kibana. - You must include `type` or `objects` in the request body. - - NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. - - This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - tags: - - saved objects - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/export_objects_request' - examples: - exportSavedObjectsRequest: - $ref: '#/components/examples/export_objects_request' - responses: - '200': - description: Indicates a successful call. - content: - application/x-ndjson: - schema: - type: object - additionalProperties: true - examples: - exportSavedObjectsResponse: - $ref: '#/components/examples/export_objects_response' - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/400_response' - /s/{spaceId}/api/saved_objects/_import: - post: - summary: Import saved objects - operationId: importSavedObjects - description: | - Creates sets of Kibana saved objects from a file created by the export API. - Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. - - This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - tags: - - saved objects - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/compatibility_mode' - - $ref: '#/components/parameters/create_new_copies' - - $ref: '#/components/parameters/overwrite' - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '#/components/schemas/import_objects_request' - examples: - importObjectsRequest: - $ref: '#/components/examples/import_objects_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/200_import_objects_response' - examples: - importObjectsResponse: - $ref: '#/components/examples/import_objects_response' - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '#/components/schemas/400_response' components: - securitySchemes: - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: | - Serverless APIs support only key-based authentication. You must create an API key and use the encoded value in the request header. For example: 'Authorization: ApiKey base64AccessApiKey'. parameters: kbn_xsrf: schema: @@ -267,38 +176,6 @@ components: name: kbn-xsrf description: Cross-site request forgery protection required: true - space_id: - in: path - name: spaceId - description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - required: true - schema: - type: string - example: default - compatibility_mode: - in: query - name: compatibilityMode - schema: - type: boolean - required: false - description: | - Applies various adjustments to the saved objects that are being imported to maintain compatibility between different Kibana versions. Use this option only if you encounter issues with imported saved objects. NOTE: This option cannot be used with the `createNewCopies` option. - create_new_copies: - in: query - name: createNewCopies - schema: - type: boolean - required: false - description: | - Creates copies of saved objects, regenerates each object ID, and resets the origin. When used, potential conflict errors are avoided. NOTE: This option cannot be used with the `overwrite` and `compatibilityMode` options. - overwrite: - in: query - name: overwrite - schema: - type: boolean - required: false - description: | - Overwrites saved objects when they already exist. When used, potential conflict errors are automatically resolved by overwriting the destination object. NOTE: This option cannot be used with the `createNewCopies` option. examples: export_objects_request: summary: Export a specific saved object. @@ -370,57 +247,3 @@ components: type: integer enum: - 400 - export_objects_request: - type: object - properties: - excludeExportDetails: - description: Do not add export details entry at the end of the stream. - type: boolean - default: false - includeReferencesDeep: - description: Includes all of the referenced objects in the exported objects. - type: boolean - objects: - description: A list of objects to export. - type: array - items: - type: object - type: - description: The saved object types to include in the export. Use `*` to export all the types. - oneOf: - - type: string - - type: array - items: - type: string - import_objects_request: - type: object - properties: - file: - description: | - A file exported using the export API. NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be included in this file. Similarly, the `savedObjects.maxImportPayloadBytes` setting limits the overall size of the file that can be imported. - 200_import_objects_response: - type: object - properties: - success: - type: boolean - description: | - Indicates when the import was successfully completed. When set to false, some objects may not have been created. For additional information, refer to the `errors` and `successResults` properties. - successCount: - type: integer - description: Indicates the number of successfully imported records. - errors: - type: array - items: - type: object - description: | - Indicates the import was unsuccessful and specifies the objects that failed to import. - - NOTE: One object may result in multiple errors, which requires separate steps to resolve. For instance, a `missing_references` error and conflict error. - successResults: - type: array - items: - type: object - description: | - Indicates the objects that are successfully imported, with any metadata if applicable. - - NOTE: Objects are created only when all resolvable errors are addressed, including conflicts and missing references. If objects are created as new copies, each entry in the `successResults` array includes a `destinationId` attribute. diff --git a/packages/core/saved-objects/docs/openapi/entrypoint.yaml b/packages/core/saved-objects/docs/openapi/entrypoint.yaml index 9fbd1f0ab70cb..ee20a72801647 100644 --- a/packages/core/saved-objects/docs/openapi/entrypoint.yaml +++ b/packages/core/saved-objects/docs/openapi/entrypoint.yaml @@ -41,16 +41,16 @@ paths: $ref: 'paths/api@saved_objects@{type}@{id}.yaml' '/api/saved_objects/resolve/{type}/{id}': $ref: 'paths/api@saved_objects@resolve@{type}@{id}.yaml' -components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' -security: - - basicAuth: [] - - apiKeyAuth: [] +# components: +# securitySchemes: +# basicAuth: +# type: http +# scheme: basic +# apiKeyAuth: +# type: apiKey +# in: header +# name: Authorization +# description: 'e.g. Authorization: ApiKey base64AccessApiKey' +# security: +# - basicAuth: [] +# - apiKeyAuth: [] diff --git a/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml b/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml index b9500ccdbc570..ab3dcacf9a39d 100644 --- a/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml +++ b/packages/core/saved-objects/docs/openapi/entrypoint_serverless.yaml @@ -21,19 +21,15 @@ paths: $ref: 'paths/api@saved_objects@_export.yaml' '/api/saved_objects/_import': $ref: 'paths/api@saved_objects@_import.yaml' - '/s/{spaceId}/api/saved_objects/_export': - $ref: 'paths/s@{spaceid}@api@saved_objects@_export.yaml' - '/s/{spaceId}/api/saved_objects/_import': - $ref: 'paths/s@{spaceid}@api@saved_objects@_import.yaml' -components: - securitySchemes: - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: > - Serverless APIs support only key-based authentication. - You must create an API key and use the encoded value in the request header. - For example: 'Authorization: ApiKey base64AccessApiKey'. -security: - - apiKeyAuth: [] +# components: +# securitySchemes: +# apiKeyAuth: +# type: apiKey +# in: header +# name: Authorization +# description: > +# Serverless APIs support only key-based authentication. +# You must create an API key and use the encoded value in the request header. +# For example: 'Authorization: ApiKey base64AccessApiKey'. +# security: +# - apiKeyAuth: [] diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml index 6b21922a0cabb..93224e4d243b3 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_export.yaml @@ -1,10 +1,12 @@ post: - summary: Export saved objects in the default space + summary: Export saved objects operationId: exportSavedObjectsDefault description: | Retrieve sets of saved objects that you want to import into Kibana. You must include `type` or `objects` in the request body. + Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. + NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. diff --git a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml index 6d61af2f85147..12453a29ce78b 100644 --- a/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml +++ b/packages/core/saved-objects/docs/openapi/paths/api@saved_objects@_import.yaml @@ -1,5 +1,5 @@ post: - summary: Import saved objects in the default space + summary: Import saved objects operationId: importSavedObjectsDefault description: | Create sets of Kibana saved objects from a file created by the export API. diff --git a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml deleted file mode 100644 index 914c872ec05e8..0000000000000 --- a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_export.yaml +++ /dev/null @@ -1,41 +0,0 @@ -post: - summary: Export saved objects - operationId: exportSavedObjects - description: | - Retrieves sets of saved objects that you want to import into Kibana. - You must include `type` or `objects` in the request body. - - NOTE: The `savedObjects.maxImportExportSize` configuration setting limits the number of saved objects which may be exported. - - This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - tags: - - saved objects - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/space_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - $ref: '../components/schemas/export_objects_request.yaml' - examples: - exportSavedObjectsRequest: - $ref: '../components/examples/export_objects_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/x-ndjson: - schema: - type: object - additionalProperties: true - examples: - exportSavedObjectsResponse: - $ref: '../components/examples/export_objects_response.yaml' - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '../components/schemas/400_response.yaml' diff --git a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml b/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml deleted file mode 100644 index eac1b3810e0fd..0000000000000 --- a/packages/core/saved-objects/docs/openapi/paths/s@{spaceid}@api@saved_objects@_import.yaml +++ /dev/null @@ -1,41 +0,0 @@ -post: - summary: Import saved objects - operationId: importSavedObjects - description: | - Creates sets of Kibana saved objects from a file created by the export API. - Saved objects can be imported only into the same version, a newer minor on the same major, or the next major. Exported saved objects are not backwards compatible and cannot be imported into an older version of Kibana. - - This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features. - tags: - - saved objects - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/compatibility_mode.yaml' - - $ref: '../components/parameters/create_new_copies.yaml' - - $ref: '../components/parameters/overwrite.yaml' - requestBody: - required: true - content: - multipart/form-data: - schema: - $ref: '../components/schemas/import_objects_request.yaml' - examples: - importObjectsRequest: - $ref: '../components/examples/import_objects_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/200_import_objects_response.yaml' - examples: - importObjectsResponse: - $ref: '../components/examples/import_objects_response.yaml' - '400': - description: Bad request. - content: - application/json: - schema: - $ref: '../components/schemas/400_response.yaml' diff --git a/packages/kbn-apm-config-loader/kibana.jsonc b/packages/kbn-apm-config-loader/kibana.jsonc index e9d06f3539492..32c994307eb6f 100644 --- a/packages/kbn-apm-config-loader/kibana.jsonc +++ b/packages/kbn-apm-config-loader/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-server", "id": "@kbn/apm-config-loader", "owner": ["@elastic/kibana-core", "@vigneshshanmugam"] } diff --git a/packages/kbn-cli-dev-mode/kibana.jsonc b/packages/kbn-cli-dev-mode/kibana.jsonc index 3c55d047b0efc..fcacb342273f5 100644 --- a/packages/kbn-cli-dev-mode/kibana.jsonc +++ b/packages/kbn-cli-dev-mode/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-server", "id": "@kbn/cli-dev-mode", "devOnly": true, "owner": "@elastic/kibana-operations" diff --git a/packages/kbn-config/kibana.jsonc b/packages/kbn-config/kibana.jsonc index c6b4d1dc742c7..f16969225e90c 100644 --- a/packages/kbn-config/kibana.jsonc +++ b/packages/kbn-config/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-server", "id": "@kbn/config", "owner": "@elastic/kibana-core" } diff --git a/packages/kbn-docs-utils/kibana.jsonc b/packages/kbn-docs-utils/kibana.jsonc index 9700d3341a77a..b7aca4927aef8 100644 --- a/packages/kbn-docs-utils/kibana.jsonc +++ b/packages/kbn-docs-utils/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-server", "id": "@kbn/docs-utils", "devOnly": true, "owner": "@elastic/kibana-operations" diff --git a/packages/kbn-esql-utils/index.ts b/packages/kbn-esql-utils/index.ts index ffb424ebcf0ae..b3d8698ea7075 100644 --- a/packages/kbn-esql-utils/index.ts +++ b/packages/kbn-esql-utils/index.ts @@ -20,6 +20,7 @@ export { getESQLQueryColumns, getESQLQueryColumnsRaw, getESQLResults, + formatESQLColumns, getTimeFieldFromESQLQuery, getStartEndParams, hasStartEndParams, diff --git a/packages/kbn-esql-utils/src/index.ts b/packages/kbn-esql-utils/src/index.ts index 5ac459b7564b8..d0b10ad486599 100644 --- a/packages/kbn-esql-utils/src/index.ts +++ b/packages/kbn-esql-utils/src/index.ts @@ -22,6 +22,7 @@ export { getESQLQueryColumns, getESQLQueryColumnsRaw, getESQLResults, + formatESQLColumns, getStartEndParams, hasStartEndParams, } from './utils/run_query'; diff --git a/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/namespace_components.ts b/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/namespace_components.ts index 01ef116082fe1..76b144ef0804d 100644 --- a/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/namespace_components.ts +++ b/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/namespace_components.ts @@ -10,6 +10,7 @@ import { extractByJsonPointer } from '../../../utils/extract_by_json_pointer'; import { isPlainObjectType } from '../../../utils/is_plain_object_type'; import { parseRef } from '../../../utils/parse_ref'; import { DocumentNodeProcessor } from './types/document_node_processor'; +import { isLocalRef } from './utils/is_local_ref'; /** * Creates a node processor to prefix possibly conflicting components and security requirements @@ -58,6 +59,23 @@ export function createNamespaceComponentsProcessor(pointer: string): DocumentNod // `components.securitySchemes`. It means items in `security` implicitly reference // `components.securitySchemes` items which should be handled. onNodeLeave(node, context) { + // Handle mappings + if (context.parentKey === 'mapping' && isPlainObjectType(node)) { + for (const key of Object.keys(node)) { + const maybeRef = node[key]; + + if (typeof maybeRef !== 'string' || !isLocalRef(maybeRef)) { + throw new Error( + `Expected mappings to have local references but got "${maybeRef}" in ${JSON.stringify( + node + )}` + ); + } + + node[key] = decorateRefBaseName(maybeRef, namespace); + } + } + if ('security' in node && Array.isArray(node.security)) { for (const securityRequirements of node.security) { prefixObjectKeys(securityRequirements); diff --git a/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/utils/is_local_ref.ts b/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/utils/is_local_ref.ts new file mode 100644 index 0000000000000..8e3caa8e9deb8 --- /dev/null +++ b/packages/kbn-openapi-bundler/src/bundler/process_document/document_processors/utils/is_local_ref.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +export function isLocalRef(ref: string): boolean { + return ref.startsWith('#/'); +} diff --git a/packages/kbn-openapi-bundler/src/openapi_merger.ts b/packages/kbn-openapi-bundler/src/openapi_merger.ts index 773edb816c472..a7ac3c3492dfe 100644 --- a/packages/kbn-openapi-bundler/src/openapi_merger.ts +++ b/packages/kbn-openapi-bundler/src/openapi_merger.ts @@ -22,9 +22,6 @@ export interface MergerConfig { outputFilePath: string; options?: { mergedSpecInfo?: Partial; - conflictsResolution?: { - prependComponentsWith: 'title'; - }; }; } diff --git a/packages/kbn-openapi-bundler/src/utils/write_documents.ts b/packages/kbn-openapi-bundler/src/utils/write_documents.ts index 40311bc7d61e1..f0834ebb5ca00 100644 --- a/packages/kbn-openapi-bundler/src/utils/write_documents.ts +++ b/packages/kbn-openapi-bundler/src/utils/write_documents.ts @@ -45,5 +45,5 @@ function getVersionedOutputFilePath(outputFilePath: string, version: string): st const filename = basename(outputFilePath); - return outputFilePath.replace(filename, `${version}-${filename}`); + return outputFilePath.replace(filename, `${version}_${filename}`); } diff --git a/packages/kbn-openapi-bundler/tests/merger/merging_specs_with_conflicting_components.test.ts b/packages/kbn-openapi-bundler/tests/merger/merging_specs_with_conflicting_components.test.ts index c77d2a08a644a..edf2b44725acf 100644 --- a/packages/kbn-openapi-bundler/tests/merger/merging_specs_with_conflicting_components.test.ts +++ b/packages/kbn-openapi-bundler/tests/merger/merging_specs_with_conflicting_components.test.ts @@ -708,4 +708,89 @@ describe('OpenAPI Merger - merging specs with conflicting components', () => { Spec2_SomeCallback: expect.anything(), }); }); + + it('prefixes discriminator mapping local references', async () => { + const spec1 = createOASDocument({ + info: { + title: 'Spec1', + version: '2023-10-31', + }, + paths: { + '/api/some_api': { + get: { + responses: { + '200': { + description: 'Successful response', + content: { + 'application/json': { + schema: { + oneOf: [ + { $ref: '#/components/schemas/Component1' }, + { $ref: '#/components/schemas/Component2' }, + ], + discriminator: { + propertyName: 'commonProp', + mapping: { + component1: '#/components/schemas/Component1', + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + components: { + schemas: { + Component1: { + type: 'object', + properties: { + commonProp: { + type: 'string', + }, + extraProp1: { + type: 'boolean', + }, + }, + }, + Component2: { + type: 'object', + properties: { + commonProp: { + type: 'string', + }, + extraProp2: { + type: 'integer', + }, + }, + }, + }, + }, + }); + + const [mergedSpec] = Object.values( + await mergeSpecs({ + 1: spec1, + }) + ); + + expect(mergedSpec.paths['/api/some_api']?.get?.responses['200']).toMatchObject({ + content: { + 'application/json; Elastic-Api-Version=2023-10-31': { + schema: expect.objectContaining({ + discriminator: expect.objectContaining({ + mapping: { + component1: '#/components/schemas/Spec1_Component1', + }, + }), + }), + }, + }, + }); + expect(mergedSpec.components?.schemas).toMatchObject({ + Spec1_Component1: expect.anything(), + }); + }); }); diff --git a/packages/kbn-plugin-check/kibana.jsonc b/packages/kbn-plugin-check/kibana.jsonc index 5081138fe5e2a..1f14120b75ba9 100644 --- a/packages/kbn-plugin-check/kibana.jsonc +++ b/packages/kbn-plugin-check/kibana.jsonc @@ -1,5 +1,5 @@ { - "type": "shared-common", + "type": "shared-server", "id": "@kbn/plugin-check", "owner": "@elastic/appex-sharedux" } diff --git a/packages/shared-ux/modal/tabbed/src/context/index.tsx b/packages/shared-ux/modal/tabbed/src/context/index.tsx index 943b67f711028..938801c283813 100644 --- a/packages/shared-ux/modal/tabbed/src/context/index.tsx +++ b/packages/shared-ux/modal/tabbed/src/context/index.tsx @@ -26,7 +26,8 @@ interface IDispatchAction { export type IDispatchFunction = Dispatch; export interface IMetaState { - selectedTabId: string | null; + defaultSelectedTabId: string; + selectedTabId: string; } type IReducer = (state: S, action: IDispatchAction) => S; @@ -52,7 +53,8 @@ const createStateContext = once( {}, @@ -104,6 +106,7 @@ export function ModalContextProvider({ // instantiate state with default meta information meta: { + defaultSelectedTabId, selectedTabId: defaultSelectedTabId, }, }); diff --git a/packages/shared-ux/modal/tabbed/src/tabbed_modal.tsx b/packages/shared-ux/modal/tabbed/src/tabbed_modal.tsx index eb52f6628b2c7..0254b8605338c 100644 --- a/packages/shared-ux/modal/tabbed/src/tabbed_modal.tsx +++ b/packages/shared-ux/modal/tabbed/src/tabbed_modal.tsx @@ -7,7 +7,10 @@ */ import React, { + useRef, useMemo, + useState, + useLayoutEffect, useCallback, Fragment, type ComponentProps, @@ -26,6 +29,7 @@ import { type EuiTabProps, type CommonProps, useGeneratedHtmlId, + EuiSpacer, } from '@elastic/eui'; import { ModalContextProvider, @@ -60,6 +64,7 @@ export interface ITabbedModalInner extends Pick, modalWidth?: number; modalTitle?: string; anchorElement?: HTMLElement; + 'data-test-subj'?: string; } const TabbedModalInner: FC = ({ @@ -67,11 +72,42 @@ const TabbedModalInner: FC = ({ modalTitle, modalWidth, anchorElement, + ...props }) => { const { tabs, state, dispatch } = useModalContext>>>(); - const selectedTabId = state.meta.selectedTabId; - const shareModalHeadingId = useGeneratedHtmlId(); + const { selectedTabId, defaultSelectedTabId } = state.meta; + const tabbedModalHTMLId = useGeneratedHtmlId(); + const tabbedModalHeadingHTMLId = useGeneratedHtmlId(); + const defaultTabCoordinates = useRef(new Map>()); + const [translateYValue, setTranslateYValue] = useState(0); + + const onTabContentRender = useCallback(() => { + const tabbedModal = document.querySelector(`#${tabbedModalHTMLId}`) as HTMLDivElement; + + if (!defaultTabCoordinates.current.get(defaultSelectedTabId)) { + // on initial render the modal animates into it's final position + // hence the need to wait till said animation has completed + tabbedModal.onanimationend = () => { + const { top } = tabbedModal.getBoundingClientRect(); + defaultTabCoordinates.current.set(defaultSelectedTabId, { top }); + }; + } else { + let translateYOverride = 0; + + if (defaultSelectedTabId !== selectedTabId) { + const defaultTabData = defaultTabCoordinates.current.get(defaultSelectedTabId); + + const rect = tabbedModal.getBoundingClientRect(); + + translateYOverride = translateYValue + (defaultTabData?.top! - rect.top); + } + + if (translateYOverride !== translateYValue) { + setTranslateYValue(translateYOverride); + } + } + }, [tabbedModalHTMLId, defaultSelectedTabId, selectedTabId, translateYValue]); const selectedTabState = useMemo( () => (selectedTabId ? state[selectedTabId] : {}), @@ -107,26 +143,44 @@ const TabbedModalInner: FC = ({ }); }, [onSelectedTabChanged, selectedTabId, tabs]); + const modalPositionOverrideStyles: React.CSSProperties = { + transform: `translateY(${translateYValue}px)`, + transformOrigin: 'top', + willChange: 'transform', + }; + return ( { onClose(); setTimeout(() => anchorElement?.focus(), 1); }} - style={{ ...(modalWidth ? { width: modalWidth } : {}) }} maxWidth={true} - data-test-subj="shareContextModal" - aria-labelledby={shareModalHeadingId} + data-test-subj={props['data-test-subj']} + css={{ + ...(modalWidth ? { width: modalWidth } : {}), + ...modalPositionOverrideStyles, + }} + aria-labelledby={tabbedModalHeadingHTMLId} > - {modalTitle} + {modalTitle} {renderTabs()} - {React.createElement(SelectedTabContent, { - state: selectedTabState, - dispatch, + + {React.createElement(function RenderSelectedTabContent() { + useLayoutEffect(onTabContentRender, []); + return ( + + ); })} diff --git a/renovate.json b/renovate.json index b8f62345f58ac..bc94410bdea46 100644 --- a/renovate.json +++ b/renovate.json @@ -75,7 +75,7 @@ "matchDepNames": ["@redocly/cli"], "reviewers": ["team:kibana-core"], "matchBaseBranches": ["main"], - "labels": ["release_note:skip", "Team:Core", "backport:all-open"], + "labels": ["release_note:skip", "Team:Core", "backport:skip"], "minimumReleaseAge": "7 days", "enabled": true }, diff --git a/src/plugins/console/public/application/components/settings_modal.tsx b/src/plugins/console/public/application/components/settings_modal.tsx index acf8fe2c862e0..9f5be5e794ab2 100644 --- a/src/plugins/console/public/application/components/settings_modal.tsx +++ b/src/plugins/console/public/application/components/settings_modal.tsx @@ -160,8 +160,9 @@ export const DevToolsSettingsModal = (props: DevToolsSettingsModalProps) => { (isEnabled: boolean) => { if (props.editorInstance) { unregisterCommands(props.editorInstance); - setIsKeyboardShortcutsEnabled(isEnabled); } + + setIsKeyboardShortcutsEnabled(isEnabled); }, [props.editorInstance] ); @@ -319,6 +320,7 @@ export const DevToolsSettingsModal = (props: DevToolsSettingsModalProps) => { > { } = context; const { toasts } = notifications; const { settings } = useEditorReadContext(); + const [editorInstance, setEditorInstace] = useState< + monaco.editor.IStandaloneCodeEditor | undefined + >(); const divRef = useRef(null); const { setupResizeChecker, destroyResizeChecker } = useResizeCheckerUtils(); @@ -74,8 +77,15 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { setInputEditor(provider); actionsProvider.current = provider; setupResizeChecker(divRef.current!, editor); + setEditorInstace(editor); + }, + [setupResizeChecker, setInputEditor, setEditorInstace] + ); + + useEffect(() => { + if (settings.isKeyboardShortcutsEnabled && editorInstance) { registerKeyboardCommands({ - editor, + editor: editorInstance, sendRequest: sendRequestsCallback, autoIndent: async () => await actionsProvider.current?.autoIndent(), getDocumentationLink: getDocumenationLink, @@ -83,15 +93,17 @@ export const MonacoEditor = ({ initialTextValue }: EditorProps) => { await actionsProvider.current?.moveToPreviousRequestEdge(), moveToNextRequestEdge: async () => await actionsProvider.current?.moveToNextRequestEdge(), }); - }, - [ - getDocumenationLink, - registerKeyboardCommands, - sendRequestsCallback, - setupResizeChecker, - setInputEditor, - ] - ); + } else { + unregisterKeyboardCommands(); + } + }, [ + editorInstance, + getDocumenationLink, + sendRequestsCallback, + registerKeyboardCommands, + unregisterKeyboardCommands, + settings.isKeyboardShortcutsEnabled, + ]); const editorWillUnmountCallback = useCallback(() => { destroyResizeChecker(); diff --git a/src/plugins/console/public/styles/_app.scss b/src/plugins/console/public/styles/_app.scss index f2353821ec93f..161fd913c32ae 100644 --- a/src/plugins/console/public/styles/_app.scss +++ b/src/plugins/console/public/styles/_app.scss @@ -131,7 +131,7 @@ * The highlighting for the selected requests in the monaco editor */ .console__monaco_editor__selectedRequests { - background: transparentize($euiColorLightShade, .3); + background: transparentize($euiColorPrimary, .9); } /* * The z-index for the autocomplete suggestions popup diff --git a/src/plugins/controls/public/control_group/component/control_group_component.tsx b/src/plugins/controls/public/control_group/component/control_group_component.tsx index 019ef9256e91b..1b5b39bb6702d 100644 --- a/src/plugins/controls/public/control_group/component/control_group_component.tsx +++ b/src/plugins/controls/public/control_group/component/control_group_component.tsx @@ -137,7 +137,8 @@ export const ControlGroup = () => { !renderTourStep || !controlGroup.canShowInvalidSelectionsWarning() || !tourStepOpen || - !controlWithInvalidSelectionsId + !controlWithInvalidSelectionsId || + !panels[controlWithInvalidSelectionsId] ) { return null; } diff --git a/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx b/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx index 70c57f6f73cfc..46b47927a76cf 100644 --- a/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx +++ b/src/plugins/controls/public/control_group/embeddable/control_group_container.tsx @@ -104,7 +104,7 @@ export class ControlGroupContainer extends Container< private recalculateFilters$: Subject; private relevantDataViewId?: string; private lastUsedDataViewId?: string; - private invalidSelectionsState: { [childId: string]: boolean }; + private invalidSelectionsState: { [childId: string]: boolean } = {}; public diffingSubscription: Subscription = new Subscription(); @@ -170,12 +170,12 @@ export class ControlGroupContainer extends Container< this.store = reduxEmbeddableTools.store; - this.invalidSelectionsState = this.getChildIds().reduce((prev, id) => { - return { ...prev, [id]: false }; - }, {}); - // when all children are ready setup subscriptions this.untilAllChildrenReady().then(() => { + this.invalidSelectionsState = this.getChildIds().reduce((prev, id) => { + return { ...prev, [id]: false }; + }, {}); + this.recalculateDataViews(); this.setupSubscriptions(); const { filters, timeslice } = this.recalculateFilters(); @@ -324,7 +324,13 @@ export class ControlGroupContainer extends Container< this.subscriptions = new Subscription(); this.initialized$.next(false); this.updateInput(newInput); + this.untilAllChildrenReady().then(() => { + this.dispatch.setControlWithInvalidSelectionsId(undefined); + this.invalidSelectionsState = this.getChildIds().reduce((prev, id) => { + return { ...prev, [id]: false }; + }, {}); + this.recalculateDataViews(); const { filters, timeslice } = this.recalculateFilters(); this.publishFilters({ filters, timeslice }); diff --git a/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.tsx b/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.tsx index 39bb0f754cfbe..3b372bf00c27b 100644 --- a/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.tsx +++ b/src/plugins/dashboard/public/dashboard_container/embeddable/api/duplicate_dashboard_panel.test.tsx @@ -215,8 +215,6 @@ describe('React embeddables', () => { }, {} ); - fullApi$.next(fullApi); - fullApi$.complete(); return { Component: () =>
TEST DUPLICATE
, api: fullApi, @@ -234,6 +232,7 @@ describe('React embeddables', () => { }, }, }); + // render a fake Dashboard to initialize react embeddables const FakeDashboard = () => { return ( @@ -244,7 +243,11 @@ describe('React embeddables', () => {
dashboard.children$.next({ [panelId]: api })} + onApiAvailable={(api) => { + fullApi$.next(api as Api & HasSnapshottableState<{}>); + fullApi$.complete(); + dashboard.children$.next({ [panelId]: api }); + }} getParentApi={() => ({ getSerializedStateForChild: () => panel.explicitInput as unknown as SerializedPanelState | undefined, diff --git a/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts b/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts index 8f259e89cada5..490d1e08cbdb5 100644 --- a/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts +++ b/src/plugins/discover/public/embeddable/actions/view_saved_search_action.ts @@ -7,40 +7,15 @@ */ import type { ApplicationStart } from '@kbn/core/public'; -import { SEARCH_EMBEDDABLE_TYPE } from '@kbn/discover-utils'; -import { ViewMode } from '@kbn/embeddable-plugin/public'; import { i18n } from '@kbn/i18n'; -import { - apiCanAccessViewMode, - apiHasType, - apiIsOfType, - CanAccessViewMode, - EmbeddableApiContext, - getInheritedViewMode, - HasType, -} from '@kbn/presentation-publishing'; +import type { EmbeddableApiContext } from '@kbn/presentation-publishing'; import type { Action } from '@kbn/ui-actions-plugin/public'; import type { DiscoverAppLocator } from '../../../common'; -import { PublishesSavedSearch, apiPublishesSavedSearch } from '../types'; import { getDiscoverLocatorParams } from '../utils/get_discover_locator_params'; export const ACTION_VIEW_SAVED_SEARCH = 'ACTION_VIEW_SAVED_SEARCH'; -type ViewSavedSearchActionApi = CanAccessViewMode & HasType & PublishesSavedSearch; - -const compatibilityCheck = ( - api: EmbeddableApiContext['embeddable'] -): api is ViewSavedSearchActionApi => { - return ( - apiCanAccessViewMode(api) && - getInheritedViewMode(api) === ViewMode.VIEW && - apiHasType(api) && - apiIsOfType(api, SEARCH_EMBEDDABLE_TYPE) && - apiPublishesSavedSearch(api) - ); -}; - export class ViewSavedSearchAction implements Action { public id = ACTION_VIEW_SAVED_SEARCH; public readonly type = ACTION_VIEW_SAVED_SEARCH; @@ -51,6 +26,7 @@ export class ViewSavedSearchAction implements Action { ) {} async execute({ embeddable }: EmbeddableApiContext): Promise { + const { compatibilityCheck } = await import('./view_saved_search_compatibility_check'); if (!compatibilityCheck(embeddable)) { return; } @@ -73,6 +49,9 @@ export class ViewSavedSearchAction implements Action { const { capabilities } = this.application; const hasDiscoverPermissions = (capabilities.discover.show as boolean) || (capabilities.discover.save as boolean); - return compatibilityCheck(embeddable) && hasDiscoverPermissions; + + if (!hasDiscoverPermissions) return false; // early return to delay async import until absolutely necessary + const { compatibilityCheck } = await import('./view_saved_search_compatibility_check'); + return compatibilityCheck(embeddable); } } diff --git a/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts b/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts new file mode 100644 index 0000000000000..06eaa548b5b77 --- /dev/null +++ b/src/plugins/discover/public/embeddable/actions/view_saved_search_compatibility_check.ts @@ -0,0 +1,35 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0 and the Server Side Public License, v 1; you may not use this file except + * in compliance with, at your election, the Elastic License 2.0 or the Server + * Side Public License, v 1. + */ + +import { SEARCH_EMBEDDABLE_TYPE } from '@kbn/discover-utils'; +import { ViewMode } from '@kbn/embeddable-plugin/public'; +import { + apiCanAccessViewMode, + apiHasType, + apiIsOfType, + CanAccessViewMode, + EmbeddableApiContext, + getInheritedViewMode, + HasType, +} from '@kbn/presentation-publishing'; + +import { apiPublishesSavedSearch, PublishesSavedSearch } from '../types'; + +type ViewSavedSearchActionApi = CanAccessViewMode & HasType & PublishesSavedSearch; + +export const compatibilityCheck = ( + api: EmbeddableApiContext['embeddable'] +): api is ViewSavedSearchActionApi => { + return ( + apiCanAccessViewMode(api) && + getInheritedViewMode(api) === ViewMode.VIEW && + apiHasType(api) && + apiIsOfType(api, SEARCH_EMBEDDABLE_TYPE) && + apiPublishesSavedSearch(api) + ); +}; diff --git a/src/plugins/discover/public/embeddable/utils/get_discover_locator_params.ts b/src/plugins/discover/public/embeddable/utils/get_discover_locator_params.ts index 93703698b1e28..f5b90040757d5 100644 --- a/src/plugins/discover/public/embeddable/utils/get_discover_locator_params.ts +++ b/src/plugins/discover/public/embeddable/utils/get_discover_locator_params.ts @@ -7,7 +7,7 @@ */ import type { Filter } from '@kbn/es-query'; -import { PublishesSavedObjectId, PublishesUnifiedSearch } from '@kbn/presentation-publishing'; +import type { PublishesSavedObjectId, PublishesUnifiedSearch } from '@kbn/presentation-publishing'; import { DiscoverAppLocatorParams } from '../../../common'; import { PublishesSavedSearch } from '../types'; diff --git a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx index 91f4e02527bbb..953b57e4b207c 100644 --- a/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx +++ b/src/plugins/embeddable/public/react_embeddable_system/react_embeddable_renderer.tsx @@ -105,15 +105,13 @@ export const ReactEmbeddableRenderer = < const setApi = ( apiRegistration: SetReactEmbeddableApiRegistration ) => { - const fullApi = { + return { ...apiRegistration, uuid, phase$, parentApi, type: factory.type, } as unknown as Api; - onApiAvailable?.(fullApi); - return fullApi; }; const buildEmbeddable = async () => { @@ -194,6 +192,7 @@ export const ReactEmbeddableRenderer = < try { const { api, Component } = await buildEmbeddable(); + onApiAvailable?.(api); return React.forwardRef((_, ref) => { // expose the api into the imperative handle useImperativeHandle(ref, () => api, []); diff --git a/src/plugins/esql_datagrid/kibana.jsonc b/src/plugins/esql_datagrid/kibana.jsonc index ed589432578f3..e2596ccb9fc8b 100644 --- a/src/plugins/esql_datagrid/kibana.jsonc +++ b/src/plugins/esql_datagrid/kibana.jsonc @@ -9,7 +9,8 @@ "requiredPlugins": [ "data", "uiActions", - "fieldFormats" + "fieldFormats", + "share", ], "requiredBundles": [ "kibanaReact", diff --git a/src/plugins/esql_datagrid/public/create_datagrid.tsx b/src/plugins/esql_datagrid/public/create_datagrid.tsx index 6e218fac2bde4..e3352d77e3072 100644 --- a/src/plugins/esql_datagrid/public/create_datagrid.tsx +++ b/src/plugins/esql_datagrid/public/create_datagrid.tsx @@ -22,9 +22,15 @@ interface ESQLDataGridProps { dataView: DataView; columns: DatatableColumn[]; query: AggregateQuery; + /** + * Optional parameters + */ flyoutType?: 'overlay' | 'push'; isTableView?: boolean; initialColumns?: DatatableColumn[]; + fullHeight?: boolean; + initialRowHeight?: number; + controlColumnIds?: string[]; // default: ['openDetails', 'select'] } const DataGridLazy = withSuspense(lazy(() => import('./data_grid'))); @@ -35,6 +41,10 @@ export const ESQLDataGrid = (props: ESQLDataGridProps) => { return Promise.all([startServicesPromise]); }, []); + const getWrapper = (children: JSX.Element) => { + return props.fullHeight ?
{children}
: <>{children}; + }; + const deps = value?.[0]; if (loading || !deps) return ; @@ -45,14 +55,15 @@ export const ESQLDataGrid = (props: ESQLDataGridProps) => { }} > -
+ {getWrapper( -
+ )}
); diff --git a/src/plugins/esql_datagrid/public/data_grid.tsx b/src/plugins/esql_datagrid/public/data_grid.tsx index f45f1ce7f9ead..a53cb1b28f351 100644 --- a/src/plugins/esql_datagrid/public/data_grid.tsx +++ b/src/plugins/esql_datagrid/public/data_grid.tsx @@ -8,10 +8,19 @@ import React, { useState, useCallback, useMemo } from 'react'; import { zipObject } from 'lodash'; -import { UnifiedDataTable, DataLoadingState, type SortOrder } from '@kbn/unified-data-table'; +import { + UnifiedDataTable, + DataLoadingState, + type SortOrder, + renderCustomToolbar, +} from '@kbn/unified-data-table'; +import { i18n } from '@kbn/i18n'; +import { EuiLink, EuiText, EuiIcon } from '@elastic/eui'; +import { css } from '@emotion/react'; import { Storage } from '@kbn/kibana-utils-plugin/public'; import type { ESQLRow } from '@kbn/es-types'; import type { DatatableColumn, DatatableColumnMeta } from '@kbn/expressions-plugin/common'; +import type { SharePluginStart } from '@kbn/share-plugin/public'; import type { AggregateQuery } from '@kbn/es-query'; import type { DataTableRecord } from '@kbn/discover-utils/types'; import type { DataView } from '@kbn/data-views-plugin/common'; @@ -24,6 +33,7 @@ interface ESQLDataGridProps { core: CoreStart; data: DataPublicPluginStart; fieldFormats: FieldFormatsStart; + share?: SharePluginStart; rows: ESQLRow[]; dataView: DataView; columns: DatatableColumn[]; @@ -31,6 +41,8 @@ interface ESQLDataGridProps { flyoutType?: 'overlay' | 'push'; isTableView?: boolean; initialColumns?: DatatableColumn[]; + initialRowHeight?: number; + controlColumnIds?: string[]; } type DataTableColumnsMeta = Record< string, @@ -41,13 +53,19 @@ type DataTableColumnsMeta = Record< >; const sortOrder: SortOrder[] = []; +const DEFAULT_INITIAL_ROW_HEIGHT = 5; +const DEFAULT_ROWS_PER_PAGE = 10; +const ROWS_PER_PAGE_OPTIONS = [10, 25]; const DataGrid: React.FC = (props) => { const [expandedDoc, setExpandedDoc] = useState(undefined); const [activeColumns, setActiveColumns] = useState( (props.initialColumns || (props.isTableView ? props.columns : [])).map((c) => c.name) ); - const [rowHeight, setRowHeight] = useState(5); + const [rowHeight, setRowHeight] = useState( + props.initialRowHeight ?? DEFAULT_INITIAL_ROW_HEIGHT + ); + const [rowsPerPage, setRowsPerPage] = useState(DEFAULT_ROWS_PER_PAGE); const onSetColumns = useCallback((columns) => { setActiveColumns(columns); @@ -123,9 +141,71 @@ const DataGrid: React.FC = (props) => { props.fieldFormats, ]); + const discoverLocator = useMemo(() => { + return props.share?.url.locators.get('DISCOVER_APP_LOCATOR'); + }, [props.share?.url.locators]); + + const renderToolbar = useCallback( + (customToolbarProps) => { + const discoverLink = discoverLocator?.getRedirectUrl({ + dataViewSpec: props.dataView.toSpec(), + timeRange: props.data.query.timefilter.timefilter.getTime(), + query: props.query, + columns: activeColumns, + }); + return renderCustomToolbar({ + ...customToolbarProps, + toolbarProps: { + ...customToolbarProps.toolbarProps, + hasRoomForGridControls: true, + }, + gridProps: { + additionalControls: ( + + + + {i18n.translate('esqlDataGrid.openInDiscoverLabel', { + defaultMessage: 'Open in Discover', + })} + + + ), + }, + }); + }, + [ + activeColumns, + discoverLocator, + props.data.query.timefilter.timefilter, + props.dataView, + props.query, + ] + ); + return ( = (props) => { loadingState={DataLoadingState.loaded} dataView={props.dataView} sampleSizeState={rows.length} - rowsPerPageState={10} + rowsPerPageState={rowsPerPage} + rowsPerPageOptions={ROWS_PER_PAGE_OPTIONS} onSetColumns={onSetColumns} + onUpdateRowsPerPage={setRowsPerPage} expandedDoc={expandedDoc} setExpandedDoc={setExpandedDoc} showTimeCol @@ -146,9 +228,11 @@ const DataGrid: React.FC = (props) => { maxDocFieldsDisplayed={100} renderDocumentView={renderDocumentView} showFullScreenButton={false} - configRowHeight={5} + configRowHeight={DEFAULT_INITIAL_ROW_HEIGHT} rowHeightState={rowHeight} onUpdateRowHeight={setRowHeight} + controlColumnIds={props.controlColumnIds} + renderCustomToolbar={discoverLocator ? renderToolbar : undefined} /> ); }; diff --git a/src/plugins/esql_datagrid/public/kibana_services.ts b/src/plugins/esql_datagrid/public/kibana_services.ts index df52136ce021b..1fb1f5057afcb 100644 --- a/src/plugins/esql_datagrid/public/kibana_services.ts +++ b/src/plugins/esql_datagrid/public/kibana_services.ts @@ -11,6 +11,7 @@ import type { CoreStart } from '@kbn/core/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { SharePluginStart } from '@kbn/share-plugin/public'; export let core: CoreStart; @@ -19,6 +20,7 @@ interface ServiceDeps { data: DataPublicPluginStart; uiActions: UiActionsStart; fieldFormats: FieldFormatsStart; + share?: SharePluginStart; } const servicesReady$ = new BehaviorSubject(undefined); @@ -38,7 +40,8 @@ export const setKibanaServices = ( kibanaCore: CoreStart, data: DataPublicPluginStart, uiActions: UiActionsStart, - fieldFormats: FieldFormatsStart + fieldFormats: FieldFormatsStart, + share?: SharePluginStart ) => { core = kibanaCore; servicesReady$.next({ @@ -46,5 +49,6 @@ export const setKibanaServices = ( data, uiActions, fieldFormats, + share, }); }; diff --git a/src/plugins/esql_datagrid/public/plugin.ts b/src/plugins/esql_datagrid/public/plugin.ts index 662d23c5190b8..8dd0c8d10f245 100755 --- a/src/plugins/esql_datagrid/public/plugin.ts +++ b/src/plugins/esql_datagrid/public/plugin.ts @@ -10,20 +10,25 @@ import type { Plugin, CoreStart, CoreSetup } from '@kbn/core/public'; import type { DataPublicPluginStart } from '@kbn/data-plugin/public'; import type { UiActionsStart } from '@kbn/ui-actions-plugin/public'; import type { FieldFormatsStart } from '@kbn/field-formats-plugin/public'; +import type { SharePluginStart } from '@kbn/share-plugin/public'; import { setKibanaServices } from './kibana_services'; interface ESQLDataGridPluginStart { data: DataPublicPluginStart; uiActions: UiActionsStart; fieldFormats: FieldFormatsStart; + share?: SharePluginStart; } export class ESQLDataGridPlugin implements Plugin<{}, void> { public setup(_: CoreSetup, {}: {}) { return {}; } - public start(core: CoreStart, { data, uiActions, fieldFormats }: ESQLDataGridPluginStart): void { - setKibanaServices(core, data, uiActions, fieldFormats); + public start( + core: CoreStart, + { data, uiActions, fieldFormats, share }: ESQLDataGridPluginStart + ): void { + setKibanaServices(core, data, uiActions, fieldFormats, share); } public stop() {} diff --git a/src/plugins/esql_datagrid/tsconfig.json b/src/plugins/esql_datagrid/tsconfig.json index 1d8685bf55982..c887925e26b56 100644 --- a/src/plugins/esql_datagrid/tsconfig.json +++ b/src/plugins/esql_datagrid/tsconfig.json @@ -25,6 +25,8 @@ "@kbn/unified-doc-viewer-plugin", "@kbn/core-notifications-browser", "@kbn/shared-ux-utility", + "@kbn/share-plugin", + "@kbn/i18n", ], "exclude": [ "target/**/*", diff --git a/src/plugins/maps_ems/public/lazy_load_bundle/create_ems_client.ts b/src/plugins/maps_ems/public/lazy_load_bundle/create_ems_client.ts index b86f674b6be20..fb700e2607c51 100644 --- a/src/plugins/maps_ems/public/lazy_load_bundle/create_ems_client.ts +++ b/src/plugins/maps_ems/public/lazy_load_bundle/create_ems_client.ts @@ -9,7 +9,7 @@ import coerce from 'semver/functions/coerce'; import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common'; -import { BuildFlavor } from '@kbn/config/src/types'; +import type { BuildFlavor } from '@kbn/config'; import { i18n } from '@kbn/i18n'; import { EMSClient } from '@elastic/ems-client'; import { EMS_APP_NAME, EMSSettings, DEFAULT_EMS_REST_VERSION } from '../../common'; diff --git a/src/plugins/maps_ems/public/lazy_load_bundle/index.ts b/src/plugins/maps_ems/public/lazy_load_bundle/index.ts index 20e539326b3fe..a20da86b1af75 100644 --- a/src/plugins/maps_ems/public/lazy_load_bundle/index.ts +++ b/src/plugins/maps_ems/public/lazy_load_bundle/index.ts @@ -7,7 +7,7 @@ */ import type { EMSClient } from '@elastic/ems-client'; -import { BuildFlavor } from '@kbn/config/src/types'; +import type { BuildFlavor } from '@kbn/config'; import type { EMSSettings } from '../../common'; let lazyLoaded: (emsSettings: EMSSettings, version: string, buildFlavor: BuildFlavor) => EMSClient; diff --git a/src/plugins/share/public/components/share_tabs.tsx b/src/plugins/share/public/components/share_tabs.tsx index d8d9476af9462..f11a0caa7d7f2 100644 --- a/src/plugins/share/public/components/share_tabs.tsx +++ b/src/plugins/share/public/components/share_tabs.tsx @@ -53,6 +53,7 @@ export const ShareMenuTabs = () => { modalTitle={objectTypeMeta.title} defaultSelectedTabId="link" anchorElement={anchorElement} + data-test-subj="shareContextModal" /> ); }; diff --git a/src/plugins/share/public/components/tabs/embed/embed_content.tsx b/src/plugins/share/public/components/tabs/embed/embed_content.tsx index fd98037c3a00b..57be0ecaa293c 100644 --- a/src/plugins/share/public/components/tabs/embed/embed_content.tsx +++ b/src/plugins/share/public/components/tabs/embed/embed_content.tsx @@ -246,7 +246,6 @@ export const EmbedContent = ({ return ( <> - {helpText} {renderUrlParamExtensions()} diff --git a/src/plugins/share/public/components/tabs/export/export_content.tsx b/src/plugins/share/public/components/tabs/export/export_content.tsx index 61c58986477bd..e35e17e3b4047 100644 --- a/src/plugins/share/public/components/tabs/export/export_content.tsx +++ b/src/plugins/share/public/components/tabs/export/export_content.tsx @@ -218,7 +218,6 @@ const ExportContentUi = ({ return ( <> - <>{helpText} <>{renderRadioOptions()} diff --git a/src/plugins/share/public/components/tabs/link/link_content.tsx b/src/plugins/share/public/components/tabs/link/link_content.tsx index cd156ac82011f..74f3e4b8aae65 100644 --- a/src/plugins/share/public/components/tabs/link/link_content.tsx +++ b/src/plugins/share/public/components/tabs/link/link_content.tsx @@ -122,7 +122,6 @@ export const LinkContent = ({ return ( <> - void; - overlays: OverlayStart; i18n: CoreStart['i18n']; isDirty: boolean; toasts: ToastsSetup; @@ -105,47 +102,49 @@ export class ShareMenuManager { return; } - this.isOpen = true; document.body.appendChild(this.container); + // initialize variable that will hold reference for unmount + let unmount: ReturnType>; + + const mount = toMountPoint( + { + onClose(); + unmount(); + }, + theme, + i18n, + }} + />, + { i18n, theme } + ); + const openModal = () => { - const session = overlays.openModal( - toMountPoint( - { - onClose(); - session.close(); - }, - theme, - i18n, - }} - />, - { i18n, theme } - ), - { 'data-test-subj': 'share-modal' } - ); + unmount = mount(this.container); + this.isOpen = true; }; // @ts-ignore openModal() returns void diff --git a/test/functional/apps/console/monaco/_misc_console_behavior.ts b/test/functional/apps/console/monaco/_misc_console_behavior.ts index bc179ccc83208..1d72fa796e421 100644 --- a/test/functional/apps/console/monaco/_misc_console_behavior.ts +++ b/test/functional/apps/console/monaco/_misc_console_behavior.ts @@ -109,6 +109,24 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { }); }); + it('can toggle keyboard shortcuts', async () => { + // Enter a sample command + await PageObjects.console.monaco.enterText('GET _search'); + + // Disable keyboard shorcuts + await PageObjects.console.toggleKeyboardShortcuts(false); + + // Upon clicking ctrl enter a newline character should be added to the editor + await PageObjects.console.monaco.pressCtrlEnter(); + await retry.waitFor('shortcut shouldnt have generated any request', async () => { + const response = await PageObjects.console.monaco.getOutputText(); + return response === ''; + }); + + // Restore setting + await PageObjects.console.toggleKeyboardShortcuts(true); + }); + describe('customizable font size', () => { // flaky it.skip('should allow the font size to be customized', async () => { diff --git a/test/functional/page_objects/console_page.ts b/test/functional/page_objects/console_page.ts index aae93bacc965c..942f9f998afb9 100644 --- a/test/functional/page_objects/console_page.ts +++ b/test/functional/page_objects/console_page.ts @@ -286,6 +286,18 @@ export class ConsolePageObject extends FtrService { await this.testSubjects.click('settings-save-button'); } + public async toggleKeyboardShortcuts(enabled: boolean) { + await this.openSettings(); + + // while the settings form opens/loads this may fail, so retry for a while + await this.retry.try(async () => { + const toggle = await this.testSubjects.find('enableKeyboardShortcuts'); + await toggle.click(); + }); + + await this.testSubjects.click('settings-save-button'); + } + public async getFontSize(editor: WebElementWrapper) { const aceLine = await editor.findByClassName('ace_line'); return await aceLine.getComputedStyle('font-size'); diff --git a/test/functional/page_objects/management/saved_objects_page.ts b/test/functional/page_objects/management/saved_objects_page.ts index 5285836ccd85d..c6bb9623e74ea 100644 --- a/test/functional/page_objects/management/saved_objects_page.ts +++ b/test/functional/page_objects/management/saved_objects_page.ts @@ -385,6 +385,7 @@ export class SavedObjectsPageObject extends FtrService { await this.testSubjects.click('savedObjectsManagementDelete'); if (confirmDelete) { await this.testSubjects.click('confirmModalConfirmButton'); + await this.testSubjects.waitForDeleted('confirmModalConfirmButton'); await this.waitTableIsLoaded(); } } diff --git a/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts b/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts index 99a86bbe23791..8e7adb504ebee 100644 --- a/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts +++ b/test/plugin_functional/test_suites/saved_objects_management/hidden_types.ts @@ -21,8 +21,7 @@ export default function ({ getService, getPageObjects }: PluginFunctionalProvide const esArchiver = getService('esArchiver'); const testSubjects = getService('testSubjects'); - // Failing: See https://github.com/elastic/kibana/issues/118488 - describe.skip('saved objects management with hidden types', () => { + describe('saved objects management with hidden types', () => { before(async () => { await esArchiver.load( 'test/functional/fixtures/es_archiver/saved_objects_management/hidden_types' diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx index 85b6360b409be..af6ac01fb18a4 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/conversations/conversation_settings/conversation_settings_editor.tsx @@ -13,6 +13,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { OpenAiProviderType } from '@kbn/stack-connectors-plugin/public/common'; import { noop } from 'lodash/fp'; import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { QueryObserverResult } from '@tanstack/react-query'; import { Conversation } from '../../../..'; import * as i18n from './translations'; import * as i18nModel from '../../../connectorland/models/model_selector/translations'; @@ -37,6 +38,7 @@ export interface ConversationSettingsEditorProps { React.SetStateAction >; onSelectedConversationChange: (conversation?: Conversation) => void; + refetchConversations?: () => Promise, unknown>>; } /** @@ -53,6 +55,7 @@ export const ConversationSettingsEditor: React.FC { const { data: connectors, isSuccess: areConnectorsFetched } = useLoadConnectors({ http, @@ -276,6 +279,7 @@ export const ConversationSettingsEditor: React.FC = ({ conversationsSettingsBulkActions={conversationsSettingsBulkActions} http={http} isDisabled={isDisabled} + refetchConversations={refetchConversations} selectedConversation={selectedConversation} setConversationSettings={setConversationSettings} setConversationsSettingsBulkActions={setConversationsSettingsBulkActions} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx index e4457a8f38d4d..ff2ead2aeb386 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/index.tsx @@ -256,6 +256,13 @@ const AssistantComponent: React.FC = ({ conversations[WELCOME_CONVERSATION_TITLE] ?? getDefaultConversation({ cTitle: WELCOME_CONVERSATION_TITLE }); + // updated selected system prompt + setEditingSystemPromptId( + getDefaultSystemPrompt({ + allSystemPrompts, + conversation: conversationToReturn, + })?.id + ); if ( prev && prev.id === conversationToReturn.id && @@ -273,6 +280,7 @@ const AssistantComponent: React.FC = ({ }); } }, [ + allSystemPrompts, areConnectorsFetched, conversationTitle, conversations, @@ -647,6 +655,7 @@ const AssistantComponent: React.FC = ({ actionTypeId: (defaultConnector?.actionTypeId as string) ?? '.gen-ai', provider: apiConfig?.apiProvider, model: apiConfig?.defaultModel, + defaultSystemPromptId: allSystemPrompts.find((sp) => sp.isNewConversationDefault)?.id, }, }); }, @@ -665,14 +674,14 @@ const AssistantComponent: React.FC = ({ useEffect(() => { (async () => { - if (areConnectorsFetched && currentConversation?.id === '') { + if (areConnectorsFetched && currentConversation?.id === '' && !isLoadingPrompts) { const conversation = await mutateAsync(currentConversation); if (currentConversation.id === '' && conversation) { setCurrentConversationId(conversation.id); } } })(); - }, [areConnectorsFetched, currentConversation, mutateAsync]); + }, [areConnectorsFetched, currentConversation, isLoadingPrompts, mutateAsync]); const handleCreateConversation = useCallback(async () => { const newChatExists = find(conversations, ['title', NEW_CHAT]); @@ -791,6 +800,7 @@ const AssistantComponent: React.FC = ({ isSettingsModalVisible={isSettingsModalVisible} setIsSettingsModalVisible={setIsSettingsModalVisible} allSystemPrompts={allSystemPrompts} + refetchConversations={refetchResults} /> @@ -823,6 +833,7 @@ const AssistantComponent: React.FC = ({ handleOnSystemPromptSelectionChange, isSettingsModalVisible, isWelcomeSetup, + refetchResults, ]); return ( diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx index f13441a3102f9..9feb3e53aa8bc 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.test.tsx @@ -16,13 +16,13 @@ import { getOptions, getOptionFromPrompt } from './helpers'; describe('helpers', () => { describe('getOptionFromPrompt', () => { it('returns an EuiSuperSelectOption with the correct value', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt }); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isCleared: false }); expect(option.value).toBe(mockSystemPrompt.id); }); it('returns an EuiSuperSelectOption with the correct inputDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt }); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isCleared: false }); render(<>{option.inputDisplay}); @@ -30,7 +30,7 @@ describe('helpers', () => { }); it('shows the expected name in the dropdownDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt }); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isCleared: false }); render({option.dropdownDisplay}); @@ -38,7 +38,7 @@ describe('helpers', () => { }); it('shows the expected prompt content in the dropdownDisplay', () => { - const option = getOptionFromPrompt({ ...mockSystemPrompt }); + const option = getOptionFromPrompt({ ...mockSystemPrompt, isCleared: false }); render({option.dropdownDisplay}); @@ -51,7 +51,7 @@ describe('helpers', () => { const prompts = [mockSystemPrompt, mockSuperheroSystemPrompt]; const promptIds = prompts.map(({ id }) => id); - const options = getOptions({ prompts }); + const options = getOptions({ prompts, isCleared: false }); const optionValues = options.map(({ value }) => value); expect(optionValues).toEqual(promptIds); diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx index 92814927f980a..b5efd08b28f9c 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/helpers.tsx @@ -12,19 +12,38 @@ import styled from '@emotion/styled'; import { isEmpty } from 'lodash/fp'; import { euiThemeVars } from '@kbn/ui-theme'; import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { css } from '@emotion/react'; import { EMPTY_PROMPT } from './translations'; const Strong = styled.strong` margin-right: ${euiThemeVars.euiSizeS}; `; +interface GetOptionFromPromptProps extends PromptResponse { + content: string; + id: string; + name: string; + isCleared: boolean; +} + export const getOptionFromPrompt = ({ content, id, + isCleared, name, -}: PromptResponse): EuiSuperSelectOption => ({ +}: GetOptionFromPromptProps): EuiSuperSelectOption => ({ value: id, - inputDisplay: {name}, + inputDisplay: ( + + {name} + + ), dropdownDisplay: ( <> {name} @@ -41,6 +60,10 @@ export const getOptionFromPrompt = ({ interface GetOptionsProps { prompts: PromptResponse[] | undefined; + isCleared: boolean; } -export const getOptions = ({ prompts }: GetOptionsProps): Array> => - prompts?.map(getOptionFromPrompt) ?? []; +export const getOptions = ({ + prompts, + isCleared, +}: GetOptionsProps): Array> => + prompts?.map((p) => getOptionFromPrompt({ ...p, isCleared })) ?? []; diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx index 01fe334eb1f7d..592d91fe98326 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/index.tsx @@ -5,8 +5,9 @@ * 2.0. */ -import React, { useCallback, useMemo } from 'react'; +import React, { useCallback, useMemo, useState } from 'react'; import { PromptResponse } from '@kbn/elastic-assistant-common'; +import { QueryObserverResult } from '@tanstack/react-query'; import { Conversation } from '../../../..'; import { SelectSystemPrompt } from './select_system_prompt'; @@ -17,6 +18,7 @@ interface Props { onSystemPromptSelectionChange: (systemPromptId: string | undefined) => void; setIsSettingsModalVisible: React.Dispatch>; allSystemPrompts: PromptResponse[]; + refetchConversations?: () => Promise, unknown>>; } const SystemPromptComponent: React.FC = ({ @@ -26,9 +28,12 @@ const SystemPromptComponent: React.FC = ({ onSystemPromptSelectionChange, setIsSettingsModalVisible, allSystemPrompts, + refetchConversations, }) => { + const [isCleared, setIsCleared] = useState(false); const selectedPrompt = useMemo(() => { if (editingSystemPromptId !== undefined) { + setIsCleared(false); return allSystemPrompts.find((p) => p.id === editingSystemPromptId); } else { return allSystemPrompts.find((p) => p.id === conversation?.apiConfig?.defaultSystemPromptId); @@ -36,10 +41,21 @@ const SystemPromptComponent: React.FC = ({ }, [allSystemPrompts, conversation?.apiConfig?.defaultSystemPromptId, editingSystemPromptId]); const handleClearSystemPrompt = useCallback(() => { - if (conversation) { + if (editingSystemPromptId === undefined) { + setIsCleared(false); + onSystemPromptSelectionChange( + allSystemPrompts.find((p) => p.id === conversation?.apiConfig?.defaultSystemPromptId)?.id + ); + } else { + setIsCleared(true); onSystemPromptSelectionChange(undefined); } - }, [conversation, onSystemPromptSelectionChange]); + }, [ + allSystemPrompts, + conversation?.apiConfig?.defaultSystemPromptId, + editingSystemPromptId, + onSystemPromptSelectionChange, + ]); return ( = ({ conversation={conversation} data-test-subj="systemPrompt" isClearable={true} + isCleared={isCleared} + refetchConversations={refetchConversations} isSettingsModalVisible={isSettingsModalVisible} onSystemPromptSelectionChange={onSystemPromptSelectionChange} selectedPrompt={selectedPrompt} diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx index fbe0f40320c4c..08a6888b30626 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/prompt_editor/system_prompt/select_system_prompt/index.tsx @@ -22,6 +22,7 @@ import { PromptResponse, PromptTypeEnum, } from '@kbn/elastic-assistant-common/impl/schemas/prompts/bulk_crud_prompts_route.gen'; +import { QueryObserverResult } from '@tanstack/react-query'; import { Conversation } from '../../../../..'; import { getOptions } from '../helpers'; import * as i18n from '../translations'; @@ -38,6 +39,7 @@ export interface Props { selectedPrompt: PromptResponse | undefined; clearSelectedSystemPrompt?: () => void; isClearable?: boolean; + isCleared?: boolean; isDisabled?: boolean; isOpen?: boolean; isSettingsModalVisible: boolean; @@ -46,6 +48,7 @@ export interface Props { onSelectedConversationChange?: (result: Conversation) => void; setConversationSettings?: React.Dispatch>>; setConversationsSettingsBulkActions?: React.Dispatch>; + refetchConversations?: () => Promise, unknown>>; } const ADD_NEW_SYSTEM_PROMPT = 'ADD_NEW_SYSTEM_PROMPT'; @@ -57,8 +60,10 @@ const SelectSystemPromptComponent: React.FC = ({ selectedPrompt, clearSelectedSystemPrompt, isClearable = false, + isCleared = false, isDisabled = false, isOpen = false, + refetchConversations, isSettingsModalVisible, onSystemPromptSelectionChange, setIsSettingsModalVisible, @@ -89,10 +94,11 @@ const SelectSystemPromptComponent: React.FC = ({ defaultSystemPromptId: promptId, }, }); + await refetchConversations?.(); return result; } }, - [conversation, setApiConfig] + [conversation, refetchConversations, setApiConfig] ); const addNewSystemPrompt = useMemo(() => { @@ -116,7 +122,10 @@ const SelectSystemPromptComponent: React.FC = ({ }, []); // SuperSelect State/Actions - const options = useMemo(() => getOptions({ prompts: allSystemPrompts }), [allSystemPrompts]); + const options = useMemo( + () => getOptions({ prompts: allSystemPrompts, isCleared }), + [allSystemPrompts, isCleared] + ); const onChange = useCallback( async (selectedSystemPromptId) => { @@ -160,9 +169,8 @@ const SelectSystemPromptComponent: React.FC = ({ ); const clearSystemPrompt = useCallback(() => { - setSelectedSystemPrompt(undefined); clearSelectedSystemPrompt?.(); - }, [clearSelectedSystemPrompt, setSelectedSystemPrompt]); + }, [clearSelectedSystemPrompt]); return ( = ({ inline-size: 16px; block-size: 16px; border-radius: 16px; - background: ${euiThemeVars.euiColorMediumShade}; + background: ${isCleared + ? euiThemeVars.euiColorLightShade + : euiThemeVars.euiColorMediumShade}; :hover:not(:disabled) { - background: ${euiThemeVars.euiColorMediumShade}; + background: ${isCleared + ? euiThemeVars.euiColorLightShade + : euiThemeVars.euiColorMediumShade}; transform: none; } diff --git a/x-pack/packages/ml/aiops_common/constants.ts b/x-pack/packages/ml/aiops_common/constants.ts index dd5b0b1fd034c..ba33439f32221 100644 --- a/x-pack/packages/ml/aiops_common/constants.ts +++ b/x-pack/packages/ml/aiops_common/constants.ts @@ -11,6 +11,7 @@ export const AIOPS_PLUGIN_ID = 'aiops'; export const AIOPS_API_ENDPOINT = { + LOG_RATE_ANALYSIS_FIELD_CANDIDATES: '/internal/aiops/log_rate_analysis/field_candidates', LOG_RATE_ANALYSIS: '/internal/aiops/log_rate_analysis', CATEGORIZATION_FIELD_VALIDATION: '/internal/aiops/categorization_field_validation', } as const; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts index fae5d17c67fdb..78bbfccc76872 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema.ts @@ -6,11 +6,16 @@ */ import type { AiopsLogRateAnalysisSchemaV2 } from './schema_v2'; +import type { AiopsLogRateAnalysisSchemaV3 } from './schema_v3'; -export type AiopsLogRateAnalysisApiVersion = '2'; +export type AiopsLogRateAnalysisApiVersion = '2' | '3'; -const LATEST_API_VERSION: AiopsLogRateAnalysisApiVersion = '2'; +const LATEST_API_VERSION: AiopsLogRateAnalysisApiVersion = '3'; export type AiopsLogRateAnalysisSchema< T extends AiopsLogRateAnalysisApiVersion = typeof LATEST_API_VERSION -> = T extends '2' ? AiopsLogRateAnalysisSchemaV2 : never; +> = T extends '2' + ? AiopsLogRateAnalysisSchemaV2 + : T extends '3' + ? AiopsLogRateAnalysisSchemaV3 + : never; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v2.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v2.ts index c52e68ed36209..1e132f6f00e78 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v2.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v2.ts @@ -8,7 +8,7 @@ import type { TypeOf } from '@kbn/config-schema'; import { schema } from '@kbn/config-schema'; -const significantItem = schema.object({ +export const significantItem = schema.object({ key: schema.string(), type: schema.oneOf([schema.literal('keyword'), schema.literal('log_pattern')]), fieldName: schema.string(), @@ -33,7 +33,14 @@ const significantItem = schema.object({ unique: schema.maybe(schema.boolean()), }); -export const aiopsLogRateAnalysisSchemaV2 = schema.object({ +const overridesV2 = schema.object({ + loaded: schema.maybe(schema.number()), + remainingFieldCandidates: schema.maybe(schema.arrayOf(schema.string())), + significantItems: schema.maybe(schema.arrayOf(significantItem)), + regroupOnly: schema.maybe(schema.boolean()), +}); + +export const aiopsLogRateAnalysisBase = schema.object({ start: schema.number(), end: schema.number(), searchQuery: schema.string(), @@ -50,18 +57,15 @@ export const aiopsLogRateAnalysisSchemaV2 = schema.object({ /** Settings to override headers derived compression and flush fix */ compressResponse: schema.maybe(schema.boolean()), flushFix: schema.maybe(schema.boolean()), - /** Overrides to skip steps of the analysis with existing data */ - overrides: schema.maybe( - schema.object({ - loaded: schema.maybe(schema.number()), - remainingFieldCandidates: schema.maybe(schema.arrayOf(schema.string())), - significantItems: schema.maybe(schema.arrayOf(significantItem)), - regroupOnly: schema.maybe(schema.boolean()), - }) - ), /** Probability used for the random sampler aggregations */ sampleProbability: schema.maybe(schema.number()), }); +export const aiopsLogRateAnalysisSchemaV2 = schema.intersection([ + aiopsLogRateAnalysisBase, + /** Overrides to skip steps of the analysis with existing data */ + schema.object({ overrides: schema.maybe(overridesV2) }), +]); + export type AiopsLogRateAnalysisSchemaV2 = TypeOf; export type AiopsLogRateAnalysisSchemaSignificantItem = TypeOf; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v3.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v3.ts new file mode 100644 index 0000000000000..9754890de2aec --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/schema_v3.ts @@ -0,0 +1,28 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { TypeOf } from '@kbn/config-schema'; +import { schema } from '@kbn/config-schema'; + +import { aiopsLogRateAnalysisBase, significantItem } from './schema_v2'; + +const overridesV3 = schema.object({ + loaded: schema.maybe(schema.number()), + remainingKeywordFieldCandidates: schema.maybe(schema.arrayOf(schema.string())), + remainingTextFieldCandidates: schema.maybe(schema.arrayOf(schema.string())), + significantItems: schema.maybe(schema.arrayOf(significantItem)), + regroupOnly: schema.maybe(schema.boolean()), +}); + +export const aiopsLogRateAnalysisSchemaV3 = schema.intersection([ + aiopsLogRateAnalysisBase, + /** Overrides to skip steps of the analysis with existing data */ + schema.object({ overrides: schema.maybe(overridesV3) }), +]); + +export type AiopsLogRateAnalysisSchemaV3 = TypeOf; +export type AiopsLogRateAnalysisSchemaSignificantItem = TypeOf; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts index 48bfbf9ef14d8..bf51beb768166 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/api/stream_reducer.ts @@ -27,7 +27,8 @@ export interface StreamState { errors: string[]; loaded: number; loadingState: string; - remainingFieldCandidates?: string[]; + remainingKeywordFieldCandidates?: string[]; + remainingTextFieldCandidates?: string[]; groupsMissing?: boolean; zeroDocsFallback: boolean; } @@ -97,7 +98,8 @@ export const logRateAnalysisResultsSlice = createSlice({ ccsWarning: boolean; loaded: number; loadingState: string; - remainingFieldCandidates?: string[]; + remainingKeywordFieldCandidates?: string[]; + remainingTextFieldCandidates?: string[]; groupsMissing?: boolean; }> ) => { diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.test.ts new file mode 100644 index 0000000000000..703b00d180881 --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.test.ts @@ -0,0 +1,49 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { containsECSIdentifierField, filterByECSFields } from './ecs_fields'; + +describe('containsECSIdentifierFields', () => { + it('should return true if the array contains all ECS identifier fields', () => { + const fields = ['host.name', 'service.name', 'log.level', 'other.field', 'ecs.version']; + expect(containsECSIdentifierField(fields)).toBe(true); + }); + + it('should return false if the array does not contain all ECS identifier fields', () => { + const fields = ['host.name', 'service.name', 'non.ecs.field1', 'another.non.ecs.field']; + expect(containsECSIdentifierField(fields)).toBe(false); + }); + + it('should return false for an empty array', () => { + const fields: string[] = []; + expect(containsECSIdentifierField(fields)).toBe(false); + }); +}); + +describe('filterByECSFields', () => { + it('should filter out non-ECS fields', () => { + const fields = ['event.dataset', 'host.name', 'random.field', 'other.field']; + const expected = ['event.dataset', 'host.name']; + expect(filterByECSFields(fields)).toEqual(expected); + }); + + it('should include fields prefixed with label.', () => { + const fields = ['event.dataset', 'host.name', 'random.field', 'label.customField']; + const expected = ['event.dataset', 'host.name', 'label.customField']; + expect(filterByECSFields(fields)).toEqual(expected); + }); + + it('should return an empty array if no ECS or label. prefixed fields are present', () => { + const fields = ['random.field', 'another.field']; + expect(filterByECSFields(fields)).toEqual([]); + }); + + it('should handle an empty array input', () => { + const fields: string[] = []; + expect(filterByECSFields(fields)).toEqual([]); + }); +}); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.ts b/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.ts new file mode 100644 index 0000000000000..fc9658e7b3e8d --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/ecs_fields.ts @@ -0,0 +1,242 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +// A selection of fields derived from +// https://www.elastic.co/guide/en/ecs/current/ecs-field-reference.html +const ecsFields = [ + // Base fields + // https://www.elastic.co/guide/en/ecs/current/ecs-base.html + // Only picking `tags` here since `@timestamp` is not applicable, + // `message` is part of text field candidates and `label` acts + // as a prefix which we'll handle in filterByECSFields. + 'tags', + + // Agent fields + // https://www.elastic.co/guide/en/ecs/current/ecs-agent.html + 'agent.name', + 'agent.type', + 'agent.version', + + // Client fields + // https://www.elastic.co/guide/en/ecs/current/ecs-client.html + 'client.domain', + 'client.ip', // of type IP + 'client.port', + + // Cloud fields + // https://www.elastic.co/guide/en/ecs/current/ecs-cloud.html + 'cloud.account.id', + 'cloud.account.name', + 'cloud.availability_zone', + 'cloud.instance.id', // Instance ID in the cloud environment + 'cloud.machine.type', // Type of the cloud machine + 'cloud.project.id', + 'cloud.provider', // Name of the cloud provider + 'cloud.region', // Region in which the host is running + 'cloud.service.name', + + // Container fields + // https://www.elastic.co/guide/en/ecs/current/ecs-container.html + 'container.id', // Unique identifier of the container + 'container.image.hash.all', + 'container.image.name', + 'container.image.tag', + 'container.name', // Name of the container + 'container.runtime', + 'container.security_context.privileged', // boolean type + + // Data Stream fields + // https://www.elastic.co/guide/en/ecs/current/ecs-data_stream.html + 'data_stream.dataset', + 'data_stream.namespace', + 'data_stream.type', + + // Destination fields + // https://www.elastic.co/guide/en/ecs/current/ecs-destination.html + 'destination.address', + + // ECS fields + // https://www.elastic.co/guide/en/ecs/current/ecs-ecs.html + 'ecs.version', + + // Error fields + // https://www.elastic.co/guide/en/ecs/current/ecs-error.html + 'error.code', + 'error.id', + 'error.type', + + // Event fields + // https://www.elastic.co/guide/en/ecs/current/ecs-event.html + 'event.action', + 'event.agent_id_status', + 'event.category', + 'event.code', + 'event.dataset', + 'event.kind', + 'event.module', + 'event.outcome', + 'event.provider', + 'event.reason', + 'event.reference', + 'event.timezone', + 'event.type', + 'event.url', + + // File fields + // https://www.elastic.co/guide/en/ecs/current/ecs-file.html + 'file.attributes', + 'file.path', + 'file.type', + + // Host fields + // https://www.elastic.co/guide/en/ecs/current/ecs-host.html + 'host.architecture', + 'host.domain', + 'host.ip', + 'host.name', + + // HTTP fields + // https://www.elastic.co/guide/en/ecs/current/ecs-http.html + 'http.request.method', + 'http.request.mime_type', + 'http.request.referrer', + 'http.response.mime_type', + 'http.response.status_code', + 'http.version', + + // Log fields + // https://www.elastic.co/guide/en/ecs/current/ecs-log.html + 'log.file.path', + 'log.level', + 'log.logger', + 'log.origin.file.name', + 'log.origin.function', + + // Network fields + // https://www.elastic.co/guide/en/ecs/current/ecs-network.html + 'network.application', + 'network.direction', + 'network.name', + 'network.protocol', + 'network.type', + + // Orchestrator fields + // https://www.elastic.co/guide/en/ecs/current/ecs-orchestrator.html + 'orchestrator.cluster.name', + 'orchestrator.cluster.version', + 'orchestrator.namespace', + 'orchestrator.organization', + 'orchestrator.type', + + // Process fields + // https://www.elastic.co/guide/en/ecs/current/ecs-process.html + 'process.command_line', + 'process.env_vars', + 'process.name', + + // Rule fields + // https://www.elastic.co/guide/en/ecs/current/ecs-rule.html + 'rule.author', + 'rule.category', + 'rule.description', + 'rule.name', + 'rule.ruleset', + 'rule.version', + + // Server fields + // https://www.elastic.co/guide/en/ecs/current/ecs-server.html + 'server.domain', + 'server.ip', // IP field + 'server.port', + + // Service fields + // https://www.elastic.co/guide/en/ecs/current/ecs-service.html + 'service.environment', + 'service.name', + 'service.node.name', + 'service.node.role', // deprecated + 'service.node.roles', + 'service.state', + 'service.type', + 'service.version', + + // Source fields + // https://www.elastic.co/guide/en/ecs/current/ecs-source.html + 'source.domain', + 'source.ip', // IP field + 'source.port', + + // URL fields + // https://www.elastic.co/guide/en/ecs/current/ecs-url.html + 'url.domain', + 'url.full', + + // User fields + // https://www.elastic.co/guide/en/ecs/current/ecs-user.html + 'user.name', + 'user.domain', + 'user.email', + 'user.roles', + + // User agent fields + // https://www.elastic.co/guide/en/ecs/current/ecs-user_agent.html + 'user_agent.device.name', + 'user_agent.name', + 'user_agent.original', + 'user_agent.version', +]; + +// Must have field to identify an index as ECS compliant. +// The only other field that's required is `@timestamp` but that's not +// part of the list since it's not a field that can be used for analysis. +// https://www.elastic.co/guide/en/ecs/1.12/ecs-ecs.html +const ecsIdentifierField = 'ecs.version'; + +// These are the fields that are expected to be nested within other ECS fields. +const ecsPostfixes = [ + // For geo fields, we default to the more human readable variants. + // Those are supposed to be used nested within e.g. `client.*` that's + // why we cannot have them in the `ecsFields` array. + // https://www.elastic.co/guide/en/ecs/current/ecs-geo.html + '.geo.city_name', + '.geo.continent_name', + '.geo.country_name', + '.geo.region_name', + '.geo.timezone', + + // The os fields are expected to be nested at: host.os, observer.os, user_agent.os + // https://www.elastic.co/guide/en/ecs/current/ecs-os.html + '.os.family', + '.os.full', + '.os.kernel', + '.os.name', + '.os.platform', + '.os.version', + + // The risk fields are expected to be nested at: host.risk, user.risk + // https://www.elastic.co/guide/en/ecs/current/ecs-risk.html + '.risk.calculated_level', + '.risk.static_level', + + // User fields are also in the ECS fields array but can be nested too. + '.user.domain', + '.user.email', + '.user.roles', +]; + +export function containsECSIdentifierField(fieldsArray: string[]): boolean { + return fieldsArray.includes(ecsIdentifierField); +} + +export function filterByECSFields(fieldsArray: string[]) { + return fieldsArray.filter( + (field) => + ecsFields.includes(field) || + field.startsWith('label.') || + ecsPostfixes.some((postfix) => field.endsWith(postfix)) + ); +} diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.test.ts index 4fb17211174ae..b074d6f51805b 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.test.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.test.ts @@ -17,38 +17,41 @@ const windowParameters = { describe('getLogRateAnalysisTypeForCounts', () => { it('returns SPIKE when normalized deviation count is higher than baseline count', () => { - const baselineCount = 100; - const deviationCount = 200; - - const result = getLogRateAnalysisTypeForCounts(baselineCount, deviationCount, windowParameters); + const result = getLogRateAnalysisTypeForCounts({ + baselineCount: 100, + deviationCount: 200, + windowParameters, + }); expect(result).toEqual(LOG_RATE_ANALYSIS_TYPE.SPIKE); }); it('returns DIP when normalized deviation count is lower than baseline count', () => { - const baselineCount = 20000; - const deviationCount = 10; - - const result = getLogRateAnalysisTypeForCounts(baselineCount, deviationCount, windowParameters); + const result = getLogRateAnalysisTypeForCounts({ + baselineCount: 20000, + deviationCount: 10, + windowParameters, + }); expect(result).toEqual(LOG_RATE_ANALYSIS_TYPE.DIP); }); it('handles zero baseline count without throwing error', () => { - const baselineCount = 0; - const deviationCount = 100; - - const result = getLogRateAnalysisTypeForCounts(baselineCount, deviationCount, windowParameters); + const result = getLogRateAnalysisTypeForCounts({ + baselineCount: 0, + deviationCount: 100, + windowParameters, + }); expect(result).toBe(LOG_RATE_ANALYSIS_TYPE.SPIKE); }); it('handles zero deviation count without throwing error', () => { - const baselineCount = 100; - const deviationCount = 0; - - const result = getLogRateAnalysisTypeForCounts(baselineCount, deviationCount, windowParameters); - + const result = getLogRateAnalysisTypeForCounts({ + baselineCount: 100, + deviationCount: 0, + windowParameters, + }); expect(result).toBe(LOG_RATE_ANALYSIS_TYPE.DIP); }); }); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.ts b/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.ts index 9c2339035bea2..1c2cc0a0cbae9 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/get_log_rate_analysis_type_for_counts.ts @@ -8,19 +8,20 @@ import { LOG_RATE_ANALYSIS_TYPE, type LogRateAnalysisType } from './log_rate_analysis_type'; import type { WindowParameters } from './window_parameters'; +interface GetLogRateAnalysisTypeForCountsParams { + baselineCount: number; + deviationCount: number; + windowParameters: WindowParameters; +} + /** * Identify the log rate analysis type based on the baseline/deviation doc counts. - * - * @param baselineCount The baseline doc count. - * @param deviationCount The deviation doc count. - * @param windowParameters The window parameters with baseline and deviation time range. - * @returns The log rate analysis type. */ -export function getLogRateAnalysisTypeForCounts( - baselineCount: number, - deviationCount: number, - windowParameters: WindowParameters -): LogRateAnalysisType { +export function getLogRateAnalysisTypeForCounts({ + baselineCount, + deviationCount, + windowParameters, +}: GetLogRateAnalysisTypeForCountsParams): LogRateAnalysisType { const { baselineMin, baselineMax, deviationMin, deviationMax } = windowParameters; const deviationDuration = deviationMax - deviationMin; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/__mocks__/field_caps_pgbench.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/__mocks__/field_caps_pgbench.ts index bc3aec796ebe6..57cb8230b01e5 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/__mocks__/field_caps_pgbench.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/__mocks__/field_caps_pgbench.ts @@ -10,7 +10,7 @@ export const fieldCapsPgBenchMock = { fields: { // The next two fields are not in the original field caps response, // but are added here to test the logic to ignore fields that are not - // in the white list. It's based on a real world example where the mapping + // in the safe list. It's based on a real world example where the mapping // included a double mapping of text+integer. ignore_this_text_field: { text: { type: 'text', metadata_field: false, searchable: true, aggregatable: false }, diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.test.ts new file mode 100644 index 0000000000000..43a12bc845bb8 --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.test.ts @@ -0,0 +1,354 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ElasticsearchClient } from '@kbn/core/server'; + +import { paramsSearchQueryMock } from './__mocks__/params_search_query'; +import { fieldCapsPgBenchMock } from './__mocks__/field_caps_pgbench'; +import { fieldCapsEcommerceMock } from './__mocks__/field_caps_ecommerce'; +import { fieldCapsLargeArraysMock } from './__mocks__/field_caps_large_arrays'; + +import { fetchFieldCandidates } from './fetch_field_candidates'; + +describe('fetchFieldCandidates', () => { + it('returns field candidates for "my" fields', async () => { + const esClientFieldCapsMock = jest.fn(() => ({ + fields: { + // Should end up as a field candidate + myIpFieldName: { ip: { aggregatable: true } }, + // Should end up as a field candidate + myKeywordFieldName: { keyword: { aggregatable: true } }, + // Should not end up as a field candidate, it's a keyword but non-aggregatable + myKeywordFieldNameToBeIgnored: { keyword: { aggregatable: false } }, + // Should not end up as a field candidate since fields of type number will not be considered + myNumericFieldName: { number: {} }, + // Should end up as a text field candidate + message: { text: { aggregatable: false } }, + // Should note end up as a text field candidate + myTextField: { text: { aggregatable: false } }, + }, + })); + + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + } as unknown as ElasticsearchClient; + + const { + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = await fetchFieldCandidates({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); + + expect(keywordFieldCandidates).toEqual(['myIpFieldName', 'myKeywordFieldName']); + expect(textFieldCandidates).toEqual(['message']); + expect(selectedKeywordFieldCandidates).toEqual(['myIpFieldName', 'myKeywordFieldName']); + expect(selectedTextFieldCandidates).toEqual(['message']); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + }); + + it('returns field candidates for pgBench mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsPgBenchMock); + + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + } as unknown as ElasticsearchClient; + + const { + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = await fetchFieldCandidates({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); + + expect(keywordFieldCandidates).toEqual([ + '_metadata.elastic_apm_trace_id', + '_metadata.elastic_apm_transaction_id', + '_metadata.message_template', + '_metadata.metadata_event_dataset', + '_metadata.user_id', + 'agent.ephemeral_id', + 'agent.hostname', + 'agent.id', + 'agent.name', + 'agent.type', + 'agent.version', + 'client.geo.city_name', + 'client.geo.continent_name', + 'client.geo.country_iso_code', + 'client.geo.country_name', + 'client.geo.region_iso_code', + 'client.geo.region_name', + 'client.ip', + 'cloud.account.id', + 'cloud.availability_zone', + 'cloud.instance.id', + 'cloud.instance.name', + 'cloud.machine.type', + 'cloud.project.id', + 'cloud.provider', + 'cloud.service.name', + 'container.id', + 'container.image.name', + 'container.labels.annotation_io_kubernetes_container_hash', + 'container.labels.annotation_io_kubernetes_container_restartCount', + 'container.labels.annotation_io_kubernetes_container_terminationMessagePath', + 'container.labels.annotation_io_kubernetes_container_terminationMessagePolicy', + 'container.labels.annotation_io_kubernetes_pod_terminationGracePeriod', + 'container.labels.io_kubernetes_container_logpath', + 'container.labels.io_kubernetes_container_name', + 'container.labels.io_kubernetes_docker_type', + 'container.labels.io_kubernetes_pod_name', + 'container.labels.io_kubernetes_pod_namespace', + 'container.labels.io_kubernetes_pod_uid', + 'container.labels.io_kubernetes_sandbox_id', + 'container.name', + 'container.runtime', + 'data_stream.dataset', + 'data_stream.namespace', + 'data_stream.type', + 'details', + 'ecs.version', + 'elasticapm_labels.span.id', + 'elasticapm_labels.trace.id', + 'elasticapm_labels.transaction.id', + 'elasticapm_span_id', + 'elasticapm_trace_id', + 'elasticapm_transaction_id', + 'event.category', + 'event.dataset', + 'event.kind', + 'event.module', + 'event.timezone', + 'event.type', + 'fileset.name', + 'host.architecture', + 'host.containerized', + 'host.hostname', + 'host.ip', + 'host.mac', + 'host.name', + 'host.os.codename', + 'host.os.family', + 'host.os.kernel', + 'host.os.name', + 'host.os.platform', + 'host.os.type', + 'host.os.version', + 'hostname', + 'input.type', + 'kubernetes.container.name', + 'kubernetes.labels.app', + 'kubernetes.labels.pod-template-hash', + 'kubernetes.namespace', + 'kubernetes.namespace_labels.kubernetes_io/metadata_name', + 'kubernetes.namespace_uid', + 'kubernetes.node.hostname', + 'kubernetes.node.labels.addon_gke_io/node-local-dns-ds-ready', + 'kubernetes.node.labels.beta_kubernetes_io/arch', + 'kubernetes.node.labels.beta_kubernetes_io/instance-type', + 'kubernetes.node.labels.beta_kubernetes_io/os', + 'kubernetes.node.labels.cloud_google_com/gke-boot-disk', + 'kubernetes.node.labels.cloud_google_com/gke-container-runtime', + 'kubernetes.node.labels.cloud_google_com/gke-nodepool', + 'kubernetes.node.labels.cloud_google_com/gke-os-distribution', + 'kubernetes.node.labels.cloud_google_com/machine-family', + 'kubernetes.node.labels.failure-domain_beta_kubernetes_io/region', + 'kubernetes.node.labels.failure-domain_beta_kubernetes_io/zone', + 'kubernetes.node.labels.kubernetes_io/arch', + 'kubernetes.node.labels.kubernetes_io/hostname', + 'kubernetes.node.labels.kubernetes_io/os', + 'kubernetes.node.labels.node_kubernetes_io/instance-type', + 'kubernetes.node.labels.node_type', + 'kubernetes.node.labels.topology_kubernetes_io/region', + 'kubernetes.node.labels.topology_kubernetes_io/zone', + 'kubernetes.node.name', + 'kubernetes.node.uid', + 'kubernetes.pod.ip', + 'kubernetes.pod.name', + 'kubernetes.pod.uid', + 'kubernetes.replicaset.name', + 'labels.userId', + 'log.file.path', + 'log.flags', + 'log.level', + 'log.logger', + 'log.origin.file.name', + 'log.origin.function', + 'log.original', + 'name', + 'postgresql.log.database', + 'postgresql.log.query', + 'postgresql.log.query_step', + 'postgresql.log.timestamp', + 'process.executable', + 'process.name', + 'process.thread.name', + 'related.user', + 'req.headers.accept', + 'req.headers.accept-encoding', + 'req.headers.cache-control', + 'req.headers.connection', + 'req.headers.content-length', + 'req.headers.content-type', + 'req.headers.cookie', + 'req.headers.host', + 'req.headers.origin', + 'req.headers.pragma', + 'req.headers.referer', + 'req.headers.traceparent', + 'req.headers.tracestate', + 'req.headers.user-agent', + 'req.headers.x-real-ip', + 'req.method', + 'req.remoteAddress', + 'req.url', + 'service.name', + 'service.type', + 'span.id', + 'stack', + 'stream', + 'trace.id', + 'transaction.id', + 'type', + 'user.name', + ]); + expect(selectedKeywordFieldCandidates).toEqual([ + 'agent.name', + 'agent.type', + 'agent.version', + 'client.geo.city_name', + 'client.geo.continent_name', + 'client.geo.country_name', + 'client.geo.region_name', + 'client.ip', + 'cloud.account.id', + 'cloud.availability_zone', + 'cloud.instance.id', + 'cloud.machine.type', + 'cloud.project.id', + 'cloud.provider', + 'cloud.service.name', + 'container.id', + 'container.image.name', + 'container.name', + 'container.runtime', + 'data_stream.dataset', + 'data_stream.namespace', + 'data_stream.type', + 'ecs.version', + 'event.category', + 'event.dataset', + 'event.kind', + 'event.module', + 'event.timezone', + 'event.type', + 'host.architecture', + 'host.ip', + 'host.name', + 'host.os.family', + 'host.os.kernel', + 'host.os.name', + 'host.os.platform', + 'host.os.version', + 'log.file.path', + 'log.level', + 'log.logger', + 'log.origin.file.name', + 'log.origin.function', + 'process.name', + 'service.name', + 'service.type', + 'user.name', + ]); + expect(textFieldCandidates).toEqual(['error.message', 'message']); + expect(selectedTextFieldCandidates).toEqual(['error.message', 'message']); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + }); + + it('returns field candidates for ecommerce mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsEcommerceMock); + + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + } as unknown as ElasticsearchClient; + + const { + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = await fetchFieldCandidates({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); + + const expectedKeywordFieldCandidates = [ + 'category.keyword', + 'currency', + 'customer_first_name.keyword', + 'customer_full_name.keyword', + 'customer_gender', + 'customer_id', + 'customer_last_name.keyword', + 'customer_phone', + 'day_of_week', + 'email', + 'event.dataset', + 'geoip.city_name', + 'geoip.continent_name', + 'geoip.country_iso_code', + 'geoip.region_name', + 'manufacturer.keyword', + 'order_id', + 'products._id.keyword', + 'products.category.keyword', + 'products.manufacturer.keyword', + 'products.product_name.keyword', + 'products.sku', + 'sku', + 'type', + 'user', + ]; + + expect(keywordFieldCandidates).toEqual(expectedKeywordFieldCandidates); + expect(textFieldCandidates).toEqual([]); + expect(selectedKeywordFieldCandidates).toEqual(expectedKeywordFieldCandidates); + expect(selectedTextFieldCandidates).toEqual([]); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + }); + + it('returns field candidates and total hits for large-arrays mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsLargeArraysMock); + + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + } as unknown as ElasticsearchClient; + + const { + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = await fetchFieldCandidates({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); + + expect(keywordFieldCandidates).toEqual(['items']); + expect(textFieldCandidates).toEqual([]); + expect(selectedKeywordFieldCandidates).toEqual(['items']); + expect(selectedTextFieldCandidates).toEqual([]); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + }); +}); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.ts new file mode 100644 index 0000000000000..1ee4b2184071c --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_field_candidates.ts @@ -0,0 +1,130 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { ElasticsearchClient } from '@kbn/core/server'; +import { ES_FIELD_TYPES } from '@kbn/field-types'; + +import { containsECSIdentifierField, filterByECSFields } from '../ecs_fields'; +import type { AiopsLogRateAnalysisSchema } from '../api/schema'; + +// Supported field names for text fields for log rate analysis. +// If we analyse all detected text fields, we might run into performance +// issues with the `categorize_text` aggregation. Until this is resolved, we +// rely on a predefined white list of supported text fields. +export const TEXT_FIELD_SAFE_LIST = ['message', 'error.message']; + +export const SUPPORTED_ES_FIELD_TYPES = [ + ES_FIELD_TYPES.KEYWORD, + ES_FIELD_TYPES.IP, + ES_FIELD_TYPES.BOOLEAN, +]; + +export const SUPPORTED_ES_FIELD_TYPES_TEXT = [ES_FIELD_TYPES.TEXT, ES_FIELD_TYPES.MATCH_ONLY_TEXT]; + +// This override is meant to be used to force certain fields to be considered as +// text fields when both text and keyword type is available. +export interface FetchFieldCandidatesParamsArguments { + textFieldCandidatesOverrides?: string[]; +} + +export interface FetchFieldCandidatesParams { + esClient: ElasticsearchClient; + abortSignal?: AbortSignal; + arguments: AiopsLogRateAnalysisSchema & FetchFieldCandidatesParamsArguments; +} + +export interface FetchFieldCandidatesResponse { + isECS: boolean; + keywordFieldCandidates: string[]; + selectedKeywordFieldCandidates: string[]; + textFieldCandidates: string[]; + selectedTextFieldCandidates: string[]; +} + +export const fetchFieldCandidates = async ({ + esClient, + abortSignal, + arguments: args, +}: FetchFieldCandidatesParams): Promise => { + const { textFieldCandidatesOverrides = [], ...params } = args; + + // Get all supported fields + const respMapping = await esClient.fieldCaps( + { + fields: '*', + filters: '-metadata,-parent', + include_empty_fields: false, + index: params.index, + index_filter: { + range: { + [params.timeFieldName]: { + gte: params.deviationMin, + lte: params.deviationMax, + }, + }, + }, + types: [...SUPPORTED_ES_FIELD_TYPES, ...SUPPORTED_ES_FIELD_TYPES_TEXT], + }, + { signal: abortSignal, maxRetries: 0 } + ); + + const allFieldNames: string[] = []; + + const acceptableFields: Set = new Set(); + const acceptableTextFields: Set = new Set(); + + Object.entries(respMapping.fields).forEach(([key, value]) => { + const fieldTypes = Object.keys(value) as ES_FIELD_TYPES[]; + const isSupportedType = fieldTypes.some((type) => SUPPORTED_ES_FIELD_TYPES.includes(type)); + const isAggregatable = fieldTypes.some((type) => value[type].aggregatable); + const isTextField = fieldTypes.some((type) => SUPPORTED_ES_FIELD_TYPES_TEXT.includes(type)); + + // Check if fieldName is something we can aggregate on + if (isSupportedType && isAggregatable) { + acceptableFields.add(key); + } + + if (isTextField && TEXT_FIELD_SAFE_LIST.includes(key)) { + acceptableTextFields.add(key); + } + + allFieldNames.push(key); + }); + + const textFieldCandidatesOverridesWithKeywordPostfix = textFieldCandidatesOverrides.map( + (d) => `${d}.keyword` + ); + + const keywordFieldCandidates: string[] = [...acceptableFields].filter( + (field) => !textFieldCandidatesOverridesWithKeywordPostfix.includes(field) + ); + const textFieldCandidates: string[] = [...acceptableTextFields].filter((field) => { + const fieldName = field.replace(new RegExp(/\.text$/), ''); + return ( + (!keywordFieldCandidates.includes(fieldName) && + !keywordFieldCandidates.includes(`${fieldName}.keyword`)) || + textFieldCandidatesOverrides.includes(field) + ); + }); + + const isECS = containsECSIdentifierField(keywordFieldCandidates); + + return { + isECS, + // all keyword field candidates + keywordFieldCandidates: keywordFieldCandidates.sort(), + // preselection: + // - if we identify an ECS schema, filter by custom ECS safe list + // - if not, take the first 100 fields + selectedKeywordFieldCandidates: isECS + ? filterByECSFields(keywordFieldCandidates).sort() + : keywordFieldCandidates.sort().slice(0, 100), + // text field candidates + textFieldCandidates: textFieldCandidates.sort(), + selectedTextFieldCandidates: textFieldCandidates.sort(), + }; +}; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts index dc6d3537f8424..39fd8f5a2bc6a 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.test.ts @@ -16,313 +16,219 @@ import { fieldCapsLargeArraysMock } from './__mocks__/field_caps_large_arrays'; import { fetchIndexInfo } from './fetch_index_info'; -describe('fetch_index_info', () => { - describe('fetchFieldCandidates', () => { - it('returns field candidates and total hits for "my" fields', async () => { - const esClientFieldCapsMock = jest.fn(() => ({ - fields: { - // Should end up as a field candidate - myIpFieldName: { ip: { aggregatable: true } }, - // Should end up as a field candidate - myKeywordFieldName: { keyword: { aggregatable: true } }, - // Should not end up as a field candidate, it's a keyword but non-aggregatable - myKeywordFieldNameToBeIgnored: { keyword: { aggregatable: false } }, - // Should not end up as a field candidate since fields of type number will not be considered - myNumericFieldName: { number: {} }, +describe('fetchIndexInfo', () => { + it('returns field candidates and total hits for "my" fields', async () => { + const esClientFieldCapsMock = jest.fn(() => ({ + fields: { + // Should end up as a field candidate + myIpFieldName: { ip: { aggregatable: true } }, + // Should end up as a field candidate + myKeywordFieldName: { keyword: { aggregatable: true } }, + // Should not end up as a field candidate, it's a keyword but non-aggregatable + myKeywordFieldNameToBeIgnored: { keyword: { aggregatable: false } }, + // Should not end up as a field candidate since fields of type number will not be considered + myNumericFieldName: { number: {} }, + }, + })); + const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { + return { + hits: { + hits: [], + total: { value: 5000000 }, }, - })); - const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { - return { - hits: { - hits: [], - total: { value: 5000000 }, - }, - } as unknown as estypes.SearchResponse; - }); - - const esClientMock = { - fieldCaps: esClientFieldCapsMock, - search: esClientSearchMock, - } as unknown as ElasticsearchClient; - - const { baselineTotalDocCount, deviationTotalDocCount, fieldCandidates } = - await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); - - expect(fieldCandidates).toEqual(['myIpFieldName', 'myKeywordFieldName']); - expect(baselineTotalDocCount).toEqual(5000000); - expect(deviationTotalDocCount).toEqual(5000000); - expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); - expect(esClientSearchMock).toHaveBeenCalledTimes(2); + } as unknown as estypes.SearchResponse; }); - it('returns field candidates and total hits for pgBench mappings', async () => { - const esClientFieldCapsMock = jest.fn(() => fieldCapsPgBenchMock); - const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { - return { - hits: { - hits: [], - total: { value: 5000000 }, - }, - } as unknown as estypes.SearchResponse; - }); + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + search: esClientSearchMock, + } as unknown as ElasticsearchClient; - const esClientMock = { - fieldCaps: esClientFieldCapsMock, - search: esClientSearchMock, - } as unknown as ElasticsearchClient; + const { baselineTotalDocCount, deviationTotalDocCount, keywordFieldCandidates } = + await fetchIndexInfo({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); - const { - baselineTotalDocCount, - deviationTotalDocCount, - fieldCandidates, - textFieldCandidates, - } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); + expect(keywordFieldCandidates).toEqual(['myIpFieldName', 'myKeywordFieldName']); + expect(baselineTotalDocCount).toEqual(5000000); + expect(deviationTotalDocCount).toEqual(5000000); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + expect(esClientSearchMock).toHaveBeenCalledTimes(2); + }); - expect(fieldCandidates).toEqual([ - '_metadata.elastic_apm_trace_id', - '_metadata.elastic_apm_transaction_id', - '_metadata.message_template', - '_metadata.metadata_event_dataset', - '_metadata.user_id', - 'agent.ephemeral_id', - 'agent.hostname', - 'agent.id', - 'agent.name', - 'agent.type', - 'agent.version', - 'client.geo.city_name', - 'client.geo.continent_name', - 'client.geo.country_iso_code', - 'client.geo.country_name', - 'client.geo.region_iso_code', - 'client.geo.region_name', - 'client.ip', - 'cloud.account.id', - 'cloud.availability_zone', - 'cloud.instance.id', - 'cloud.instance.name', - 'cloud.machine.type', - 'cloud.project.id', - 'cloud.provider', - 'cloud.service.name', - 'container.id', - 'container.image.name', - 'container.labels.annotation_io_kubernetes_container_hash', - 'container.labels.annotation_io_kubernetes_container_restartCount', - 'container.labels.annotation_io_kubernetes_container_terminationMessagePath', - 'container.labels.annotation_io_kubernetes_container_terminationMessagePolicy', - 'container.labels.annotation_io_kubernetes_pod_terminationGracePeriod', - 'container.labels.io_kubernetes_container_logpath', - 'container.labels.io_kubernetes_container_name', - 'container.labels.io_kubernetes_docker_type', - 'container.labels.io_kubernetes_pod_name', - 'container.labels.io_kubernetes_pod_namespace', - 'container.labels.io_kubernetes_pod_uid', - 'container.labels.io_kubernetes_sandbox_id', - 'container.name', - 'container.runtime', - 'data_stream.dataset', - 'data_stream.namespace', - 'data_stream.type', - 'details', - 'ecs.version', - 'elasticapm_labels.span.id', - 'elasticapm_labels.trace.id', - 'elasticapm_labels.transaction.id', - 'elasticapm_span_id', - 'elasticapm_trace_id', - 'elasticapm_transaction_id', - 'event.category', - 'event.dataset', - 'event.kind', - 'event.module', - 'event.timezone', - 'event.type', - 'fileset.name', - 'host.architecture', - 'host.containerized', - 'host.hostname', - 'host.ip', - 'host.mac', - 'host.name', - 'host.os.codename', - 'host.os.family', - 'host.os.kernel', - 'host.os.name', - 'host.os.platform', - 'host.os.type', - 'host.os.version', - 'hostname', - 'input.type', - 'kubernetes.container.name', - 'kubernetes.labels.app', - 'kubernetes.labels.pod-template-hash', - 'kubernetes.namespace', - 'kubernetes.namespace_labels.kubernetes_io/metadata_name', - 'kubernetes.namespace_uid', - 'kubernetes.node.hostname', - 'kubernetes.node.labels.addon_gke_io/node-local-dns-ds-ready', - 'kubernetes.node.labels.beta_kubernetes_io/arch', - 'kubernetes.node.labels.beta_kubernetes_io/instance-type', - 'kubernetes.node.labels.beta_kubernetes_io/os', - 'kubernetes.node.labels.cloud_google_com/gke-boot-disk', - 'kubernetes.node.labels.cloud_google_com/gke-container-runtime', - 'kubernetes.node.labels.cloud_google_com/gke-nodepool', - 'kubernetes.node.labels.cloud_google_com/gke-os-distribution', - 'kubernetes.node.labels.cloud_google_com/machine-family', - 'kubernetes.node.labels.failure-domain_beta_kubernetes_io/region', - 'kubernetes.node.labels.failure-domain_beta_kubernetes_io/zone', - 'kubernetes.node.labels.kubernetes_io/arch', - 'kubernetes.node.labels.kubernetes_io/hostname', - 'kubernetes.node.labels.kubernetes_io/os', - 'kubernetes.node.labels.node_kubernetes_io/instance-type', - 'kubernetes.node.labels.node_type', - 'kubernetes.node.labels.topology_kubernetes_io/region', - 'kubernetes.node.labels.topology_kubernetes_io/zone', - 'kubernetes.node.name', - 'kubernetes.node.uid', - 'kubernetes.pod.ip', - 'kubernetes.pod.name', - 'kubernetes.pod.uid', - 'kubernetes.replicaset.name', - 'labels.userId', - 'log.file.path', - 'log.flags', - 'log.level', - 'log.logger', - 'log.origin.file.name', - 'log.origin.function', - 'log.original', - 'name', - 'postgresql.log.database', - 'postgresql.log.query', - 'postgresql.log.query_step', - 'postgresql.log.timestamp', - 'process.executable', - 'process.name', - 'process.thread.name', - 'related.user', - 'req.headers.accept', - 'req.headers.accept-encoding', - 'req.headers.cache-control', - 'req.headers.connection', - 'req.headers.content-length', - 'req.headers.content-type', - 'req.headers.cookie', - 'req.headers.host', - 'req.headers.origin', - 'req.headers.pragma', - 'req.headers.referer', - 'req.headers.traceparent', - 'req.headers.tracestate', - 'req.headers.user-agent', - 'req.headers.x-real-ip', - 'req.method', - 'req.remoteAddress', - 'req.url', - 'service.name', - 'service.type', - 'span.id', - 'stack', - 'stream', - 'trace.id', - 'transaction.id', - 'type', - 'user.name', - ]); - expect(textFieldCandidates).toEqual(['error.message', 'message']); - expect(baselineTotalDocCount).toEqual(5000000); - expect(deviationTotalDocCount).toEqual(5000000); - expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); - expect(esClientSearchMock).toHaveBeenCalledTimes(2); + it('returns field candidates and total hits for pgBench mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsPgBenchMock); + const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { + return { + hits: { + hits: [], + total: { value: 5000000 }, + }, + } as unknown as estypes.SearchResponse; }); - it('returns field candidates and total hits for ecommerce mappings', async () => { - const esClientFieldCapsMock = jest.fn(() => fieldCapsEcommerceMock); - const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { - return { - hits: { - hits: [], - total: { value: 5000000 }, - }, - } as unknown as estypes.SearchResponse; - }); - - const esClientMock = { - fieldCaps: esClientFieldCapsMock, - search: esClientSearchMock, - } as unknown as ElasticsearchClient; + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + search: esClientSearchMock, + } as unknown as ElasticsearchClient; + + const { + baselineTotalDocCount, + deviationTotalDocCount, + keywordFieldCandidates, + textFieldCandidates, + } = await fetchIndexInfo({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); - const { - baselineTotalDocCount, - deviationTotalDocCount, - fieldCandidates, - textFieldCandidates, - } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); + expect(keywordFieldCandidates).toEqual([ + 'agent.name', + 'agent.type', + 'agent.version', + 'client.geo.city_name', + 'client.geo.continent_name', + 'client.geo.country_name', + 'client.geo.region_name', + 'client.ip', + 'cloud.account.id', + 'cloud.availability_zone', + 'cloud.instance.id', + 'cloud.machine.type', + 'cloud.project.id', + 'cloud.provider', + 'cloud.service.name', + 'container.id', + 'container.image.name', + 'container.name', + 'container.runtime', + 'data_stream.dataset', + 'data_stream.namespace', + 'data_stream.type', + 'ecs.version', + 'event.category', + 'event.dataset', + 'event.kind', + 'event.module', + 'event.timezone', + 'event.type', + 'host.architecture', + 'host.ip', + 'host.name', + 'host.os.family', + 'host.os.kernel', + 'host.os.name', + 'host.os.platform', + 'host.os.version', + 'log.file.path', + 'log.level', + 'log.logger', + 'log.origin.file.name', + 'log.origin.function', + 'process.name', + 'service.name', + 'service.type', + 'user.name', + ]); + expect(textFieldCandidates).toEqual(['error.message', 'message']); + expect(baselineTotalDocCount).toEqual(5000000); + expect(deviationTotalDocCount).toEqual(5000000); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + expect(esClientSearchMock).toHaveBeenCalledTimes(2); + }); - expect(fieldCandidates).toEqual([ - 'category.keyword', - 'currency', - 'customer_first_name.keyword', - 'customer_full_name.keyword', - 'customer_gender', - 'customer_id', - 'customer_last_name.keyword', - 'customer_phone', - 'day_of_week', - 'email', - 'event.dataset', - 'geoip.city_name', - 'geoip.continent_name', - 'geoip.country_iso_code', - 'geoip.region_name', - 'manufacturer.keyword', - 'order_id', - 'products._id.keyword', - 'products.category.keyword', - 'products.manufacturer.keyword', - 'products.product_name.keyword', - 'products.sku', - 'sku', - 'type', - 'user', - ]); - expect(textFieldCandidates).toEqual([]); - expect(baselineTotalDocCount).toEqual(5000000); - expect(deviationTotalDocCount).toEqual(5000000); - expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); - expect(esClientSearchMock).toHaveBeenCalledTimes(2); + it('returns field candidates and total hits for ecommerce mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsEcommerceMock); + const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { + return { + hits: { + hits: [], + total: { value: 5000000 }, + }, + } as unknown as estypes.SearchResponse; }); - it('returns field candidates and total hits for large-arrays mappings', async () => { - const esClientFieldCapsMock = jest.fn(() => fieldCapsLargeArraysMock); - const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { - return { - hits: { - hits: [], - total: { value: 5000000 }, - }, - } as unknown as estypes.SearchResponse; - }); + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + search: esClientSearchMock, + } as unknown as ElasticsearchClient; + + const { + baselineTotalDocCount, + deviationTotalDocCount, + keywordFieldCandidates, + textFieldCandidates, + } = await fetchIndexInfo({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, + }); - const esClientMock = { - fieldCaps: esClientFieldCapsMock, - search: esClientSearchMock, - } as unknown as ElasticsearchClient; + expect(keywordFieldCandidates).toEqual([ + 'category.keyword', + 'currency', + 'customer_first_name.keyword', + 'customer_full_name.keyword', + 'customer_gender', + 'customer_id', + 'customer_last_name.keyword', + 'customer_phone', + 'day_of_week', + 'email', + 'event.dataset', + 'geoip.city_name', + 'geoip.continent_name', + 'geoip.country_iso_code', + 'geoip.region_name', + 'manufacturer.keyword', + 'order_id', + 'products._id.keyword', + 'products.category.keyword', + 'products.manufacturer.keyword', + 'products.product_name.keyword', + 'products.sku', + 'sku', + 'type', + 'user', + ]); + expect(textFieldCandidates).toEqual([]); + expect(baselineTotalDocCount).toEqual(5000000); + expect(deviationTotalDocCount).toEqual(5000000); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + expect(esClientSearchMock).toHaveBeenCalledTimes(2); + }); - const { - baselineTotalDocCount, - deviationTotalDocCount, - fieldCandidates, - textFieldCandidates, - } = await fetchIndexInfo({ esClient: esClientMock, arguments: paramsSearchQueryMock }); + it('returns field candidates and total hits for large-arrays mappings', async () => { + const esClientFieldCapsMock = jest.fn(() => fieldCapsLargeArraysMock); + const esClientSearchMock = jest.fn((req: estypes.SearchRequest): estypes.SearchResponse => { + return { + hits: { + hits: [], + total: { value: 5000000 }, + }, + } as unknown as estypes.SearchResponse; + }); - expect(fieldCandidates).toEqual(['items']); - expect(textFieldCandidates).toEqual([]); - expect(baselineTotalDocCount).toEqual(5000000); - expect(deviationTotalDocCount).toEqual(5000000); - expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); - expect(esClientSearchMock).toHaveBeenCalledTimes(2); + const esClientMock = { + fieldCaps: esClientFieldCapsMock, + search: esClientSearchMock, + } as unknown as ElasticsearchClient; + + const { + baselineTotalDocCount, + deviationTotalDocCount, + keywordFieldCandidates, + textFieldCandidates, + } = await fetchIndexInfo({ + esClient: esClientMock, + arguments: { ...paramsSearchQueryMock, textFieldCandidatesOverrides: [] }, }); + + expect(keywordFieldCandidates).toEqual(['items']); + expect(textFieldCandidates).toEqual([]); + expect(baselineTotalDocCount).toEqual(5000000); + expect(deviationTotalDocCount).toEqual(5000000); + expect(esClientFieldCapsMock).toHaveBeenCalledTimes(1); + expect(esClientSearchMock).toHaveBeenCalledTimes(2); }); }); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts index a97b6049ab7b5..4a2960c1775ef 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/fetch_index_info.ts @@ -7,32 +7,29 @@ import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { ES_FIELD_TYPES } from '@kbn/field-types'; -import type { ElasticsearchClient } from '@kbn/core/server'; - import type { AiopsLogRateAnalysisSchema } from '../api/schema'; +import { + fetchFieldCandidates, + type FetchFieldCandidatesParams, + type FetchFieldCandidatesParamsArguments, +} from './fetch_field_candidates'; import { getTotalDocCountRequest } from './get_total_doc_count_request'; // TODO Consolidate with duplicate `fetchPValues` in // `x-pack/plugins/observability_solution/apm/server/routes/correlations/queries/fetch_duration_field_candidates.ts` -// Supported field names for text fields for log rate analysis. -// If we analyse all detected text fields, we might run into performance -// issues with the `categorize_text` aggregation. Until this is resolved, we -// rely on a predefined white list of supported text fields. -const TEXT_FIELD_WHITE_LIST = ['message', 'error.message']; - -const SUPPORTED_ES_FIELD_TYPES = [ - ES_FIELD_TYPES.KEYWORD, - ES_FIELD_TYPES.IP, - ES_FIELD_TYPES.BOOLEAN, -]; - -const SUPPORTED_ES_FIELD_TYPES_TEXT = [ES_FIELD_TYPES.TEXT, ES_FIELD_TYPES.MATCH_ONLY_TEXT]; +export interface FetchIndexInfoParamsArguments { + skipFieldCandidates?: boolean; +} -interface IndexInfo { - fieldCandidates: string[]; +export interface FetchIndexInfoParams extends FetchFieldCandidatesParams { + arguments: AiopsLogRateAnalysisSchema & + FetchFieldCandidatesParamsArguments & + FetchIndexInfoParamsArguments; +} +export interface FetchIndexInfoResponse { + keywordFieldCandidates: string[]; textFieldCandidates: string[]; baselineTotalDocCount: number; deviationTotalDocCount: number; @@ -43,60 +40,15 @@ export const fetchIndexInfo = async ({ esClient, abortSignal, arguments: args, -}: { - esClient: ElasticsearchClient; - abortSignal?: AbortSignal; - arguments: AiopsLogRateAnalysisSchema & { - textFieldCandidatesOverrides?: string[]; - }; -}): Promise => { - const { textFieldCandidatesOverrides = [], ...params } = args; - const { index } = params; - // Get all supported fields - const respMapping = await esClient.fieldCaps( - { - fields: '*', - filters: '-metadata', - include_empty_fields: false, - index, - index_filter: { - range: { - [params.timeFieldName]: { - gte: params.deviationMin, - lte: params.deviationMax, - }, - }, - }, - types: [...SUPPORTED_ES_FIELD_TYPES, ...SUPPORTED_ES_FIELD_TYPES_TEXT], - }, - { signal: abortSignal, maxRetries: 0 } - ); - - const allFieldNames: string[] = []; - - const acceptableFields: Set = new Set(); - const acceptableTextFields: Set = new Set(); +}: FetchIndexInfoParams): Promise => { + const { skipFieldCandidates = false, ...fetchFieldCandidatesArguments } = args; + const { textFieldCandidatesOverrides = [], ...params } = fetchFieldCandidatesArguments; - Object.entries(respMapping.fields).forEach(([key, value]) => { - const fieldTypes = Object.keys(value) as ES_FIELD_TYPES[]; - const isSupportedType = fieldTypes.some((type) => SUPPORTED_ES_FIELD_TYPES.includes(type)); - const isAggregatable = fieldTypes.some((type) => value[type].aggregatable); - const isTextField = fieldTypes.some((type) => SUPPORTED_ES_FIELD_TYPES_TEXT.includes(type)); + // There's a bit of logic involved here because we want to fetch the data + // in parallel but the call to `fetchFieldCandidates` is optional. - // Check if fieldName is something we can aggregate on - if (isSupportedType && isAggregatable) { - acceptableFields.add(key); - } - - if (isTextField && TEXT_FIELD_WHITE_LIST.includes(key)) { - acceptableTextFields.add(key); - } - - allFieldNames.push(key); - }); - - // Get the total doc count for the baseline time range - const respBaselineTotalDocCount = await esClient.search( + // #1 First we define the promises that would fetch the data. + const baselineTotalDocCountPromise = esClient.search( getTotalDocCountRequest({ ...params, start: params.baselineMin, end: params.baselineMax }), { signal: abortSignal, @@ -104,38 +56,48 @@ export const fetchIndexInfo = async ({ } ); - // Get the total doc count for the deviation time range - const respDeviationTotalDocCount = await esClient.search( - getTotalDocCountRequest({ ...params, start: params.deviationMin, end: params.deviationMax }), + const deviationTotalDocCountPromise = esClient.search( + getTotalDocCountRequest({ + ...params, + start: params.deviationMin, + end: params.deviationMax, + }), { signal: abortSignal, maxRetries: 0, } ); - const textFieldCandidatesOverridesWithKeywordPostfix = textFieldCandidatesOverrides.map( - (d) => `${d}.keyword` - ); - - const fieldCandidates: string[] = [...acceptableFields].filter( - (field) => !textFieldCandidatesOverridesWithKeywordPostfix.includes(field) - ); - const textFieldCandidates: string[] = [...acceptableTextFields].filter((field) => { - const fieldName = field.replace(new RegExp(/\.text$/), ''); - return ( - (!fieldCandidates.includes(fieldName) && !fieldCandidates.includes(`${fieldName}.keyword`)) || - textFieldCandidatesOverrides.includes(field) - ); + const fetchFieldCandidatesPromise = fetchFieldCandidates({ + esClient, + abortSignal, + arguments: fetchFieldCandidatesArguments, }); + // #2 Then we build an array of these promises. To be able to handle the + // responses properly we build a tuple based on the types of the promises. + const promises: [ + typeof baselineTotalDocCountPromise, + typeof deviationTotalDocCountPromise, + typeof fetchFieldCandidatesPromise | undefined + ] = [ + baselineTotalDocCountPromise, + deviationTotalDocCountPromise, + !skipFieldCandidates ? fetchFieldCandidatesPromise : undefined, + ]; + + // #3 Finally, we await the promises and return the results. + const [respBaselineTotalDocCount, respDeviationTotalDocCount, fieldCandidates] = + await Promise.all(promises); + const baselineTotalDocCount = (respBaselineTotalDocCount.hits.total as estypes.SearchTotalHits) .value; const deviationTotalDocCount = (respDeviationTotalDocCount.hits.total as estypes.SearchTotalHits) .value; return { - fieldCandidates: fieldCandidates.sort(), - textFieldCandidates: textFieldCandidates.sort(), + keywordFieldCandidates: fieldCandidates?.selectedKeywordFieldCandidates.sort() ?? [], + textFieldCandidates: fieldCandidates?.textFieldCandidates.sort() ?? [], baselineTotalDocCount, deviationTotalDocCount, zeroDocsFallback: baselineTotalDocCount === 0 || deviationTotalDocCount === 0, diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/queries/get_query_with_params.ts b/x-pack/packages/ml/aiops_log_rate_analysis/queries/get_query_with_params.ts index 38e26923619f0..4a3b425bec863 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/queries/get_query_with_params.ts +++ b/x-pack/packages/ml/aiops_log_rate_analysis/queries/get_query_with_params.ts @@ -18,7 +18,7 @@ export const getTermsQuery = ({ fieldName, fieldValue }: FieldValuePair) => { }; interface QueryParams { - params: AiopsLogRateAnalysisSchema<'2'>; + params: AiopsLogRateAnalysisSchema<'3'>; termFilters?: FieldValuePair[]; filter?: estypes.QueryDslQueryContainer; skipRangeQuery?: boolean; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.test.ts b/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.test.ts new file mode 100644 index 0000000000000..4f829b0e0bf5a --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.test.ts @@ -0,0 +1,83 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { httpServiceMock } from '@kbn/core/public/mocks'; + +import type { FetchFieldCandidatesResponse } from '../queries/fetch_field_candidates'; + +import { fetchFieldCandidates } from './log_rate_analysis_field_candidates_slice'; + +const mockHttp = httpServiceMock.createStartContract(); + +describe('fetchFieldCandidates', () => { + it('dispatches field candidates', async () => { + const mockDispatch = jest.fn(); + const mockGetState = jest.fn(); + + const mockResponse: FetchFieldCandidatesResponse = { + isECS: false, + keywordFieldCandidates: ['keyword-field', 'another-keyword-field'], + selectedKeywordFieldCandidates: ['keyword-field'], + textFieldCandidates: ['text-field', 'another-text-field', 'yet-another-text-field'], + selectedTextFieldCandidates: ['text-field'], + }; + + mockHttp.post.mockResolvedValue(mockResponse); + + const startParams = { + http: mockHttp, + endpoint: '/internal/aiops/log_rate_analysis', + apiVersion: '3', + abortCtrl: { current: new AbortController() }, + body: { + start: 0, + end: 0, + searchQuery: JSON.stringify({ match_all: {} }), + timeFieldName: '@timestamp', + index: 'myIndex', + grouping: true, + flushFix: true, + baselineMin: 0, + baselineMax: 0, + deviationMin: 0, + deviationMax: 0, + sampleProbability: 1, + }, + headers: {}, + }; + + const action = fetchFieldCandidates(startParams); + + await action(mockDispatch, mockGetState, undefined); + + // Expected to be called 3 times including the pending and fulfilled actions. + expect(mockDispatch).toHaveBeenCalledTimes(3); + expect(mockDispatch).toHaveBeenNthCalledWith(2, { + payload: { + fieldSelectionMessage: + '2 out of 5 fields were preselected for the analysis. Use the "Fields" dropdown to adjust the selection.', + fieldFilterSkippedItems: [ + 'another-keyword-field', + 'another-text-field', + 'yet-another-text-field', + ], + fieldFilterUniqueItems: [ + 'another-keyword-field', + 'another-text-field', + 'keyword-field', + 'text-field', + 'yet-another-text-field', + ], + keywordFieldCandidates: ['keyword-field', 'another-keyword-field'], + selectedKeywordFieldCandidates: ['keyword-field'], + selectedTextFieldCandidates: ['text-field'], + textFieldCandidates: ['text-field', 'another-text-field', 'yet-another-text-field'], + }, + type: 'log_rate_analysis_field_candidates/setAllFieldCandidates', + }); + }); +}); diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.ts b/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.ts new file mode 100644 index 0000000000000..aa5cb969e5401 --- /dev/null +++ b/x-pack/packages/ml/aiops_log_rate_analysis/state/log_rate_analysis_field_candidates_slice.ts @@ -0,0 +1,160 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { PayloadAction } from '@reduxjs/toolkit'; +import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'; + +import { i18n } from '@kbn/i18n'; +import type { HttpSetup, HttpFetchOptions } from '@kbn/core/public'; +import { AIOPS_API_ENDPOINT } from '@kbn/aiops-common/constants'; + +import type { AiopsLogRateAnalysisSchema } from '../api/schema'; +import type { FetchFieldCandidatesResponse } from '../queries/fetch_field_candidates'; + +const ecsIdentifiedMessage = i18n.translate( + 'xpack.aiops.logRateAnalysis.fieldCandidates.ecsIdentifiedMessage', + { + defaultMessage: 'The source documents were identified as ECS compliant.', + } +); + +const fieldsDropdownHintMessage = i18n.translate( + 'xpack.aiops.logRateAnalysis.fieldCandidates.fieldsDropdownHintMessage', + { + defaultMessage: 'Use the "Fields" dropdown to adjust the selection.', + } +); + +const getFieldSelectionMessage = ( + isECS: boolean, + allItemsCount: number, + selectedItemsCount: number +): string | undefined => { + if (allItemsCount <= selectedItemsCount || selectedItemsCount < 2) return; + + const ecsMessage = isECS ? `${ecsIdentifiedMessage} ` : ''; + + const fieldsSelectedMessage = i18n.translate( + 'xpack.aiops.logRateAnalysis.fieldCandidates.fieldsSelectedMessage', + { + defaultMessage: + '{selectedItemsCount} out of {allItemsCount} fields were preselected for the analysis.', + values: { selectedItemsCount, allItemsCount }, + } + ); + + return `${ecsMessage}${fieldsSelectedMessage} ${fieldsDropdownHintMessage}`; +}; + +export interface FetchFieldCandidatesParams { + http: HttpSetup; + endpoint: string; + apiVersion?: string; + abortCtrl: React.MutableRefObject; + body?: AiopsLogRateAnalysisSchema; + headers?: HttpFetchOptions['headers']; +} + +/** + * Async thunk to fetch field candidates. + */ +export const fetchFieldCandidates = createAsyncThunk( + 'log_rate_analysis_field_candidates/fetch_field_candidates', + async (options: FetchFieldCandidatesParams, thunkApi) => { + const { http, abortCtrl, body, headers } = options; + + // Get field candidates so we're able to populate the field selection dropdown. + const fieldCandidatesResp = await http.post( + AIOPS_API_ENDPOINT.LOG_RATE_ANALYSIS_FIELD_CANDIDATES, + { + signal: abortCtrl.current.signal, + version: '1', + headers, + ...(body && Object.keys(body).length > 0 ? { body: JSON.stringify(body) } : {}), + } + ); + const { + isECS, + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = fieldCandidatesResp; + + const fieldFilterUniqueItems = [...keywordFieldCandidates, ...textFieldCandidates].sort(); + const fieldFilterUniqueSelectedItems = [ + ...selectedKeywordFieldCandidates, + ...selectedTextFieldCandidates, + ]; + const fieldFilterSkippedItems = fieldFilterUniqueItems.filter( + (d) => !fieldFilterUniqueSelectedItems.includes(d) + ); + + thunkApi.dispatch( + setAllFieldCandidates({ + fieldSelectionMessage: getFieldSelectionMessage( + isECS, + fieldFilterUniqueItems.length, + fieldFilterUniqueSelectedItems.length + ), + fieldFilterUniqueItems, + fieldFilterSkippedItems, + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + }) + ); + } +); + +export interface FieldCandidatesState { + isLoading: boolean; + fieldSelectionMessage?: string; + fieldFilterUniqueItems: string[]; + fieldFilterSkippedItems: string[]; + keywordFieldCandidates: string[]; + textFieldCandidates: string[]; + selectedKeywordFieldCandidates: string[]; + selectedTextFieldCandidates: string[]; +} + +function getDefaultState(): FieldCandidatesState { + return { + isLoading: false, + fieldFilterUniqueItems: [], + fieldFilterSkippedItems: [], + keywordFieldCandidates: [], + textFieldCandidates: [], + selectedKeywordFieldCandidates: [], + selectedTextFieldCandidates: [], + }; +} + +export const logRateAnalysisFieldCandidatesSlice = createSlice({ + name: 'log_rate_analysis_field_candidates', + initialState: getDefaultState(), + reducers: { + setAllFieldCandidates: ( + state: FieldCandidatesState, + action: PayloadAction> + ) => { + return { ...state, ...action.payload }; + }, + }, + extraReducers: (builder) => { + builder.addCase(fetchFieldCandidates.pending, (state) => { + state.isLoading = true; + }); + builder.addCase(fetchFieldCandidates.fulfilled, (state) => { + state.isLoading = false; + }); + }, +}); + +// Action creators are generated for each case reducer function +export const { setAllFieldCandidates } = logRateAnalysisFieldCandidatesSlice.actions; diff --git a/x-pack/packages/ml/aiops_log_rate_analysis/state/store.tsx b/x-pack/packages/ml/aiops_log_rate_analysis/state/store.tsx index 439c80da5ac33..1589b27348d89 100644 --- a/x-pack/packages/ml/aiops_log_rate_analysis/state/store.tsx +++ b/x-pack/packages/ml/aiops_log_rate_analysis/state/store.tsx @@ -16,6 +16,7 @@ import { logRateAnalysisResultsSlice } from '../api/stream_reducer'; import { logRateAnalysisSlice } from './log_rate_analysis_slice'; import { logRateAnalysisTableRowSlice } from './log_rate_analysis_table_row_slice'; +import { logRateAnalysisFieldCandidatesSlice } from './log_rate_analysis_field_candidates_slice'; import type { InitialAnalysisStart } from './log_rate_analysis_slice'; const getReduxStore = () => @@ -23,6 +24,8 @@ const getReduxStore = () => reducer: { // General page state logRateAnalysis: logRateAnalysisSlice.reducer, + // Field candidates + logRateAnalysisFieldCandidates: logRateAnalysisFieldCandidatesSlice.reducer, // Analysis results logRateAnalysisResults: logRateAnalysisResultsSlice.reducer, // Handles running the analysis diff --git a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap index a8477a44e1ada..286a41c376c23 100644 --- a/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap +++ b/x-pack/plugins/actions/server/integration_tests/__snapshots__/connector_types.test.ts.snap @@ -32415,6 +32415,616 @@ Object { } `; +exports[`Connector type config checks detect connector type changes for: .thehive 1`] = ` +Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "comments": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "items": Array [ + Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "comment": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "commentId": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + "type": "object", + }, + ], + "type": "array", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "incident": Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "description": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "externalId": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "severity": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "type": "number", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "tags": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "items": Array [ + Object { + "flags": Object { + "error": [Function], + "presence": "optional", + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + ], + "type": "array", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "title": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "tlp": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "type": "number", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + }, + "type": "object", + }, + }, + "type": "object", +} +`; + +exports[`Connector type config checks detect connector type changes for: .thehive 2`] = ` +Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "description": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "severity": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "default": 2, + "error": [Function], + "presence": "optional", + }, + "type": "number", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "source": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "sourceRef": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "tags": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "items": Array [ + Object { + "flags": Object { + "error": [Function], + "presence": "optional", + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + ], + "type": "array", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "title": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "tlp": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "default": 2, + "error": [Function], + "presence": "optional", + }, + "type": "number", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "type": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + "type": "object", +} +`; + +exports[`Connector type config checks detect connector type changes for: .thehive 3`] = ` +Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "organisation": Object { + "flags": Object { + "default": null, + "error": [Function], + "presence": "optional", + }, + "matches": Array [ + Object { + "schema": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + Object { + "schema": Object { + "allow": Array [ + null, + ], + "flags": Object { + "error": [Function], + "only": true, + }, + "type": "any", + }, + }, + ], + "type": "alternatives", + }, + "url": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + "type": "object", +} +`; + +exports[`Connector type config checks detect connector type changes for: .thehive 4`] = ` +Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "apiKey": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + }, + "type": "object", +} +`; + +exports[`Connector type config checks detect connector type changes for: .thehive 5`] = ` +Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + }, + "keys": Object { + "subAction": Object { + "flags": Object { + "error": [Function], + }, + "rules": Array [ + Object { + "args": Object { + "method": [Function], + }, + "name": "custom", + }, + ], + "type": "string", + }, + "subActionParams": Object { + "flags": Object { + "default": Object { + "special": "deep", + }, + "error": [Function], + "presence": "optional", + "unknown": true, + }, + "keys": Object {}, + "preferences": Object { + "stripUnknown": Object { + "objects": false, + }, + }, + "type": "object", + }, + }, + "type": "object", +} +`; + exports[`Connector type config checks detect connector type changes for: .tines 1`] = ` Object { "flags": Object { diff --git a/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts b/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts index 79d6b4c8d7964..a26c775a74a5b 100644 --- a/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts +++ b/x-pack/plugins/actions/server/integration_tests/mocks/connector_types.ts @@ -29,6 +29,7 @@ export const connectorTypes: string[] = [ '.gemini', '.d3security', '.resilient', + '.thehive', '.sentinelone', '.crowdstrike', '.cases', diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/item_filter_popover.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/item_filter_popover.tsx index 25fb64def8550..9c96de316103b 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/item_filter_popover.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/item_filter_popover.tsx @@ -101,6 +101,14 @@ export const ItemFilterPopover: FC = ({ ); }, [uniqueItemNames]); + // If the supplied list of initial skipped items changes, only update if + // the list hasn't been touched yet. + useEffect(() => { + if (!isTouched) { + setSkippedItems(initialSkippedItems); + } + }, [initialSkippedItems, isTouched]); + const selectedItemCount = uniqueItemNames.length - skippedItems.length; return ( diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx index 2a01718dc31c2..6dff02f95286f 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_results.tsx @@ -7,7 +7,7 @@ import type { FC } from 'react'; import React, { useEffect, useMemo, useRef, useState } from 'react'; -import { isEqual, uniq } from 'lodash'; +import { isEqual } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; import { @@ -40,11 +40,13 @@ import { FormattedMessage } from '@kbn/i18n-react'; import type { SignificantItem, SignificantItemGroup } from '@kbn/ml-agg-utils'; import { AIOPS_TELEMETRY_ID } from '@kbn/aiops-common/constants'; import type { AiopsLogRateAnalysisSchema } from '@kbn/aiops-log-rate-analysis/api/schema'; -import type { AiopsLogRateAnalysisSchemaSignificantItem } from '@kbn/aiops-log-rate-analysis/api/schema_v2'; +import type { AiopsLogRateAnalysisSchemaSignificantItem } from '@kbn/aiops-log-rate-analysis/api/schema_v3'; import { setCurrentAnalysisType, setCurrentAnalysisWindowParameters, + resetResults, } from '@kbn/aiops-log-rate-analysis/api/stream_reducer'; +import { fetchFieldCandidates } from '@kbn/aiops-log-rate-analysis/state/log_rate_analysis_field_candidates_slice'; import { useAiopsAppContext } from '../../hooks/use_aiops_app_context'; import { useDataSource } from '../../hooks/use_data_source'; @@ -92,7 +94,7 @@ const resultsGroupedOffId = 'aiopsLogRateAnalysisGroupingOff'; const resultsGroupedOnId = 'aiopsLogRateAnalysisGroupingOn'; const fieldFilterHelpText = i18n.translate('xpack.aiops.logRateAnalysis.page.fieldFilterHelpText', { defaultMessage: - 'Deselect non-relevant fields to remove them from groups and click the Apply button to rerun the grouping. Use the search bar to filter the list, then select/deselect multiple fields with the actions below.', + 'Deselect non-relevant fields to remove them from the analysis and click the Apply button to rerun the analysis. Use the search bar to filter the list, then select/deselect multiple fields with the actions below.', }); const columnsFilterHelpText = i18n.translate( 'xpack.aiops.logRateAnalysis.page.columnsFilterHelpText', @@ -118,8 +120,8 @@ const columnSearchAriaLabel = i18n.translate('xpack.aiops.analysis.columnSelecto const columnsButton = i18n.translate('xpack.aiops.logRateAnalysis.page.columnsFilterButtonLabel', { defaultMessage: 'Columns', }); -const fieldsButton = i18n.translate('xpack.aiops.analysis.fieldFilterButtonLabel', { - defaultMessage: 'Filter fields', +const fieldsButton = i18n.translate('xpack.aiops.analysis.fieldsButtonLabel', { + defaultMessage: 'Fields', }); /** @@ -172,7 +174,8 @@ export const LogRateAnalysisResults: FC = ({ } = useAppSelector((s) => s.logRateAnalysis); const { isRunning, errors: streamErrors } = useAppSelector((s) => s.logRateAnalysisStream); const data = useAppSelector((s) => s.logRateAnalysisResults); - const { currentAnalysisType, currentAnalysisWindowParameters } = data; + const fieldCandidates = useAppSelector((s) => s.logRateAnalysisFieldCandidates); + const { currentAnalysisWindowParameters } = data; // Store the performance metric's start time using a ref // to be able to track it across rerenders. @@ -180,8 +183,6 @@ export const LogRateAnalysisResults: FC = ({ const abortCtrl = useRef(new AbortController()); const [groupResults, setGroupResults] = useState(false); - const [groupSkipFields, setGroupSkipFields] = useState([]); - const [uniqueFieldNames, setUniqueFieldNames] = useState([]); const [overrides, setOverrides] = useState( undefined ); @@ -201,15 +202,26 @@ export const LogRateAnalysisResults: FC = ({ dispatch(clearAllRowState()); }; + const { + fieldFilterUniqueItems, + fieldFilterSkippedItems, + keywordFieldCandidates, + textFieldCandidates, + selectedKeywordFieldCandidates, + selectedTextFieldCandidates, + } = fieldCandidates; + const fieldFilterButtonDisabled = + isRunning || fieldCandidates.isLoading || fieldFilterUniqueItems.length === 0; + const onFieldsFilterChange = (skippedFields: string[]) => { - setGroupSkipFields(skippedFields); + dispatch(resetResults()); setOverrides({ loaded: 0, - remainingFieldCandidates: [], - significantItems: data.significantItems.filter( - (d) => !skippedFields.includes(d.fieldName) - ) as AiopsLogRateAnalysisSchemaSignificantItem[], - regroupOnly: true, + remainingKeywordFieldCandidates: keywordFieldCandidates.filter( + (d) => !skippedFields.includes(d) + ), + remainingTextFieldCandidates: textFieldCandidates.filter((d) => !skippedFields.includes(d)), + regroupOnly: false, }); startHandler(true, false); }; @@ -218,13 +230,6 @@ export const LogRateAnalysisResults: FC = ({ setSkippedColumns(columns); }; - const { significantItems } = data; - - useEffect( - () => setUniqueFieldNames(uniq(significantItems.map((d) => d.fieldName)).sort()), - [significantItems] - ); - function cancelHandler() { abortCtrl.current.abort(); dispatch(cancelStream()); @@ -232,16 +237,25 @@ export const LogRateAnalysisResults: FC = ({ useEffect(() => { if (!isRunning) { - const { loaded, remainingFieldCandidates, groupsMissing } = data; + const { + loaded, + remainingKeywordFieldCandidates, + remainingTextFieldCandidates, + groupsMissing, + } = data; if ( loaded < 1 && - ((Array.isArray(remainingFieldCandidates) && remainingFieldCandidates.length > 0) || + ((Array.isArray(remainingKeywordFieldCandidates) && + remainingKeywordFieldCandidates.length > 0) || + (Array.isArray(remainingTextFieldCandidates) && + remainingTextFieldCandidates.length > 0) || groupsMissing) ) { setOverrides({ loaded, - remainingFieldCandidates, + remainingKeywordFieldCandidates, + remainingTextFieldCandidates, significantItems: data.significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], }); } else if (loaded > 0) { @@ -271,8 +285,11 @@ export const LogRateAnalysisResults: FC = ({ // significant items on analysis refresh. function startHandler(continueAnalysis = false, resetGroupButton = true) { if (!continueAnalysis) { - setOverrides(undefined); - setUniqueFieldNames([]); + dispatch(resetResults()); + setOverrides({ + remainingKeywordFieldCandidates: selectedKeywordFieldCandidates, + remainingTextFieldCandidates: selectedTextFieldCandidates, + }); } // Reset grouping to false and clear all row selections when restarting the analysis. @@ -291,14 +308,14 @@ export const LogRateAnalysisResults: FC = ({ } const startParams = useMemo(() => { - if (!chartWindowParameters) { + if (!chartWindowParameters || !earliest || !latest) { return undefined; } return { http, endpoint: '/internal/aiops/log_rate_analysis', - apiVersion: '2', + apiVersion: '3', abortCtrl, body: { start: earliest, @@ -342,6 +359,7 @@ export const LogRateAnalysisResults: FC = ({ useEffect(() => { if (startParams) { + dispatch(fetchFieldCandidates(startParams)); dispatch(setCurrentAnalysisType(analysisType)); dispatch(setCurrentAnalysisWindowParameters(chartWindowParameters)); dispatch(startStream(startParams)); @@ -369,7 +387,7 @@ export const LogRateAnalysisResults: FC = ({ // Disable the grouping switch toggle only if no groups were found, // the toggle wasn't enabled already and no fields were selected to be skipped. - const disabledGroupResultsSwitch = !foundGroups && !groupResults && groupSkipFields.length === 0; + const disabledGroupResultsSwitch = !foundGroups && !groupResults; const toggleButtons = [ { @@ -421,13 +439,15 @@ export const LogRateAnalysisResults: FC = ({ @@ -451,13 +471,9 @@ export const LogRateAnalysisResults: FC = ({ /> - {showLogRateAnalysisResultsTable && currentAnalysisType !== undefined && ( - <> - - - - - )} + + + {errors.length > 0 ? ( <> diff --git a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_type_callout.tsx b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_type_callout.tsx index 9c08e5d31590c..26f15424c828c 100644 --- a/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_type_callout.tsx +++ b/x-pack/plugins/aiops/public/components/log_rate_analysis/log_rate_analysis_type_callout.tsx @@ -7,24 +7,27 @@ import React, { type FC } from 'react'; -import { EuiCallOut, EuiText } from '@elastic/eui'; +import { EuiCallOut, EuiSpacer, EuiText } from '@elastic/eui'; -import { LOG_RATE_ANALYSIS_TYPE, type LogRateAnalysisType } from '@kbn/aiops-log-rate-analysis'; +import { LOG_RATE_ANALYSIS_TYPE } from '@kbn/aiops-log-rate-analysis'; import { useAppSelector } from '@kbn/aiops-log-rate-analysis/state'; import { i18n } from '@kbn/i18n'; -interface LogRateAnalysisTypeCallOutProps { - analysisType: LogRateAnalysisType; -} - -export const LogRateAnalysisTypeCallOut: FC = ({ - analysisType, -}) => { +export const LogRateAnalysisTypeCallOut: FC = () => { + const showCallout = useAppSelector((s) => s.logRateAnalysisResults.significantItems.length > 0); const zeroDocsFallback = useAppSelector((s) => s.logRateAnalysisResults.zeroDocsFallback); + const analysisType = useAppSelector((s) => s.logRateAnalysisResults.currentAnalysisType); + const fieldSelectionMessage = useAppSelector( + (s) => s.logRateAnalysisFieldCandidates.fieldSelectionMessage + ); let callOutTitle: string; let callOutText: string; + if (!showCallout) { + return null; + } + if (!zeroDocsFallback && analysisType === LOG_RATE_ANALYSIS_TYPE.SPIKE) { callOutTitle = i18n.translate('xpack.aiops.analysis.analysisTypeSpikeCallOutTitle', { defaultMessage: 'Analysis type: Log rate spike', @@ -62,13 +65,20 @@ export const LogRateAnalysisTypeCallOut: FC = ( } return ( - {callOutTitle}} - color="primary" - iconType="pin" - size="s" - > - {callOutText} - + <> + + {callOutTitle}} + color="primary" + iconType="pin" + size="s" + > + + {callOutText} + {fieldSelectionMessage && ` ${fieldSelectionMessage}`} + + + + ); }; diff --git a/x-pack/plugins/aiops/public/hooks/use_filters_query.tsx.test.tsx b/x-pack/plugins/aiops/public/hooks/use_filters_query.test.tsx similarity index 100% rename from x-pack/plugins/aiops/public/hooks/use_filters_query.tsx.test.tsx rename to x-pack/plugins/aiops/public/hooks/use_filters_query.test.tsx diff --git a/x-pack/plugins/aiops/server/plugin.ts b/x-pack/plugins/aiops/server/plugin.ts index 7e99a89dab5b5..4df2199847403 100755 --- a/x-pack/plugins/aiops/server/plugin.ts +++ b/x-pack/plugins/aiops/server/plugin.ts @@ -25,6 +25,7 @@ import type { AiopsPluginSetupDeps, AiopsPluginStartDeps, } from './types'; +import { defineRoute as defineLogRateAnalysisFieldCandidatesRoute } from './routes/log_rate_analysis_field_candidates/define_route'; import { defineRoute as defineLogRateAnalysisRoute } from './routes/log_rate_analysis/define_route'; import { defineRoute as defineCategorizationFieldValidationRoute } from './routes/categorization_field_validation/define_route'; import { registerCasesPersistableState } from './register_cases'; @@ -63,6 +64,7 @@ export class AiopsPlugin // Register server side APIs void core.getStartServices().then(([coreStart, depsStart]) => { + defineLogRateAnalysisFieldCandidatesRoute(router, aiopsLicense, coreStart, this.usageCounter); defineLogRateAnalysisRoute(router, aiopsLicense, this.logger, coreStart, this.usageCounter); defineCategorizationFieldValidationRoute(router, aiopsLicense, this.usageCounter); }); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts index 1a01d9c543206..8a5cb4e042e24 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/index_info_handler.ts @@ -11,7 +11,10 @@ import { updateLoadingState, setZeroDocsFallback, } from '@kbn/aiops-log-rate-analysis/api/stream_reducer'; -import type { AiopsLogRateAnalysisApiVersion as ApiVersion } from '@kbn/aiops-log-rate-analysis/api/schema'; +import type { + AiopsLogRateAnalysisSchema, + AiopsLogRateAnalysisApiVersion as ApiVersion, +} from '@kbn/aiops-log-rate-analysis/api/schema'; import { isRequestAbortedError } from '@kbn/aiops-common/is_request_aborted_error'; import { fetchIndexInfo } from '@kbn/aiops-log-rate-analysis/queries/fetch_index_info'; @@ -30,89 +33,110 @@ export const indexInfoHandlerFactory = requestBody, responseStream, stateHandler, + version, } = options; - const fieldCandidates: string[] = []; - let fieldCandidatesCount = fieldCandidates.length; + const keywordFieldCandidates: string[] = []; + let keywordFieldCandidatesCount = keywordFieldCandidates.length; const textFieldCandidates: string[] = []; let textFieldCandidatesCount = textFieldCandidates.length; let zeroDocsFallback = false; - if (!requestBody.overrides?.remainingFieldCandidates) { - logDebugMessage('Fetch index information.'); - responseStream.push( - updateLoadingState({ - ccsWarning: false, - loaded: stateHandler.loaded(), - loadingState: i18n.translate( - 'xpack.aiops.logRateAnalysis.loadingState.loadingIndexInformation', - { - defaultMessage: 'Loading index information.', - } - ), - }) + logDebugMessage('Fetch index information.'); + responseStream.push( + updateLoadingState({ + ccsWarning: false, + loaded: stateHandler.loaded(), + loadingState: i18n.translate( + 'xpack.aiops.logRateAnalysis.loadingState.loadingIndexInformation', + { + defaultMessage: 'Loading index information.', + } + ), + }) + ); + + let skipFieldCandidates = false; + + if (version === '2') { + skipFieldCandidates = Array.isArray( + (requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.remainingFieldCandidates ); + } else if (version === '3') { + skipFieldCandidates = + Array.isArray( + (requestBody as AiopsLogRateAnalysisSchema<'3'>).overrides + ?.remainingKeywordFieldCandidates + ) || + Array.isArray( + (requestBody as AiopsLogRateAnalysisSchema<'3'>).overrides?.remainingTextFieldCandidates + ); + } - try { - const indexInfo = await fetchIndexInfo({ - esClient, - abortSignal, - arguments: { - ...requestBody, - textFieldCandidatesOverrides: ['message', 'error.message'], - }, - }); - - logDebugMessage(`Baseline document count: ${indexInfo.baselineTotalDocCount}`); - logDebugMessage(`Deviation document count: ${indexInfo.deviationTotalDocCount}`); - - fieldCandidates.push(...indexInfo.fieldCandidates); - fieldCandidatesCount = fieldCandidates.length; - textFieldCandidates.push(...indexInfo.textFieldCandidates); - textFieldCandidatesCount = textFieldCandidates.length; - zeroDocsFallback = indexInfo.zeroDocsFallback; - } catch (e) { - if (!isRequestAbortedError(e)) { - logger.error(`Failed to fetch index information, got: \n${e.toString()}`); - responseStream.pushError(`Failed to fetch index information.`); - } - responseStream.end(); - return; + try { + const indexInfo = await fetchIndexInfo({ + esClient, + abortSignal, + arguments: { + ...requestBody, + textFieldCandidatesOverrides: ['message', 'error.message'], + skipFieldCandidates, + }, + }); + + logDebugMessage(`Baseline document count: ${indexInfo.baselineTotalDocCount}`); + logDebugMessage(`Deviation document count: ${indexInfo.deviationTotalDocCount}`); + + keywordFieldCandidates.push(...indexInfo.keywordFieldCandidates); + keywordFieldCandidatesCount = keywordFieldCandidates.length; + textFieldCandidates.push(...indexInfo.textFieldCandidates); + textFieldCandidatesCount = textFieldCandidates.length; + zeroDocsFallback = indexInfo.zeroDocsFallback; + } catch (e) { + if (!isRequestAbortedError(e)) { + logger.error(`Failed to fetch index information, got: \n${e.toString()}`); + responseStream.pushError(`Failed to fetch index information.`); } + responseStream.end(); + return; + } - stateHandler.loaded(LOADED_FIELD_CANDIDATES, false); - - responseStream.pushPingWithTimeout(); - - responseStream.push( - updateLoadingState({ - ccsWarning: false, - loaded: stateHandler.loaded(), - loadingState: i18n.translate( - 'xpack.aiops.logRateAnalysis.loadingState.identifiedFieldCandidates', - { - defaultMessage: - 'Identified {fieldCandidatesCount, plural, one {# field candidate} other {# field candidates}}.', - values: { - fieldCandidatesCount: fieldCandidatesCount + textFieldCandidatesCount, - }, - } - ), - }) - ); - - responseStream.push(setZeroDocsFallback(zeroDocsFallback)); - - if (fieldCandidatesCount === 0) { - responseStream.endWithUpdatedLoadingState(); - } else if (stateHandler.shouldStop()) { - logDebugMessage('shouldStop after fetching field candidates.'); - responseStream.end(); - return; - } + stateHandler.loaded(LOADED_FIELD_CANDIDATES, false); + + responseStream.pushPingWithTimeout(); + + responseStream.push( + updateLoadingState({ + ccsWarning: false, + loaded: stateHandler.loaded(), + loadingState: i18n.translate( + 'xpack.aiops.logRateAnalysis.loadingState.identifiedFieldCandidates', + { + defaultMessage: + 'Identified {fieldCandidatesCount, plural, one {# field candidate} other {# field candidates}}.', + values: { + fieldCandidatesCount: keywordFieldCandidatesCount + textFieldCandidatesCount, + }, + } + ), + }) + ); + + responseStream.push(setZeroDocsFallback(zeroDocsFallback)); + + if ( + !skipFieldCandidates && + keywordFieldCandidatesCount === 0 && + textFieldCandidatesCount === 0 + ) { + responseStream.endWithUpdatedLoadingState(); + } else if (stateHandler.shouldStop()) { + logDebugMessage('shouldStop after fetching field candidates.'); + responseStream.end(); + return; } - return { fieldCandidates, textFieldCandidates, zeroDocsFallback }; + return { keywordFieldCandidates, textFieldCandidates, zeroDocsFallback }; }; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts index 16c2d9f9212a5..8765ff969bf48 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/significant_items_handler.ts @@ -44,15 +44,16 @@ export const significantItemsHandlerFactory = requestBody, responseStream, stateHandler, + version, }: ResponseStreamFetchOptions) => async ({ - fieldCandidates, + keywordFieldCandidates, textFieldCandidates, }: { - fieldCandidates: string[]; + keywordFieldCandidates: string[]; textFieldCandidates: string[]; }) => { - let fieldCandidatesCount = fieldCandidates.length; + let keywordFieldCandidatesCount = keywordFieldCandidates.length; const textFieldCandidatesCount = textFieldCandidates.length; // This will store the combined count of detected significant log patterns and keywords @@ -61,7 +62,7 @@ export const significantItemsHandlerFactory = const significantCategories: SignificantItem[] = []; significantCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + ...((requestBody as AiopsLogRateAnalysisSchema<'3'>).overrides?.significantItems?.filter( (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN ) ?? []) ); @@ -69,30 +70,63 @@ export const significantItemsHandlerFactory = const significantTerms: SignificantItem[] = []; significantTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + ...((requestBody as AiopsLogRateAnalysisSchema<'3'>).overrides?.significantItems?.filter( (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD ) ?? []) ); - let remainingFieldCandidates: string[]; - let loadingStepSizePValues = PROGRESS_STEP_P_VALUES; + let remainingKeywordFieldCandidates: string[]; + let remainingTextFieldCandidates: string[]; + let loadingStepSizePValues: number; - if (requestBody.overrides?.remainingFieldCandidates) { - fieldCandidates.push(...requestBody.overrides?.remainingFieldCandidates); - remainingFieldCandidates = requestBody.overrides?.remainingFieldCandidates; - fieldCandidatesCount = fieldCandidates.length; + if (requestBody.overrides?.loaded) { loadingStepSizePValues = - LOADED_FIELD_CANDIDATES + - PROGRESS_STEP_P_VALUES - - (requestBody.overrides?.loaded ?? PROGRESS_STEP_P_VALUES); + LOADED_FIELD_CANDIDATES + PROGRESS_STEP_P_VALUES - requestBody.overrides?.loaded; } else { - remainingFieldCandidates = fieldCandidates; + loadingStepSizePValues = LOADED_FIELD_CANDIDATES; + } + + if (version === '2') { + const overridesRemainingFieldCandidates = (requestBody as AiopsLogRateAnalysisSchema<'2'>) + .overrides?.remainingFieldCandidates; + + if (Array.isArray(overridesRemainingFieldCandidates)) { + keywordFieldCandidates.push(...overridesRemainingFieldCandidates); + remainingKeywordFieldCandidates = overridesRemainingFieldCandidates; + keywordFieldCandidatesCount = keywordFieldCandidates.length; + } else { + remainingKeywordFieldCandidates = keywordFieldCandidates; + } + + remainingTextFieldCandidates = textFieldCandidates; + } else if (version === '3') { + const overridesRemainingKeywordFieldCandidates = ( + requestBody as AiopsLogRateAnalysisSchema<'3'> + ).overrides?.remainingKeywordFieldCandidates; + + if (Array.isArray(overridesRemainingKeywordFieldCandidates)) { + keywordFieldCandidates.push(...overridesRemainingKeywordFieldCandidates); + remainingKeywordFieldCandidates = overridesRemainingKeywordFieldCandidates; + keywordFieldCandidatesCount = keywordFieldCandidates.length; + } else { + remainingKeywordFieldCandidates = keywordFieldCandidates; + } + + const overridesRemainingTextFieldCandidates = (requestBody as AiopsLogRateAnalysisSchema<'3'>) + .overrides?.remainingTextFieldCandidates; + + if (Array.isArray(overridesRemainingTextFieldCandidates)) { + textFieldCandidates.push(...overridesRemainingTextFieldCandidates); + remainingTextFieldCandidates = overridesRemainingTextFieldCandidates; + } else { + remainingTextFieldCandidates = textFieldCandidates; + } } logDebugMessage('Fetch p-values.'); const loadingStep = - (1 / (fieldCandidatesCount + textFieldCandidatesCount)) * loadingStepSizePValues; + (1 / (keywordFieldCandidatesCount + textFieldCandidatesCount)) * loadingStepSizePValues; const pValuesQueue = queue(async function (payload: QueueFieldCandidate) { let queueItemLoadingStep = 0; @@ -124,7 +158,9 @@ export const significantItemsHandlerFactory = return; } - remainingFieldCandidates = remainingFieldCandidates.filter((d) => !fieldNames.includes(d)); + remainingKeywordFieldCandidates = remainingKeywordFieldCandidates.filter( + (d) => !fieldNames.includes(d) + ); if (pValues.length > 0) { significantTerms.push(...pValues); @@ -135,17 +171,33 @@ export const significantItemsHandlerFactory = const { textFieldCandidates: fieldNames } = payload; queueItemLoadingStep = loadingStep * fieldNames.length; - const significantCategoriesForField = await fetchSignificantCategories({ - esClient, - logger, - emitError: responseStream.pushError, - abortSignal, - arguments: { - ...requestBody, - fieldNames, - sampleProbability: stateHandler.sampleProbability(), - }, - }); + let significantCategoriesForField: Awaited>; + + try { + significantCategoriesForField = await fetchSignificantCategories({ + esClient, + logger, + emitError: responseStream.pushError, + abortSignal, + arguments: { + ...requestBody, + fieldNames, + sampleProbability: stateHandler.sampleProbability(), + }, + }); + } catch (e) { + if (!isRequestAbortedError(e)) { + logger.error( + `Failed to fetch p-values for ${fieldNames.join()}, got: \n${e.toString()}` + ); + responseStream.pushError(`Failed to fetch p-values for ${fieldNames.join()}.`); + } + return; + } + + remainingTextFieldCandidates = remainingTextFieldCandidates.filter( + (d) => !fieldNames.includes(d) + ); if (significantCategoriesForField.length > 0) { significantCategories.push(...significantCategoriesForField); @@ -170,7 +222,8 @@ export const significantItemsHandlerFactory = }, } ), - remainingFieldCandidates, + remainingKeywordFieldCandidates, + remainingTextFieldCandidates, }) ); }, MAX_CONCURRENT_QUERIES); @@ -182,7 +235,9 @@ export const significantItemsHandlerFactory = pValuesQueue.push( [ ...chunk(textFieldCandidates, QUEUE_CHUNKING_SIZE).map((d) => ({ textFieldCandidates: d })), - ...chunk(fieldCandidates, QUEUE_CHUNKING_SIZE).map((d) => ({ keywordFieldCandidates: d })), + ...chunk(keywordFieldCandidates, QUEUE_CHUNKING_SIZE).map((d) => ({ + keywordFieldCandidates: d, + })), ], (err) => { if (err) { diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts index 882057bc12cbf..67432ffc6360e 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/analysis_handlers/top_items_handler.ts @@ -39,23 +39,33 @@ export const topItemsHandlerFactory = requestBody, responseStream, stateHandler, + version, }: ResponseStreamFetchOptions) => async ({ - fieldCandidates, + keywordFieldCandidates, textFieldCandidates, }: { - fieldCandidates: string[]; + keywordFieldCandidates: string[]; textFieldCandidates: string[]; }) => { - let fieldCandidatesCount = fieldCandidates.length; + let keywordFieldCandidatesCount = keywordFieldCandidates.length; // This will store the combined count of detected log patterns and keywords let fieldValuePairsCount = 0; + if (version === '3') { + const overridesRemainingTextFieldCandidates = (requestBody as AiopsLogRateAnalysisSchema<'3'>) + .overrides?.remainingTextFieldCandidates; + + if (Array.isArray(overridesRemainingTextFieldCandidates)) { + textFieldCandidates.push(...overridesRemainingTextFieldCandidates); + } + } + const topCategories: SignificantItem[] = []; topCategories.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + ...(requestBody.overrides?.significantItems?.filter( (d) => d.type === SIGNIFICANT_ITEM_TYPE.LOG_PATTERN ) ?? []) ); @@ -82,32 +92,51 @@ export const topItemsHandlerFactory = const topTerms: SignificantItem[] = []; topTerms.push( - ...((requestBody as AiopsLogRateAnalysisSchema<'2'>).overrides?.significantItems?.filter( + ...((requestBody as AiopsLogRateAnalysisSchema<'3'>).overrides?.significantItems?.filter( (d) => d.type === SIGNIFICANT_ITEM_TYPE.KEYWORD ) ?? []) ); - const fieldsToSample = new Set(); - - let remainingFieldCandidates: string[]; + let remainingKeywordFieldCandidates: string[]; let loadingStepSizeTopTerms = PROGRESS_STEP_P_VALUES; - if (requestBody.overrides?.remainingFieldCandidates) { - fieldCandidates.push(...requestBody.overrides?.remainingFieldCandidates); - remainingFieldCandidates = requestBody.overrides?.remainingFieldCandidates; - fieldCandidatesCount = fieldCandidates.length; - loadingStepSizeTopTerms = - LOADED_FIELD_CANDIDATES + - PROGRESS_STEP_P_VALUES - - (requestBody.overrides?.loaded ?? PROGRESS_STEP_P_VALUES); - } else { - remainingFieldCandidates = fieldCandidates; + if (version === '2') { + const overridesRemainingFieldCandidates = (requestBody as AiopsLogRateAnalysisSchema<'2'>) + .overrides?.remainingFieldCandidates; + + if (Array.isArray(overridesRemainingFieldCandidates)) { + keywordFieldCandidates.push(...overridesRemainingFieldCandidates); + remainingKeywordFieldCandidates = overridesRemainingFieldCandidates; + keywordFieldCandidatesCount = keywordFieldCandidates.length; + loadingStepSizeTopTerms = + LOADED_FIELD_CANDIDATES + + PROGRESS_STEP_P_VALUES - + (requestBody.overrides?.loaded ?? PROGRESS_STEP_P_VALUES); + } else { + remainingKeywordFieldCandidates = keywordFieldCandidates; + } + } else if (version === '3') { + const overridesRemainingKeywordFieldCandidates = ( + requestBody as AiopsLogRateAnalysisSchema<'3'> + ).overrides?.remainingKeywordFieldCandidates; + + if (Array.isArray(overridesRemainingKeywordFieldCandidates)) { + keywordFieldCandidates.push(...overridesRemainingKeywordFieldCandidates); + remainingKeywordFieldCandidates = overridesRemainingKeywordFieldCandidates; + keywordFieldCandidatesCount = keywordFieldCandidates.length; + loadingStepSizeTopTerms = + LOADED_FIELD_CANDIDATES + + PROGRESS_STEP_P_VALUES - + (requestBody.overrides?.loaded ?? PROGRESS_STEP_P_VALUES); + } else { + remainingKeywordFieldCandidates = keywordFieldCandidates; + } } - logDebugMessage('Fetch p-values.'); + logDebugMessage('Fetch top items.'); const topTermsQueue = queue(async function (fieldCandidate: string) { - stateHandler.loaded((1 / fieldCandidatesCount) * loadingStepSizeTopTerms, false); + stateHandler.loaded((1 / keywordFieldCandidatesCount) * loadingStepSizeTopTerms, false); let fetchedTopTerms: Awaited>; @@ -129,14 +158,12 @@ export const topItemsHandlerFactory = return; } - remainingFieldCandidates = remainingFieldCandidates.filter((d) => d !== fieldCandidate); + remainingKeywordFieldCandidates = remainingKeywordFieldCandidates.filter( + (d) => d !== fieldCandidate + ); if (fetchedTopTerms.length > 0) { - fetchedTopTerms.forEach((d) => { - fieldsToSample.add(d.fieldName); - }); topTerms.push(...fetchedTopTerms); - responseStream.push(addSignificantItems(fetchedTopTerms)); } @@ -154,12 +181,12 @@ export const topItemsHandlerFactory = }, } ), - remainingFieldCandidates, + remainingKeywordFieldCandidates, }) ); }, MAX_CONCURRENT_QUERIES); - topTermsQueue.push(fieldCandidates, (err) => { + topTermsQueue.push(keywordFieldCandidates, (err) => { if (err) { logger.error(`Failed to fetch p-values.', got: \n${err.toString()}`); responseStream.pushError(`Failed to fetch p-values.`); diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts index 77fedfafb1896..5c092c1a3be58 100644 --- a/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis/define_route.ts @@ -10,6 +10,7 @@ import type { Logger } from '@kbn/logging'; import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; import { aiopsLogRateAnalysisSchemaV2 } from '@kbn/aiops-log-rate-analysis/api/schema_v2'; +import { aiopsLogRateAnalysisSchemaV3 } from '@kbn/aiops-log-rate-analysis/api/schema_v3'; import { AIOPS_API_ENDPOINT } from '@kbn/aiops-common/constants'; import type { AiopsLicense } from '../../types'; @@ -18,7 +19,7 @@ import { routeHandlerFactory } from './route_handler_factory'; /** * `defineRoute` is called in the root `plugin.ts` to set up the API route - * for log pattern analysis. Its purpose is to take care of the route setup + * for log rate analysis. Its purpose is to take care of the route setup * and versioning only. `routeHandlerFactory` is used to take care of * the actual route logic. */ @@ -44,5 +45,16 @@ export const defineRoute = ( }, }, routeHandlerFactory('2', license, logger, coreStart, usageCounter) + ) + .addVersion( + { + version: '3', + validate: { + request: { + body: aiopsLogRateAnalysisSchemaV3, + }, + }, + }, + routeHandlerFactory('3', license, logger, coreStart, usageCounter) ); }; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/define_route.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/define_route.ts new file mode 100644 index 0000000000000..132ecfee7b212 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/define_route.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { CoreStart, IRouter } from '@kbn/core/server'; +import type { DataRequestHandlerContext } from '@kbn/data-plugin/server'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import { aiopsLogRateAnalysisSchemaV3 } from '@kbn/aiops-log-rate-analysis/api/schema_v3'; +import { AIOPS_API_ENDPOINT } from '@kbn/aiops-common/constants'; + +import type { AiopsLicense } from '../../types'; + +import { routeHandlerFactory } from './route_handler_factory'; + +/** + * `defineRoute` is called in the root `plugin.ts` to set up the API route + * for field candidates. Its purpose is to take care of the route setup + * and versioning only. `routeHandlerFactory` is used to take care of + * the actual route logic. + */ +export const defineRoute = ( + router: IRouter, + license: AiopsLicense, + coreStart: CoreStart, + usageCounter?: UsageCounter +) => { + router.versioned + .post({ + path: AIOPS_API_ENDPOINT.LOG_RATE_ANALYSIS_FIELD_CANDIDATES, + access: 'internal', + }) + .addVersion( + { + version: '1', + validate: { + request: { + body: aiopsLogRateAnalysisSchemaV3, + }, + }, + }, + routeHandlerFactory('1', license, coreStart, usageCounter) + ); +}; diff --git a/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/route_handler_factory.ts b/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/route_handler_factory.ts new file mode 100644 index 0000000000000..b640927588ef1 --- /dev/null +++ b/x-pack/plugins/aiops/server/routes/log_rate_analysis_field_candidates/route_handler_factory.ts @@ -0,0 +1,92 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { + CoreStart, + KibanaRequest, + RequestHandlerContext, + RequestHandler, + KibanaResponseFactory, +} from '@kbn/core/server'; +import { createExecutionContext } from '@kbn/ml-route-utils'; +import type { UsageCounter } from '@kbn/usage-collection-plugin/server'; +import { AIOPS_TELEMETRY_ID, AIOPS_PLUGIN_ID } from '@kbn/aiops-common/constants'; +import type { + AiopsLogRateAnalysisSchema, + AiopsLogRateAnalysisApiVersion as ApiVersion, +} from '@kbn/aiops-log-rate-analysis/api/schema'; +import { fetchFieldCandidates } from '@kbn/aiops-log-rate-analysis/queries/fetch_field_candidates'; +import { AIOPS_API_ENDPOINT } from '@kbn/aiops-common/constants'; +import { TEXT_FIELD_SAFE_LIST } from '@kbn/aiops-log-rate-analysis/queries/fetch_field_candidates'; + +import { trackAIOpsRouteUsage } from '../../lib/track_route_usage'; +import type { AiopsLicense } from '../../types'; + +/** + * The fetch field candidates route handler returns fields suitable for log rate analysis. + */ +export function routeHandlerFactory( + version: '1', + license: AiopsLicense, + coreStart: CoreStart, + usageCounter?: UsageCounter +): RequestHandler> { + return async ( + context: RequestHandlerContext, + request: KibanaRequest>, + response: KibanaResponseFactory + ) => { + const { body, events, headers } = request; + + trackAIOpsRouteUsage( + `POST ${AIOPS_API_ENDPOINT.LOG_RATE_ANALYSIS_FIELD_CANDIDATES}`, + headers[AIOPS_TELEMETRY_ID.AIOPS_ANALYSIS_RUN_ORIGIN], + usageCounter + ); + + if (!license.isActivePlatinumLicense) { + return response.forbidden(); + } + + const esClient = (await context.core).elasticsearch.client.asCurrentUser; + const executionContext = createExecutionContext(coreStart, AIOPS_PLUGIN_ID, request.route.path); + + return await coreStart.executionContext.withContext(executionContext, async () => { + const controller = new AbortController(); + const abortSignal = controller.signal; + + events.aborted$.subscribe(() => { + controller.abort(); + }); + events.completed$.subscribe(() => { + controller.abort(); + }); + + const textFieldCandidatesOverrides = TEXT_FIELD_SAFE_LIST; + + try { + const fieldCandidates = await fetchFieldCandidates({ + esClient, + abortSignal, + arguments: { + ...body, + textFieldCandidatesOverrides, + }, + }); + + return response.ok({ body: fieldCandidates }); + } catch (e) { + return response.customError({ + statusCode: 500, + body: { + message: 'Unable to fetch field candidates.', + }, + }); + } + }); + }; +} diff --git a/x-pack/plugins/alerting/common/disabled_action_groups.ts b/x-pack/plugins/alerting/common/disabled_action_groups.ts index b6b603c10c0f1..08b45d41a4a1e 100644 --- a/x-pack/plugins/alerting/common/disabled_action_groups.ts +++ b/x-pack/plugins/alerting/common/disabled_action_groups.ts @@ -8,7 +8,7 @@ import { RecoveredActionGroup } from './builtin_action_groups'; const DisabledActionGroupsByActionType: Record = { - [RecoveredActionGroup.id]: ['.jira', '.resilient'], + [RecoveredActionGroup.id]: ['.jira', '.resilient', '.thehive'], }; export const DisabledActionTypeIdsForActionGroup: Map = new Map( diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/index.ts b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/index.ts new file mode 100644 index 0000000000000..202402bdda607 --- /dev/null +++ b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/index.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { unmuteAlertParamsSchema } from './schemas/latest'; +export { unmuteAlertParamsSchema as unmuteAlertParamsSchemaV1 } from './schemas/v1'; + +export type { UnmuteAlertRequestParams } from './types/latest'; +export type { UnmuteAlertRequestParams as UnmuteAlertRequestParamsV1 } from './types/v1'; diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/latest.ts b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/latest.ts new file mode 100644 index 0000000000000..e560bd87e0491 --- /dev/null +++ b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/latest.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export { unmuteAlertParamsSchema } from './v1'; diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/v1.ts new file mode 100644 index 0000000000000..4ae0dccb96978 --- /dev/null +++ b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/schemas/v1.ts @@ -0,0 +1,21 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; + +export const unmuteAlertParamsSchema = schema.object({ + rule_id: schema.string({ + meta: { + description: 'The identifier for the rule.', + }, + }), + alert_id: schema.string({ + meta: { + description: 'The identifier for the alert.', + }, + }), +}); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/latest.ts similarity index 63% rename from x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts rename to x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/latest.ts index a80ccae703b7a..cab31be4e070e 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/types.ts +++ b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/latest.ts @@ -5,8 +5,4 @@ * 2.0. */ -export interface UseActionProps { - onActionSuccess: () => void; -} - -export type UseCopyIDActionProps = Pick; +export type { UnmuteAlertRequestParams } from './v1'; diff --git a/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/v1.ts b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/v1.ts new file mode 100644 index 0000000000000..0de4e0e767ceb --- /dev/null +++ b/x-pack/plugins/alerting/common/routes/rule/apis/unmute_alert/types/v1.ts @@ -0,0 +1,10 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import type { TypeOf } from '@kbn/config-schema'; +import { unmuteAlertParamsSchemaV1 } from '..'; + +export type UnmuteAlertRequestParams = TypeOf; diff --git a/x-pack/plugins/alerting/docs/openapi/README.md b/x-pack/plugins/alerting/docs/openapi/README.md index e7174d84de08f..c514b4e14249d 100644 --- a/x-pack/plugins/alerting/docs/openapi/README.md +++ b/x-pack/plugins/alerting/docs/openapi/README.md @@ -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` diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.json b/x-pack/plugins/alerting/docs/openapi/bundled.json index c7b524aee3522..1c7749d5e47c1 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.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" }, @@ -17,14 +17,6 @@ "url": "/" } ], - "security": [ - { - "basicAuth": [] - }, - { - "apiKeyAuth": [] - } - ], "tags": [ { "name": "alerting", @@ -32,9 +24,9 @@ } ], "paths": { - "/s/{spaceId}/api/alerting/rule": { + "/api/alerting/rule": { "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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs.\n", "tags": [ @@ -43,9 +35,6 @@ "parameters": [ { "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" } ], "requestBody": { @@ -126,9 +115,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}": { + "/api/alerting/rule/{ruleId}": { "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, depending on the `consumer` and `rule_type_id` of the rules you're seeking. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, or **Security** features. To get rules associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role.\n", "tags": [ @@ -137,9 +126,6 @@ "parameters": [ { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -181,7 +167,7 @@ } }, "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. For example, the **Management** > **Stack Rules** feature, **Analytics** > **Discover** or **Machine Learning** features, **Observability**, or **Security** features. WARNING: After you delete a rule, you cannot recover it. If the API key that is used by the rule was created automatically, it is deleted.\n", "tags": [ @@ -193,9 +179,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -225,9 +208,9 @@ } }, "post": { - "summary": "Creates a rule with a specific rule identifier.", + "summary": "Create a rule", "operationId": "createRuleId", - "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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs.\n", + "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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs.\n", "tags": [ "alerting" ], @@ -235,9 +218,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "ruleId", @@ -245,9 +225,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" - ] + "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" } } ], @@ -323,7 +301,7 @@ } }, "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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. NOTE: If the API key has different privileges than the key that created or most recently updated the rule, the rule behavior might change. Though some properties are optional, when you update the rule the existing property values are overwritten with default values. Therefore, it is recommended to explicitly set all property values.\n", "tags": [ @@ -335,9 +313,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "requestBody": { @@ -394,9 +369,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/_disable": { + "/api/alerting/rule/{ruleId}/_disable": { "post": { - "summary": "Disables a rule.", + "summary": "Disable a rule", "operationId": "disableRule", "description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features.\n", "tags": [ @@ -408,9 +383,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -440,9 +412,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/_enable": { + "/api/alerting/rule/{ruleId}/_enable": { "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. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs.\n", "tags": [ @@ -454,9 +426,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -486,29 +455,24 @@ } } }, - "/s/{spaceId}/api/alerting/rules/_find": { + "/api/alerting/rules/_find": { "get": { - "summary": "Retrieves information about rules.", + "summary": "Find rule information", "operationId": "findRules", "description": "You must have `read` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rules you're seeking. For example, you must have privileges for the **Management > Stack rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, or **Security** features. To find rules associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role.\n", "tags": [ "alerting" ], "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, { "name": "default_search_operator", "in": "query", "description": "The default operator to use for the simple_query_string.", "schema": { "type": "string", - "default": "OR", - "examples": [ - "AND" - ] - } + "default": "OR" + }, + "example": "OR" }, { "name": "fields", @@ -551,11 +515,9 @@ "description": "The page number to return.", "schema": { "type": "integer", - "default": 1, - "examples": [ - 1 - ] - } + "default": 1 + }, + "example": 1 }, { "name": "per_page", @@ -563,11 +525,9 @@ "description": "The number of rules to return per page.", "schema": { "type": "integer", - "default": 20, - "examples": [ - 20 - ] - } + "default": 20 + }, + "example": 20 }, { "name": "search", @@ -575,9 +535,7 @@ "description": "An Elasticsearch simple_query_string query that filters the objects in the response.", "schema": { "type": "string", - "examples": [ - "threshold +-test*" - ] + "example": "threshold +-test*" } }, { @@ -588,9 +546,7 @@ "oneOf": [ { "type": "string", - "examples": [ - "name" - ] + "example": "name" }, { "type": "array", @@ -619,11 +575,9 @@ "asc", "desc" ], - "default": "desc", - "examples": [ - "asc" - ] - } + "default": "desc" + }, + "example": "asc" } ], "responses": { @@ -675,19 +629,14 @@ } } }, - "/s/{spaceId}/api/alerting/_health": { + "/api/alerting/_health": { "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 or for at least one of the **Analytics > Discover**, **Analytics > Machine Learning**, **Observability**, or **Security** features.\n", "tags": [ "alerting" ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], "responses": { "200": { "description": "Indicates a successful call.", @@ -706,9 +655,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -718,9 +665,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } }, @@ -730,9 +675,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -742,9 +685,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } }, @@ -754,9 +695,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -766,9 +705,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } } @@ -777,16 +714,12 @@ "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 } } }, @@ -811,19 +744,14 @@ } } }, - "/s/{spaceId}/api/alerting/rule_types": { + "/api/alerting/rule_types": { "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 response contains information about the appropriate rule types. For example, there are rule types associated with the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, and **Security** features. To get rule types associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role.\n", "tags": [ "alerting" ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], "responses": { "200": { "description": "Indicates a successful call.", @@ -1130,9 +1058,7 @@ "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.", @@ -1141,9 +1067,7 @@ "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.", @@ -1159,9 +1083,7 @@ }, "rule_task_timeout": { "type": "string", - "examples": [ - "5m" - ] + "example": "5m" } } } @@ -1187,9 +1109,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all": { + "/api/alerting/rule/{ruleId}/_mute_all": { "post": { - "summary": "Mutes all alerts.", + "summary": "Mute all alerts", "operationId": "muteAllAlerts", "description": "This API snoozes the notifications for the rule indefinitely. The rule checks continue to occur but alerts will not trigger any actions. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n", "tags": [ @@ -1201,9 +1123,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -1223,9 +1142,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all": { + "/api/alerting/rule/{ruleId}/_unmute_all": { "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. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n", "tags": [ @@ -1237,9 +1156,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -1259,9 +1175,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/_update_api_key": { + "/api/alerting/rule/{ruleId}/_update_api_key": { "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": [ @@ -1273,9 +1189,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -1295,9 +1208,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute": { + "/api/alerting/rule/{ruleId}/alert/{alertId}/_mute": { "post": { - "summary": "Mutes an alert.", + "summary": "Mute an alert", "operationId": "muteAlert", "description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n", "tags": [ @@ -1312,9 +1225,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -1334,9 +1244,9 @@ } } }, - "/s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute": { + "/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute": { "post": { - "summary": "Unmutes an alert.", + "summary": "Unmute an alert", "operationId": "unmuteAlert", "description": "You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature.\n", "tags": [ @@ -1351,9 +1261,6 @@ }, { "$ref": "#/components/parameters/rule_id" - }, - { - "$ref": "#/components/parameters/space_id" } ], "responses": { @@ -1373,9 +1280,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}": { + "/api/alerts/alert/{alertId}": { "delete": { - "summary": "Permanently removes an alert.", + "summary": "Delete an alert", "operationId": "legaryDeleteAlert", "deprecated": true, "description": "Deprecated in 7.13.0. Use the delete rule API instead. WARNING: After you delete an alert, you cannot recover it.\n", @@ -1386,9 +1293,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1396,9 +1300,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1419,7 +1321,7 @@ } }, "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.", @@ -1427,9 +1329,6 @@ "alerting" ], "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1437,9 +1336,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1467,7 +1364,7 @@ } }, "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.", @@ -1485,13 +1382,8 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } - }, - { - "$ref": "#/components/parameters/space_id" } ], "requestBody": { @@ -1531,7 +1423,7 @@ }, "id": { "type": "string", - "description": "The ID of the action saved object to execute." + "description": "The ID of the action saved object." }, "params": { "type": "object", @@ -1575,10 +1467,8 @@ "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" } } }, @@ -1622,7 +1512,7 @@ } }, "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.", @@ -1633,9 +1523,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1643,9 +1530,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1684,7 +1569,7 @@ }, "id": { "type": "string", - "description": "The ID of the action saved object to execute." + "description": "The ID of the action saved object." }, "params": { "type": "object", @@ -1716,10 +1601,8 @@ "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" } } }, @@ -1763,9 +1646,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/_disable": { + "/api/alerts/alert/{alertId}/_disable": { "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.", @@ -1776,9 +1659,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1786,9 +1666,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1809,9 +1687,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/_enable": { + "/api/alerts/alert/{alertId}/_enable": { "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.", @@ -1822,9 +1700,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1832,9 +1707,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1855,9 +1728,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/_mute_all": { + "/api/alerts/alert/{alertId}/_mute_all": { "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.", @@ -1868,9 +1741,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1878,9 +1748,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1901,9 +1769,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all": { + "/api/alerts/alert/{alertId}/_unmute_all": { "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.", @@ -1914,9 +1782,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -1924,9 +1789,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } } ], @@ -1947,9 +1810,9 @@ } } }, - "/s/{spaceId}/api/alerts/alerts/_find": { + "/api/alerts/alerts/_find": { "get": { - "summary": "Retrieves a paginated set of alerts.", + "summary": "Get 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.\n", @@ -1957,20 +1820,15 @@ "alerting" ], "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, { "name": "default_search_operator", "in": "query", "description": "The default operator to use for the `simple_query_string`.", "schema": { "type": "string", - "default": "OR", - "examples": [ - "OR" - ] - } + "default": "OR" + }, + "example": "OR" }, { "name": "fields", @@ -2013,11 +1871,9 @@ "description": "The page number to return.", "schema": { "type": "integer", - "default": 1, - "examples": [ - 1 - ] - } + "default": 1 + }, + "example": 1 }, { "name": "per_page", @@ -2025,11 +1881,9 @@ "description": "The number of alerts to return per page.", "schema": { "type": "integer", - "default": 20, - "examples": [ - 20 - ] - } + "default": 20 + }, + "example": 20 }, { "name": "search", @@ -2075,11 +1929,9 @@ "asc", "desc" ], - "default": "desc", - "examples": [ - "asc" - ] - } + "default": "desc" + }, + "example": "asc" } ], "responses": { @@ -2123,20 +1975,15 @@ } } }, - "/s/{spaceId}/api/alerts/alerts/_health": { + "/api/alerts/alerts/_health": { "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" - } - ], "responses": { "200": { "description": "Indicates a successful call.", @@ -2155,9 +2002,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -2167,9 +2012,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } }, @@ -2179,9 +2022,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -2191,9 +2032,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } }, @@ -2203,9 +2042,7 @@ "properties": { "status": { "type": "string", - "examples": [ - "ok" - ], + "example": "ok", "enum": [ "error", "ok", @@ -2215,9 +2052,7 @@ "timestamp": { "type": "string", "format": "date-time", - "examples": [ - "2023-01-13T01:28:00.280Z" - ] + "example": "2023-01-13T01:28:00.280Z" } } } @@ -2226,16 +2061,12 @@ "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 } } } @@ -2255,20 +2086,15 @@ } } }, - "/s/{spaceId}/api/alerts/alerts/list_alert_types": { + "/api/alerts/alerts/list_alert_types": { "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" - } - ], "responses": { "200": { "description": "Indicates a successful call.", @@ -2405,9 +2231,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute": { + "/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute": { "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.", @@ -2418,9 +2244,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -2428,9 +2251,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } }, { @@ -2440,9 +2261,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" - ] + "example": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" } } ], @@ -2463,9 +2282,9 @@ } } }, - "/s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute": { + "/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute": { "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.", @@ -2476,9 +2295,6 @@ { "$ref": "#/components/parameters/kbn_xsrf" }, - { - "$ref": "#/components/parameters/space_id" - }, { "in": "path", "name": "alertId", @@ -2486,9 +2302,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "41893910-6bca-11eb-9e0d-85d233e3ee35" - ] + "example": "41893910-6bca-11eb-9e0d-85d233e3ee35" } }, { @@ -2498,9 +2312,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" - ] + "example": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" } } ], @@ -2523,18 +2335,6 @@ } }, "components": { - "securitySchemes": { - "basicAuth": { - "type": "http", - "scheme": "basic" - }, - "apiKeyAuth": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "e.g. Authorization: ApiKey base64AccessApiKey" - } - }, "parameters": { "kbn_xsrf": { "schema": { @@ -2545,18 +2345,6 @@ "description": "Cross-site request forgery protection", "required": true }, - "space_id": { - "in": "path", - "name": "spaceId", - "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", - "required": true, - "schema": { - "type": "string", - "examples": [ - "default" - ] - } - }, "rule_id": { "in": "path", "name": "ruleId", @@ -2564,9 +2352,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" - ] + "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" } }, "alert_id": { @@ -2576,9 +2362,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" - ] + "example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74" } } }, @@ -4721,10 +4505,8 @@ "type": "object", "properties": { "alias": { - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "controlledBy": { "type": "string" @@ -4777,27 +4559,19 @@ "onActiveAlert", "onThrottleInterval" ], - "examples": [ - "onActiveAlert" - ] + "example": "onActiveAlert" }, "throttle_action": { - "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.\n", "default": null, - "examples": [ - "10m" - ] + "example": "10m" }, "actions": { - "type": [ - "array", - "null" - ], + "type": "array", "default": [], + "nullable": true, "items": { "type": "object", "required": [ @@ -4837,14 +4611,12 @@ "items": { "type": "integer" }, - "examples": [ - [ - 1, - 2, - 3, - 4, - 5 - ] + "example": [ + 1, + 2, + 3, + 4, + 5 ] }, "hours": { @@ -4854,25 +4626,19 @@ "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.\n", - "examples": [ - "Europe/Madrid" - ] + "example": "Europe/Madrid" } } } @@ -4881,9 +4647,7 @@ "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": { @@ -4909,16 +4673,12 @@ "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", - "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", @@ -4928,9 +4688,7 @@ "uuid": { "type": "string", "description": "A universally unique identifier (UUID) for the action.", - "examples": [ - "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61" - ] + "example": "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61" } } } @@ -4970,9 +4728,7 @@ "onThrottleInterval" ], "deprecated": true, - "examples": [ - "onActiveAlert" - ] + "example": "onActiveAlert" }, "schedule": { "type": "object", @@ -4980,9 +4736,7 @@ "properties": { "interval": { "type": "string", - "examples": [ - "1m" - ] + "example": "1m" } } }, @@ -4995,16 +4749,12 @@ "default": [] }, "throttle": { - "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.\n", + "nullable": true, "default": null, "deprecated": true, - "examples": [ - "10m" - ] + "example": "10m" }, "params_property_apm_anomaly": { "required": [ @@ -5280,9 +5030,7 @@ "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", - "examples": [ - 5 - ] + "example": 5 }, "timewindowunit": { "description": "The type of units for the time window: seconds, minutes, hours, or days.\n", @@ -5293,9 +5041,7 @@ "h", "d" ], - "examples": [ - "m" - ] + "example": "m" }, "size": { "description": "The number of documents to pass to the configured actions when the threshold condition is met.\n", @@ -5321,9 +5067,7 @@ "type": "array", "items": { "type": "integer", - "examples": [ - 4000 - ] + "example": 4000 } }, "thresholdcomparator": { @@ -5337,9 +5081,7 @@ "between", "notBetween" ], - "examples": [ - ">" - ] + "example": ">" }, "params_es_query_rule": { "oneOf": [ @@ -5387,16 +5129,12 @@ "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.\n", - "examples": [ - 0 - ] + "example": 0 }, "termSize": { "$ref": "#/components/schemas/termsize" @@ -5416,9 +5154,7 @@ "enum": [ ">" ], - "examples": [ - ">" - ] + "example": ">" }, "timeField": { "$ref": "#/components/schemas/timefield" @@ -5484,9 +5220,7 @@ "properties": { "language": { "type": "string", - "examples": [ - "kuery" - ] + "example": "kuery" }, "query": { "type": "string" @@ -5501,9 +5235,7 @@ "enum": [ "searchSource" ], - "examples": [ - "searchSource" - ] + "example": "searchSource" }, "size": { "$ref": "#/components/schemas/size" @@ -5581,9 +5313,7 @@ "esQuery" ], "default": "esQuery", - "examples": [ - "esQuery" - ] + "example": "esQuery" }, "size": { "$ref": "#/components/schemas/size" @@ -6674,82 +6404,58 @@ "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.\n", - "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", @@ -6773,71 +6479,51 @@ }, "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" - ], - "description": "Indicates how often alerts generate actions." + "type": "string", + "description": "Indicates how often alerts generate actions.", + "nullable": true }, "params": { "type": "object", @@ -6851,9 +6537,7 @@ "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", - "examples": [ - "monitoring_alert_cluster_health" - ] + "example": "monitoring_alert_cluster_health" }, "running": { "type": "boolean", @@ -6864,9 +6548,7 @@ }, "scheduled_task_id": { "type": "string", - "examples": [ - "b530fed0-74f5-11ed-9801-35303b735aef" - ] + "example": "b530fed0-74f5-11ed-9801-35303b735aef" }, "tags": { "$ref": "#/components/schemas/tags" @@ -6877,19 +6559,13 @@ "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" } } }, @@ -6899,9 +6575,7 @@ "properties": { "error": { "type": "string", - "examples": [ - "Unauthorized" - ], + "example": "Unauthorized", "enum": [ "Unauthorized" ] @@ -6911,9 +6585,7 @@ }, "statusCode": { "type": "integer", - "examples": [ - 401 - ], + "example": 401, "enum": [ 401 ] @@ -6925,24 +6597,18 @@ "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 ] @@ -6968,9 +6634,7 @@ "name": { "type": "string", "description": "The name of the rule.", - "examples": [ - "cluster_health_rule" - ] + "example": "cluster_health_rule" }, "notify_when": { "$ref": "#/components/schemas/notify_when" @@ -7085,40 +6749,28 @@ }, "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", @@ -7126,36 +6778,26 @@ "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" } @@ -7163,15 +6805,11 @@ "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", @@ -7187,9 +6825,7 @@ }, "scheduledTaskId": { "type": "string", - "examples": [ - "b530fed0-74f5-11ed-9801-35303b735aef" - ] + "example": "b530fed0-74f5-11ed-9801-35303b735aef" }, "tags": { "type": "array", @@ -7198,26 +6834,18 @@ } }, "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" } } } diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.yaml b/x-pack/plugins/alerting/docs/openapi/bundled.yaml index e7aa6050fa804..de4ded2b6abac 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.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: @@ -10,16 +10,13 @@ info: url: https://www.elastic.co/licensing/elastic-license servers: - url: / -security: - - basicAuth: [] - - apiKeyAuth: [] tags: - name: alerting description: Alerting APIs enable you to create and manage rules and alerts. paths: - /s/{spaceId}/api/alerting/rule: + /api/alerting/rule: 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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. @@ -27,7 +24,6 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' requestBody: required: true content: @@ -75,9 +71,9 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' - /s/{spaceId}/api/alerting/rule/{ruleId}: + /api/alerting/rule/{ruleId}: 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, depending on the `consumer` and `rule_type_id` of the rules you're seeking. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, or **Security** features. To get rules associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role. @@ -85,7 +81,6 @@ paths: - alerting parameters: - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '200': description: Indicates a successful call. @@ -109,7 +104,7 @@ paths: schema: $ref: '#/components/schemas/404_response' 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. For example, the **Management** > **Stack Rules** feature, **Analytics** > **Discover** or **Machine Learning** features, **Observability**, or **Security** features. WARNING: After you delete a rule, you cannot recover it. If the API key that is used by the rule was created automatically, it is deleted. @@ -118,7 +113,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -135,15 +129,14 @@ paths: schema: $ref: '#/components/schemas/404_response' post: - summary: Creates a rule with a specific rule identifier. + summary: Create a rule operationId: createRuleId 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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. + 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. tags: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - in: path name: ruleId description: | @@ -151,8 +144,7 @@ paths: required: true schema: type: string - examples: - - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 requestBody: required: true content: @@ -197,7 +189,7 @@ paths: schema: $ref: '#/components/schemas/404_response' 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. 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. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. NOTE: If the API key has different privileges than the key that created or most recently updated the rule, the rule behavior might change. Though some properties are optional, when you update the rule the existing property values are overwritten with default values. Therefore, it is recommended to explicitly set all property values. @@ -206,7 +198,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' requestBody: required: true content: @@ -238,9 +229,9 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/_disable: + /api/alerting/rule/{ruleId}/_disable: post: - summary: Disables a rule. + summary: Disable a rule operationId: disableRule description: | You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. @@ -249,7 +240,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -265,9 +255,9 @@ paths: application/json: schema: $ref: '#/components/schemas/404_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/_enable: + /api/alerting/rule/{ruleId}/_enable: 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. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. This API supports both key- and token-based authentication. To use key-based authentication, create an API key in Kibana and use it in the header of the API call. To use token-based authentication, provide a username and password; an API key that matches the current privileges of the user is created automatically. In both cases, the API key is subsequently used for authorization when the rule runs. @@ -276,7 +266,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -292,24 +281,22 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rules/_find: + /api/alerting/rules/_find: get: - summary: Retrieves information about rules. + summary: Find rule information operationId: findRules description: | You must have `read` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rules you're seeking. For example, you must have privileges for the **Management > Stack rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, or **Security** features. To find rules associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role. tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' - 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. @@ -339,31 +326,27 @@ paths: 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 @@ -382,8 +365,7 @@ paths: - asc - desc default: desc - examples: - - asc + example: asc responses: '200': description: Indicates a successful call. @@ -413,16 +395,14 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/_health: + /api/alerting/_health: 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 or for at least one of the **Analytics > Discover**, **Analytics > Machine Learning**, **Observability**, or **Security** features. tags: - alerting - parameters: - - $ref: '#/components/parameters/space_id' responses: '200': description: Indicates a successful call. @@ -442,8 +422,7 @@ paths: properties: status: type: string - examples: - - ok + example: ok enum: - error - ok @@ -451,16 +430,14 @@ paths: 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 @@ -468,16 +445,14 @@ paths: 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 @@ -485,18 +460,15 @@ paths: 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' @@ -506,16 +478,14 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rule_types: + /api/alerting/rule_types: 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 response contains information about the appropriate rule types. For example, there are rule types associated with the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability** features, and **Security** features. To get rule types associated with the **Stack Monitoring** feature, use the `monitoring_user` built-in role. tags: - alerting - parameters: - - $ref: '#/components/parameters/space_id' responses: '200': description: Indicates a successful call. @@ -739,16 +709,14 @@ paths: 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 @@ -759,8 +727,7 @@ paths: type: string rule_task_timeout: type: string - examples: - - 5m + example: 5m examples: getRuleTypesResponse: $ref: '#/components/examples/get_rule_types_response' @@ -770,9 +737,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/_mute_all: + /api/alerting/rule/{ruleId}/_mute_all: post: - summary: Mutes all alerts. + summary: Mute all alerts operationId: muteAllAlerts description: | This API snoozes the notifications for the rule indefinitely. The rule checks continue to occur but alerts will not trigger any actions. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. @@ -781,7 +748,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -791,9 +757,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/_unmute_all: + /api/alerting/rule/{ruleId}/_unmute_all: 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. You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. @@ -802,7 +768,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -812,9 +777,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/_update_api_key: + /api/alerting/rule/{ruleId}/_update_api_key: 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: @@ -822,7 +787,6 @@ paths: parameters: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '200': description: Indicates a successful call. @@ -832,9 +796,9 @@ paths: application/json: schema: $ref: '#/components/schemas/400_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_mute: + /api/alerting/rule/{ruleId}/alert/{alertId}/_mute: post: - summary: Mutes an alert. + summary: Mute an alert operationId: muteAlert description: | You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. @@ -844,7 +808,6 @@ paths: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/alert_id' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -854,9 +817,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerting/rule/{ruleId}/alert/{alertId}/_unmute: + /api/alerting/rule/{ruleId}/alert/{alertId}/_unmute: post: - summary: Unmutes an alert. + summary: Unmute an alert operationId: unmuteAlert description: | You must have `all` privileges for the appropriate Kibana features, depending on the `consumer` and `rule_type_id` of the rule. For example, the **Management > Stack Rules** feature, **Analytics > Discover** and **Machine Learning** features, **Observability**, and **Security** features. If the rule has actions, you must also have `read` privileges for the **Management > Actions and Connectors** feature. @@ -866,7 +829,6 @@ paths: - $ref: '#/components/parameters/kbn_xsrf' - $ref: '#/components/parameters/alert_id' - $ref: '#/components/parameters/rule_id' - - $ref: '#/components/parameters/space_id' responses: '204': description: Indicates a successful call. @@ -876,9 +838,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}: + /api/alerts/alert/{alertId}: delete: - summary: Permanently removes an alert. + summary: Delete an alert operationId: legaryDeleteAlert deprecated: true description: | @@ -887,15 +849,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -906,22 +866,20 @@ paths: schema: $ref: '#/components/schemas/401_response' 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' - 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. @@ -936,7 +894,7 @@ paths: schema: $ref: '#/components/schemas/401_response' 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. @@ -950,9 +908,7 @@ paths: required: true schema: type: string - examples: - - 41893910-6bca-11eb-9e0d-85d233e3ee35 - - $ref: '#/components/parameters/space_id' + example: 41893910-6bca-11eb-9e0d-85d233e3ee35 requestBody: required: true content: @@ -987,7 +943,7 @@ paths: Grouping actions is recommended for escalations for different types of alert instances. 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: | @@ -1021,9 +977,8 @@ paths: 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: @@ -1047,7 +1002,7 @@ paths: schema: $ref: '#/components/schemas/401_response' 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. @@ -1055,15 +1010,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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: @@ -1096,7 +1049,7 @@ paths: Grouping actions is recommended for escalations for different types of alert instances. 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: | @@ -1121,9 +1074,8 @@ paths: 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: @@ -1146,9 +1098,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/_disable: + /api/alerts/alert/{alertId}/_disable: 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. @@ -1156,15 +1108,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1174,9 +1124,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/_enable: + /api/alerts/alert/{alertId}/_enable: 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. @@ -1184,15 +1134,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1202,9 +1150,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/_mute_all: + /api/alerts/alert/{alertId}/_mute_all: 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. @@ -1212,15 +1160,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1230,9 +1176,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/_unmute_all: + /api/alerts/alert/{alertId}/_unmute_all: 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. @@ -1240,15 +1186,13 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1258,9 +1202,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alerts/_find: + /api/alerts/alerts/_find: get: - summary: Retrieves a paginated set of alerts. + summary: Get a paginated set of alerts operationId: legacyFindAlerts deprecated: true description: | @@ -1268,15 +1212,13 @@ paths: tags: - alerting parameters: - - $ref: '#/components/parameters/space_id' - 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. @@ -1306,16 +1248,14 @@ paths: 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. @@ -1345,8 +1285,7 @@ paths: - asc - desc default: desc - examples: - - asc + example: asc responses: '200': description: Indicates a successful call. @@ -1371,16 +1310,14 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alerts/_health: + /api/alerts/alerts/_health: 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' responses: '200': description: Indicates a successful call. @@ -1400,8 +1337,7 @@ paths: properties: status: type: string - examples: - - ok + example: ok enum: - error - ok @@ -1409,16 +1345,14 @@ paths: 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 @@ -1426,16 +1360,14 @@ paths: 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 @@ -1443,34 +1375,29 @@ paths: 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: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alerts/list_alert_types: + /api/alerts/alerts/list_alert_types: 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' responses: '200': description: Indicates a successful call. @@ -1563,9 +1490,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute: + /api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_mute: 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. @@ -1573,23 +1500,20 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1599,9 +1523,9 @@ paths: application/json: schema: $ref: '#/components/schemas/401_response' - /s/{spaceId}/api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute: + /api/alerts/alert/{alertId}/alert_instance/{alertInstanceId}/_unmute: 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. @@ -1609,23 +1533,20 @@ paths: - alerting parameters: - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - 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. @@ -1636,15 +1557,6 @@ paths: schema: $ref: '#/components/schemas/401_response' components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' parameters: kbn_xsrf: schema: @@ -1653,15 +1565,6 @@ components: name: kbn-xsrf description: Cross-site request forgery protection required: true - space_id: - in: path - name: spaceId - description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - required: true - schema: - type: string - examples: - - default rule_id: in: path name: ruleId @@ -1669,8 +1572,7 @@ components: required: true schema: type: string - examples: - - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 alert_id: in: path name: alertId @@ -1678,8 +1580,7 @@ components: required: true schema: type: string - examples: - - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 + example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 schemas: create_anomaly_detection_alert_rule_request: title: Create anomaly detection rule request @@ -3228,9 +3129,8 @@ components: type: object properties: alias: - type: - - string - - 'null' + type: string + nullable: true controlledBy: type: string disabled: @@ -3265,22 +3165,18 @@ components: - onActionGroupChange - onActiveAlert - onThrottleInterval - examples: - - onActiveAlert + example: onActiveAlert throttle_action: - 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 actions: - type: - - array - - 'null' + type: array default: [] + nullable: true items: type: object required: @@ -3315,12 +3211,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 - examples: - - - 1 - - 2 - - 3 - - 4 - - 5 + example: + - 1 + - 2 + - 3 + - 4 + - 5 hours: type: object description: | @@ -3329,24 +3225,20 @@ components: 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 @@ -3367,13 +3259,11 @@ 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`. - 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. @@ -3381,8 +3271,7 @@ components: uuid: type: string description: A universally unique identifier (UUID) for the action. - examples: - - 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 + example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 alert_delay: type: object description: Indicates that an alert occurs only when the specified number of consecutive runs met the rule conditions. @@ -3413,16 +3302,14 @@ components: - onActiveAlert - onThrottleInterval deprecated: true - examples: - - onActiveAlert + example: onActiveAlert schedule: type: object description: The check interval, which specifies how frequently the rule conditions are checked. The interval is specified in seconds, minutes, hours, or days. properties: interval: type: string - examples: - - 1m + example: 1m tags: type: array description: The tags for the rule. @@ -3430,15 +3317,13 @@ components: type: string default: [] throttle: - 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 params_property_apm_anomaly: required: - windowSize @@ -3653,8 +3538,7 @@ 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 - examples: - - 5 + example: 5 timewindowunit: description: | The type of units for the time window: seconds, minutes, hours, or days. @@ -3664,8 +3548,7 @@ components: - m - h - d - examples: - - m + example: m size: description: | The number of documents to pass to the configured actions when the threshold condition is met. @@ -3685,8 +3568,7 @@ components: type: array items: type: integer - examples: - - 4000 + example: 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 @@ -3697,8 +3579,7 @@ components: - <= - between - notBetween - examples: - - '>' + example: '>' params_es_query_rule: oneOf: - type: object @@ -3735,14 +3616,12 @@ components: 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: '#/components/schemas/termsize' threshold: @@ -3759,8 +3638,7 @@ 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: - '>' - examples: - - '>' + example: '>' timeField: $ref: '#/components/schemas/timefield' timeWindowSize: @@ -3805,8 +3683,7 @@ components: properties: language: type: string - examples: - - kuery + example: kuery query: type: string searchType: @@ -3814,8 +3691,7 @@ components: type: string enum: - searchSource - examples: - - searchSource + example: searchSource size: $ref: '#/components/schemas/size' termField: @@ -3867,8 +3743,7 @@ components: enum: - esQuery default: esQuery - examples: - - esQuery + example: esQuery size: $ref: '#/components/schemas/size' termField: @@ -4604,60 +4479,48 @@ 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. - 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: @@ -4674,49 +4537,39 @@ components: 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. @@ -4728,8 +4581,7 @@ 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`. - examples: - - monitoring_alert_cluster_health + example: monitoring_alert_cluster_health running: type: boolean description: Indicates whether the rule is running. @@ -4737,8 +4589,7 @@ components: $ref: '#/components/schemas/schedule' scheduled_task_id: type: string - examples: - - b530fed0-74f5-11ed-9801-35303b735aef + example: b530fed0-74f5-11ed-9801-35303b735aef tags: $ref: '#/components/schemas/tags' throttle: @@ -4746,31 +4597,26 @@ components: 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 401_response: type: object 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 404_response: @@ -4778,18 +4624,15 @@ components: 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 update_rule_request: @@ -4809,8 +4652,7 @@ components: name: type: string description: The name of the rule. - examples: - - cluster_health_rule + example: cluster_health_rule notify_when: $ref: '#/components/schemas/notify_when' params: @@ -4895,66 +4737,53 @@ components: 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 @@ -4965,27 +4794,22 @@ components: 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 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 3ae77530b04d5..27427e1ec6758 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,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 \ No newline at end of file + example: 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 18cadc0e5d7e6..4b5d14e207353 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,5 +4,4 @@ description: An identifier for the rule. required: true schema: type: string - examples: - - ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74 \ No newline at end of file + example: 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 45787e844caec..0a9fba457e3e7 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,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 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 ed5e2a823bc0f..c6044998f8649 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,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 \ 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 875307d5a3893..1b8a118703ecb 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,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 \ 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 b0cf9067d8dd1..909ee88cb3906 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/actions.yaml @@ -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 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 744e4ead6c94d..06fa627311e75 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,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 \ No newline at end of file + nullable: true + example: 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 ba8507f87f051..cb6a77c215682 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/filter.yaml @@ -5,9 +5,8 @@ properties: type: object properties: alias: - type: - - "string" - - "null" + type: string + nullable: true 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 b2cd678362846..046ff58aabe3e 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 @@ -9,5 +9,4 @@ enum: - onActiveAlert - onThrottleInterval deprecated: true -examples: - - onActiveAlert \ No newline at end of file +example: onActiveAlert diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when_action.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when_action.yaml index bb68967b6f5cb..0dcd244fc33e4 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when_action.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/notify_when_action.yaml @@ -8,5 +8,4 @@ enum: - onActionGroupChange - onActiveAlert - onThrottleInterval -examples: - - onActiveAlert \ No newline at end of file +example: 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 f51cbce979ab2..99b6a6f393a32 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,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: 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 e48d316506ee0..463a42cf84a67 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 @@ -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 \ No newline at end of file + nullable: true + example: 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 75e98d9a8d193..57ddf84ceb413 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/schedule.yaml @@ -3,5 +3,4 @@ description: The check interval, which specifies how frequently the rule conditi properties: interval: type: string - examples: - - 1m \ No newline at end of file + example: 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 7060ecf4e91a0..4d646f637522d 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/threshold.yaml @@ -4,5 +4,4 @@ description: > type: array items: type: integer - examples: - - 4000 \ No newline at end of file + example: 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 dd39d4c0bdc3a..3459365ee0a1d 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/thresholdcomparator.yaml @@ -7,5 +7,4 @@ enum: - "<=" - between - notBetween -examples: - - ">" \ No newline at end of file +example: ">" \ 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 2d5e2b4f77ca7..e7a74e9f35157 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle.yaml @@ -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 \ No newline at end of file +example: 10m diff --git a/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle_action.yaml b/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle_action.yaml index f45573dac8abb..c936ada431020 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle_action.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/throttle_action.yaml @@ -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 \ No newline at end of file +example: 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 137ae56a91672..7271f62f8dac2 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowsize.yaml @@ -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 \ No newline at end of file +example: 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 bc2cbf1bd3e1c..c0f2d458ae0e8 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/schemas/timewindowunit.yaml @@ -6,5 +6,4 @@ enum: - m - h - d -examples: - - "m" \ No newline at end of file +example: "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 fb6bd33aa81da..653fae740f0f3 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 @@ -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: diff --git a/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml b/x-pack/plugins/alerting/docs/openapi/entrypoint.yaml index 39c46ca8513f9..da0a3091f3dce 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.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' diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@_health.yaml similarity index 80% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@_health.yaml index 25ae1cb0b9fc6..32cbd72bea2ce 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@_health.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@_health.yaml @@ -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' diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule.yaml similarity index 96% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule.yaml index ec43548dae3cf..cc2ba7ee7c3a6 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule.yaml @@ -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: 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/api@alerting@rule@{ruleid}.yaml similarity index 94% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}.yaml index 96c5973c570c8..93fd0edd2a0c9 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}.yaml @@ -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: diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_disable.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_disable.yaml similarity index 91% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_disable.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_disable.yaml index 10be1036c8766..23fba8919e99f 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_disable.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_disable.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_enable.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_enable.yaml similarity index 94% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_enable.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_enable.yaml index c809cc7047c96..3951573a42eb5 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_enable.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_enable.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_mute_all.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_mute_all.yaml similarity index 92% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_mute_all.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_mute_all.yaml index c4efec008217d..a3afe97d5fba4 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_mute_all.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_mute_all.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_unmute_all.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_unmute_all.yaml similarity index 92% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_unmute_all.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_unmute_all.yaml index 5ef2bb31de59f..8b3fb975ed0d8 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_unmute_all.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_unmute_all.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_update_api_key.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_update_api_key.yaml similarity index 84% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_update_api_key.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_update_api_key.yaml index f1d390e888d7c..3525730bf35ea 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@_update_api_key.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@_update_api_key.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml similarity index 92% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml index 3f12ffd3c8e4e..73a4b5cdf2ae8 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_mute.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml similarity index 91% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml index a3ed064aaaebe..8428a6daee012 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule@{ruleid}@alert@{alertid}@_unmute.yaml @@ -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. 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/api@alerting@rule_types.yaml similarity index 97% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule_types.yaml index 36542211cb318..378a8e0a7127c 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rule_types.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rule_types.yaml @@ -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' 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/api@alerting@rules@_find.yaml similarity index 92% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rules@_find.yaml index 7f5417eec10c8..619abfb7bce0f 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerting@rules@_find.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerting@rules@_find.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_find.yaml similarity index 93% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_find.yaml index 2cc8acdf5c5ac..397653acb1c90 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_find.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_find.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_health.yaml similarity index 78% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_health.yaml index 593977bd384d3..b8436a08abf1f 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@_health.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@_health.yaml @@ -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: 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/api@alerts@alert@{alertid}.yaml similarity index 92% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}.yaml index 48a1b12984b4c..bf6d69d117450 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}.yaml @@ -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: 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/api@alerts@alert@{alertid}@_disable.yaml similarity index 80% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_disable.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@_disable.yaml index a383c71ed0eae..70874a8bea396 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/api@alerts@alert@{alertid}@_disable.yaml @@ -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. 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/api@alerts@alert@{alertid}@_enable.yaml similarity index 80% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_enable.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@_enable.yaml index 19b782ea3cccb..3b79778c26c6c 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/api@alerts@alert@{alertid}@_enable.yaml @@ -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. 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/api@alerts@alert@{alertid}@_mute_all.yaml similarity index 80% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_mute_all.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@_mute_all.yaml index 64c28317025a4..462e6994d4553 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/api@alerts@alert@{alertid}@_mute_all.yaml @@ -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. 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/api@alerts@alert@{alertid}@_unmute_all.yaml similarity index 80% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@_unmute_all.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@_unmute_all.yaml index 63fa1d2aa50fa..bfdec84525aae 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/api@alerts@alert@{alertid}@_unmute_all.yaml @@ -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. 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/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml similarity index 77% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml index 0f2620aff6a1e..4af89ec42616c 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/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_mute.yaml @@ -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. 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/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml similarity index 77% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml index 7b1b6abeab392..a939d74c3d1d0 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/api@alerts@alert@{alertid}@alert_instance@{alertinstanceid}@_unmute.yaml @@ -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. diff --git a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@list_alert_types.yaml b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@list_alert_types.yaml similarity index 97% rename from x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@list_alert_types.yaml rename to x-pack/plugins/alerting/docs/openapi/paths/api@alerts@list_alert_types.yaml index b82f701cef1fb..14b3cd4e07b9b 100644 --- a/x-pack/plugins/alerting/docs/openapi/paths/s@{spaceid}@api@alerts@list_alert_types.yaml +++ b/x-pack/plugins/alerting/docs/openapi/paths/api@alerts@list_alert_types.yaml @@ -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. diff --git a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts index 136d7dd73d32a..42031c9ceeeac 100644 --- a/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts +++ b/x-pack/plugins/alerting/server/alerts_client/alerts_client.ts @@ -518,13 +518,6 @@ export class AlertsClient< rule: this.rule, }) ); - } else { - this.options.logger.debug( - () => - `Could not find alert document to update for recovered alert with id ${id} and uuid ${currentRecoveredAlerts[ - id - ].getUuid()}` - ); } } diff --git a/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/index.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/index.ts new file mode 100644 index 0000000000000..7fc0a21218fcb --- /dev/null +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/index.ts @@ -0,0 +1,7 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export { unmuteAlertParamsSchema } from './unmute_alert_params_schema'; diff --git a/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/unmute_alert_params_schema.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/unmute_alert_params_schema.ts new file mode 100644 index 0000000000000..edc85497ded29 --- /dev/null +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/schemas/unmute_alert_params_schema.ts @@ -0,0 +1,12 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { schema } from '@kbn/config-schema'; + +export const unmuteAlertParamsSchema = schema.object({ + alertId: schema.string(), + alertInstanceId: schema.string(), +}); diff --git a/x-pack/plugins/task_manager/server/task_pool/index.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/index.ts similarity index 66% rename from x-pack/plugins/task_manager/server/task_pool/index.ts rename to x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/index.ts index 979a4536639a6..8d97bd968467c 100644 --- a/x-pack/plugins/task_manager/server/task_pool/index.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/index.ts @@ -5,5 +5,4 @@ * 2.0. */ -export { TaskPool, TaskPoolRunResult } from './task_pool'; -export { getCapacityInCost, getCapacityInWorkers } from './utils'; +export type { UnmuteAlertParams } from './unmute_alert_params'; diff --git a/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/unmute_alert_params.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/unmute_alert_params.ts new file mode 100644 index 0000000000000..ae83c5b6d4b7e --- /dev/null +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/types/unmute_alert_params.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TypeOf } from '@kbn/config-schema'; +import { unmuteAlertParamsSchema } from '../schemas'; + +export type UnmuteAlertParams = TypeOf; diff --git a/x-pack/plugins/alerting/server/rules_client/tests/unmute_instance.test.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.test.ts similarity index 87% rename from x-pack/plugins/alerting/server/rules_client/tests/unmute_instance.test.ts rename to x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.test.ts index 948b9f8622002..f88b650c322ac 100644 --- a/x-pack/plugins/alerting/server/rules_client/tests/unmute_instance.test.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.test.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { RulesClient, ConstructorOptions } from '../rules_client'; +import { RulesClient, ConstructorOptions } from '../../../../rules_client/rules_client'; import { savedObjectsClientMock, loggingSystemMock, @@ -13,17 +13,17 @@ import { uiSettingsServiceMock, } from '@kbn/core/server/mocks'; import { taskManagerMock } from '@kbn/task-manager-plugin/server/mocks'; -import { ruleTypeRegistryMock } from '../../rule_type_registry.mock'; -import { alertingAuthorizationMock } from '../../authorization/alerting_authorization.mock'; +import { ruleTypeRegistryMock } from '../../../../rule_type_registry.mock'; +import { alertingAuthorizationMock } from '../../../../authorization/alerting_authorization.mock'; import { encryptedSavedObjectsMock } from '@kbn/encrypted-saved-objects-plugin/server/mocks'; import { actionsAuthorizationMock } from '@kbn/actions-plugin/server/mocks'; -import { AlertingAuthorization } from '../../authorization/alerting_authorization'; +import { AlertingAuthorization } from '../../../../authorization/alerting_authorization'; import { ActionsAuthorization } from '@kbn/actions-plugin/server'; import { auditLoggerMock } from '@kbn/security-plugin/server/audit/mocks'; -import { getBeforeSetup, setGlobalDate } from './lib'; -import { ConnectorAdapterRegistry } from '../../connector_adapters/connector_adapter_registry'; -import { RULE_SAVED_OBJECT_TYPE } from '../../saved_objects'; -import { backfillClientMock } from '../../backfill_client/backfill_client.mock'; +import { getBeforeSetup, setGlobalDate } from '../../../../rules_client/tests/lib'; +import { ConnectorAdapterRegistry } from '../../../../connector_adapters/connector_adapter_registry'; +import { RULE_SAVED_OBJECT_TYPE } from '../../../../saved_objects'; +import { backfillClientMock } from '../../../../backfill_client/backfill_client.mock'; const taskManager = taskManagerMock.createStart(); const ruleTypeRegistry = ruleTypeRegistryMock.create(); @@ -203,6 +203,17 @@ describe('unmuteInstance()', () => { ruleTypeId: 'myType', }); }); + + test('throws an error if API params do not match the schema', async () => { + const rulesClient = new RulesClient(rulesClientParams); + await expect( + // @ts-expect-error: Wrong params for testing purposes + rulesClient.unmuteInstance({ alertId: 1 }) + ).rejects.toThrowErrorMatchingInlineSnapshot( + `"Failed to validate params: [alertId]: expected value of type [string] but got [number]"` + ); + expect(unsecuredSavedObjectsClient.update).not.toHaveBeenCalled(); + }); }); describe('auditLogger', () => { diff --git a/x-pack/plugins/alerting/server/rules_client/methods/unmute_instance.ts b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.ts similarity index 56% rename from x-pack/plugins/alerting/server/rules_client/methods/unmute_instance.ts rename to x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.ts index 0b8e422f1a946..220a1b14e728c 100644 --- a/x-pack/plugins/alerting/server/rules_client/methods/unmute_instance.ts +++ b/x-pack/plugins/alerting/server/application/rule/methods/unmute_alert/unmute_instance.ts @@ -5,39 +5,43 @@ * 2.0. */ -import { Rule, RawRule } from '../../types'; -import { WriteOperations, AlertingAuthorizationEntity } from '../../authorization'; -import { retryIfConflicts } from '../../lib/retry_if_conflicts'; -import { ruleAuditEvent, RuleAuditAction } from '../common/audit_events'; -import { MuteOptions } from '../types'; -import { RulesClientContext } from '../types'; -import { updateMeta } from '../lib'; -import { RULE_SAVED_OBJECT_TYPE } from '../../saved_objects'; +import Boom from '@hapi/boom'; +import type { Rule } from '../../../../types'; +import type { RulesClientContext } from '../../../../rules_client/types'; +import type { UnmuteAlertParams } from './types'; +import { retryIfConflicts } from '../../../../lib/retry_if_conflicts'; +import { RULE_SAVED_OBJECT_TYPE } from '../../../../saved_objects'; +import { ruleAuditEvent, RuleAuditAction } from '../../../../rules_client/common/audit_events'; +import { unmuteAlertParamsSchema } from './schemas'; +import { updateMeta } from '../../../../rules_client/lib'; +import { updateRuleSo } from '../../../../data/rule'; +import { WriteOperations, AlertingAuthorizationEntity } from '../../../../authorization'; export async function unmuteInstance( context: RulesClientContext, - { alertId, alertInstanceId }: MuteOptions + params: UnmuteAlertParams ): Promise { + const ruleId = params.alertId; + try { + unmuteAlertParamsSchema.validate(params); + } catch (error) { + throw Boom.badRequest(`Failed to validate params: ${error.message}`); + } + return await retryIfConflicts( context.logger, - `rulesClient.unmuteInstance('${alertId}')`, - async () => await unmuteInstanceWithOCC(context, { alertId, alertInstanceId }) + `rulesClient.unmuteInstance('${ruleId}')`, + async () => await unmuteInstanceWithOCC(context, params) ); } async function unmuteInstanceWithOCC( context: RulesClientContext, - { - alertId, - alertInstanceId, - }: { - alertId: string; - alertInstanceId: string; - } + { alertId: ruleId, alertInstanceId }: UnmuteAlertParams ) { const { attributes, version } = await context.unsecuredSavedObjectsClient.get( RULE_SAVED_OBJECT_TYPE, - alertId + ruleId ); try { @@ -54,7 +58,7 @@ async function unmuteInstanceWithOCC( context.auditLogger?.log( ruleAuditEvent({ action: RuleAuditAction.UNMUTE_ALERT, - savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: alertId }, + savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: ruleId }, error, }) ); @@ -65,7 +69,7 @@ async function unmuteInstanceWithOCC( ruleAuditEvent({ action: RuleAuditAction.UNMUTE_ALERT, outcome: 'unknown', - savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: alertId }, + savedObject: { type: RULE_SAVED_OBJECT_TYPE, id: ruleId }, }) ); @@ -73,15 +77,15 @@ async function unmuteInstanceWithOCC( const mutedInstanceIds = attributes.mutedInstanceIds || []; if (!attributes.muteAll && mutedInstanceIds.includes(alertInstanceId)) { - await context.unsecuredSavedObjectsClient.update( - RULE_SAVED_OBJECT_TYPE, - alertId, - updateMeta(context, { + await updateRuleSo({ + savedObjectsClient: context.unsecuredSavedObjectsClient, + savedObjectsUpdateOptions: { version }, + id: ruleId, + updateRuleAttributes: updateMeta(context, { + mutedInstanceIds: mutedInstanceIds.filter((id: string) => id !== alertInstanceId), updatedBy: await context.getUserName(), updatedAt: new Date().toISOString(), - mutedInstanceIds: mutedInstanceIds.filter((id: string) => id !== alertInstanceId), }), - { version } - ); + }); } } diff --git a/x-pack/plugins/alerting/server/routes/health.ts b/x-pack/plugins/alerting/server/routes/health.ts index 6d178e7bd186c..478f0afda594a 100644 --- a/x-pack/plugins/alerting/server/routes/health.ts +++ b/x-pack/plugins/alerting/server/routes/health.ts @@ -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, }, diff --git a/x-pack/plugins/alerting/server/routes/index.ts b/x-pack/plugins/alerting/server/routes/index.ts index 648d661d1d612..c1fd477922fb9 100644 --- a/x-pack/plugins/alerting/server/routes/index.ts +++ b/x-pack/plugins/alerting/server/routes/index.ts @@ -34,7 +34,7 @@ import { ruleTypesRoute } from './rule_types'; import { muteAllRuleRoute } from './mute_all_rule'; import { muteAlertRoute } from './rule/apis/mute_alert/mute_alert'; import { unmuteAllRuleRoute } from './unmute_all_rule'; -import { unmuteAlertRoute } from './unmute_alert'; +import { unmuteAlertRoute } from './rule/apis/unmute_alert/unmute_alert_route'; import { updateRuleApiKeyRoute } from './rule/apis/update_api_key/update_rule_api_key_route'; import { bulkEditInternalRulesRoute } from './rule/apis/bulk_edit/bulk_edit_rules_route'; import { snoozeRuleRoute } from './rule/apis/snooze'; diff --git a/x-pack/plugins/alerting/server/routes/legacy/create.ts b/x-pack/plugins/alerting/server/routes/legacy/create.ts index f586a253696b3..0d706f1c0ce94 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/create.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/create.ts @@ -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) { diff --git a/x-pack/plugins/alerting/server/routes/legacy/delete.ts b/x-pack/plugins/alerting/server/routes/legacy/delete.ts index 4fcf85678db53..1356a0866cfda 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/delete.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/delete.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/disable.ts b/x-pack/plugins/alerting/server/routes/legacy/disable.ts index 3959f9f504d5e..283dbcf0ab90c 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/disable.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/disable.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/enable.ts b/x-pack/plugins/alerting/server/routes/legacy/enable.ts index 620ce0c1fab34..4f2e8e7859857 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/enable.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/enable.ts @@ -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) { diff --git a/x-pack/plugins/alerting/server/routes/legacy/find.ts b/x-pack/plugins/alerting/server/routes/legacy/find.ts index dcda2e01271d4..0c8027a0a1d4a 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/find.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/find.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/get.ts b/x-pack/plugins/alerting/server/routes/legacy/get.ts index be9550f1f336e..3408bea210a96 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts index c33aea8060d77..86bac56936d37 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get_alert_instance_summary.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts b/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts index 86a56403b39ae..5cd898ca31535 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/get_alert_state.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/health.ts b/x-pack/plugins/alerting/server/routes/legacy/health.ts index ca64143638d08..859d9cabe1989 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/health.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/health.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts index ead29203940b6..8c9346fe880f8 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/list_alert_types.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts b/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts index dcbc0c19dbe35..a553bd6d41af4 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/mute_all.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts b/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts index f6c6a28ecc865..d9799a4e7744d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/mute_instance.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts b/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts index 31f82849ea1da..554d64d8cce4e 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/unmute_all.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts b/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts index 4d5b9b02da5f1..0382948732cc8 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/unmute_instance.ts @@ -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); diff --git a/x-pack/plugins/alerting/server/routes/legacy/update.ts b/x-pack/plugins/alerting/server/routes/legacy/update.ts index 203352dd01a6b..2df485d38885d 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/update.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/update.ts @@ -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) { diff --git a/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts b/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts index a3ba03728f1b9..7cacf14f269f5 100644 --- a/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts +++ b/x-pack/plugins/alerting/server/routes/legacy/update_api_key.ts @@ -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) { diff --git a/x-pack/plugins/alerting/server/routes/mute_all_rule.ts b/x-pack/plugins/alerting/server/routes/mute_all_rule.ts index 185d44b95a50e..831e8c190e38e 100644 --- a/x-pack/plugins/alerting/server/routes/mute_all_rule.ts +++ b/x-pack/plugins/alerting/server/routes/mute_all_rule.ts @@ -28,6 +28,7 @@ export const muteAllRuleRoute = ( options: { access: 'public', summary: `Mute all alerts`, + tags: ['oas-tag:alerting'], }, validate: { params: paramSchema, diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts index 18d80fdbfec81..0edf062069e4b 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/create/create_rule_route.ts @@ -35,6 +35,7 @@ export const createRuleRoute = ({ router, licenseState, usageCounter }: RouteOpt options: { access: 'public', summary: `Create a rule`, + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts index e64bc7a7dfff3..5015cac458587 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/delete/delete_rule_route.ts @@ -24,6 +24,7 @@ export const deleteRuleRoute = ( options: { access: 'public', summary: `Delete a rule`, + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts index df7f673fd1bc1..7b8695a588289 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/disable/disable_rule_route.ts @@ -26,6 +26,7 @@ export const disableRuleRoute = ( options: { access: 'public', summary: 'Disable a rule', + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts index 55acc33487676..2891b627e2de1 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/enable/enable_rule_route.ts @@ -25,6 +25,7 @@ export const enableRuleRoute = ( options: { access: 'public', summary: 'Enable a rule', + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts index 420e4b01d81e6..3541e8e31475e 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/find/find_rules_route.ts @@ -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: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts index 4ae47caa7a7f5..d6796250ea8a8 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/get/get_rule_route.ts @@ -87,6 +87,7 @@ export const getRuleRoute = ( options: { access: 'public', summary: `Get rule details`, + tags: ['oas-tag:alerting'], }, }); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts b/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts index 12babb3bf084c..41c7a9368273e 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/mute_alert/mute_alert.ts @@ -24,6 +24,7 @@ export const muteAlertRoute = ( options: { access: 'public', summary: `Mute an alert`, + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/index.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/index.ts new file mode 100644 index 0000000000000..21a7250aed4e2 --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +export { transformRequestParamsToApplication } from './transform_request_params_to_application/latest'; +export { transformRequestParamsToApplication as transformRequestParamsToApplicationV1 } from './transform_request_params_to_application/v1'; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/latest.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/latest.ts new file mode 100644 index 0000000000000..5983069f0d8fd --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/latest.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { transformRequestParamsToApplication } from './v1'; diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.test.ts new file mode 100644 index 0000000000000..620d1ec4a746b --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.test.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { transformRequestParamsToApplication } from '..'; + +describe('transformRequestParamsToApplication', () => { + it('changes the parameters case', () => { + const transformed = transformRequestParamsToApplication({ + rule_id: 'test-rule-id', + alert_id: 'test-alert-id', + }); + expect(transformed).toEqual({ alertId: 'test-rule-id', alertInstanceId: 'test-alert-id' }); + }); +}); diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.ts new file mode 100644 index 0000000000000..227b57ba67717 --- /dev/null +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/transforms/transform_request_params_to_application/v1.ts @@ -0,0 +1,18 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { UnmuteAlertParams } from '../../../../../../application/rule/methods/unmute_alert/types'; +import { RewriteRequestCase } from '../../../../../lib'; +import { UnmuteAlertRequestParamsV1 } from '../../../../../../../common/routes/rule/apis/unmute_alert'; + +export const transformRequestParamsToApplication: RewriteRequestCase = ({ + rule_id: alertId, + alert_id: alertInstanceId, +}: UnmuteAlertRequestParamsV1) => ({ + alertId, + alertInstanceId, +}); diff --git a/x-pack/plugins/alerting/server/routes/unmute_alert.test.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.test.ts similarity index 84% rename from x-pack/plugins/alerting/server/routes/unmute_alert.test.ts rename to x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.test.ts index 6f9c553831e77..cc58bd3d93d5c 100644 --- a/x-pack/plugins/alerting/server/routes/unmute_alert.test.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.test.ts @@ -5,15 +5,15 @@ * 2.0. */ -import { unmuteAlertRoute } from './unmute_alert'; +import { unmuteAlertRoute } from './unmute_alert_route'; import { httpServiceMock } from '@kbn/core/server/mocks'; -import { licenseStateMock } from '../lib/license_state.mock'; -import { mockHandlerArguments } from './_mock_handler_arguments'; -import { rulesClientMock } from '../rules_client.mock'; -import { RuleTypeDisabledError } from '../lib/errors/rule_type_disabled'; +import { licenseStateMock } from '../../../../lib/license_state.mock'; +import { mockHandlerArguments } from '../../../_mock_handler_arguments'; +import { rulesClientMock } from '../../../../rules_client.mock'; +import { RuleTypeDisabledError } from '../../../../lib/errors/rule_type_disabled'; const rulesClient = rulesClientMock.create(); -jest.mock('../lib/license_api_access', () => ({ +jest.mock('../../../../lib/license_api_access', () => ({ verifyApiAccess: jest.fn(), })); diff --git a/x-pack/plugins/alerting/server/routes/unmute_alert.ts b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts similarity index 58% rename from x-pack/plugins/alerting/server/routes/unmute_alert.ts rename to x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts index ba3c639a88e52..3158778f72eba 100644 --- a/x-pack/plugins/alerting/server/routes/unmute_alert.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/unmute_alert/unmute_alert_route.ts @@ -6,32 +6,14 @@ */ import { IRouter } from '@kbn/core/server'; -import { schema } from '@kbn/config-schema'; -import { ILicenseState, RuleTypeDisabledError } from '../lib'; -import { MuteOptions } from '../rules_client'; -import { RewriteRequestCase, verifyAccessAndContext } from './lib'; -import { AlertingRequestHandlerContext, BASE_ALERTING_API_PATH } from '../types'; - -const paramSchema = schema.object({ - rule_id: schema.string({ - meta: { - description: 'The identifier for the rule.', - }, - }), - alert_id: schema.string({ - meta: { - description: 'The identifier for the alert.', - }, - }), -}); - -const rewriteParamsReq: RewriteRequestCase = ({ - rule_id: alertId, - alert_id: alertInstanceId, -}) => ({ - alertId, - alertInstanceId, -}); +import { ILicenseState, RuleTypeDisabledError } from '../../../../lib'; +import { verifyAccessAndContext } from '../../../lib'; +import { AlertingRequestHandlerContext, BASE_ALERTING_API_PATH } from '../../../../types'; +import { + unmuteAlertParamsSchemaV1, + UnmuteAlertRequestParamsV1, +} from '../../../../../common/routes/rule/apis/unmute_alert'; +import { transformRequestParamsToApplicationV1 } from './transforms'; export const unmuteAlertRoute = ( router: IRouter, @@ -43,17 +25,25 @@ export const unmuteAlertRoute = ( options: { access: 'public', summary: `Unmute an alert`, + tags: ['oas-tag:alerting'], }, validate: { - params: paramSchema, + request: { + params: unmuteAlertParamsSchemaV1, + }, + response: { + 204: { + description: 'Indicates a successful call.', + }, + }, }, }, router.handleLegacyErrors( verifyAccessAndContext(licenseState, async function (context, req, res) { const rulesClient = (await context.alerting).getRulesClient(); - const params = rewriteParamsReq(req.params); + const params: UnmuteAlertRequestParamsV1 = req.params; try { - await rulesClient.unmuteInstance(params); + await rulesClient.unmuteInstance(transformRequestParamsToApplicationV1(params)); return res.noContent(); } catch (e) { if (e instanceof RuleTypeDisabledError) { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts index 392bdd8991047..0fe2d9dae41c9 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/update/update_rule_route.ts @@ -34,6 +34,7 @@ export const updateRuleRoute = ( options: { access: 'public', summary: `Update a rule`, + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts b/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts index 6646d0635d132..ab5c923321343 100644 --- a/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts +++ b/x-pack/plugins/alerting/server/routes/rule/apis/update_api_key/update_rule_api_key_route.ts @@ -24,6 +24,7 @@ export const updateRuleApiKeyRoute = ( options: { access: 'public', summary: 'Update the API key for a rule', + tags: ['oas-tag:alerting'], }, validate: { request: { diff --git a/x-pack/plugins/alerting/server/routes/rule_types.ts b/x-pack/plugins/alerting/server/routes/rule_types.ts index 1021b4c9a1431..afbe0c42696bd 100644 --- a/x-pack/plugins/alerting/server/routes/rule_types.ts +++ b/x-pack/plugins/alerting/server/routes/rule_types.ts @@ -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: {}, }, diff --git a/x-pack/plugins/alerting/server/routes/unmute_all_rule.ts b/x-pack/plugins/alerting/server/routes/unmute_all_rule.ts index 033f5b276828a..020eb85247c56 100644 --- a/x-pack/plugins/alerting/server/routes/unmute_all_rule.ts +++ b/x-pack/plugins/alerting/server/routes/unmute_all_rule.ts @@ -25,6 +25,7 @@ export const unmuteAllRuleRoute = ( options: { access: 'public', summary: `Unmute all alerts`, + tags: ['oas-tag:alerting'], }, validate: { params: paramSchema, diff --git a/x-pack/plugins/alerting/server/rule_type_registry.test.ts b/x-pack/plugins/alerting/server/rule_type_registry.test.ts index e678228660e51..3ee3551a301d5 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry.test.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry.test.ts @@ -564,39 +564,6 @@ describe('Create Lifecycle', () => { }); }); - test('injects custom cost for certain rule types', () => { - const ruleType: RuleType = { - id: 'siem.indicatorRule', - name: 'Test', - actionGroups: [ - { - id: 'default', - name: 'Default', - }, - ], - defaultActionGroupId: 'default', - minimumLicenseRequired: 'basic', - isExportable: true, - executor: jest.fn(), - category: 'test', - producer: 'alerts', - ruleTaskTimeout: '20m', - validate: { - params: { validate: (params) => params }, - }, - }; - const registry = new RuleTypeRegistry(ruleTypeRegistryParams); - registry.register(ruleType); - expect(taskManager.registerTaskDefinitions).toHaveBeenCalledTimes(1); - expect(taskManager.registerTaskDefinitions.mock.calls[0][0]).toMatchObject({ - 'alerting:siem.indicatorRule': { - timeout: '20m', - title: 'Test', - cost: 10, - }, - }); - }); - test('shallow clones the given rule type', () => { const ruleType: RuleType = { id: 'test', diff --git a/x-pack/plugins/alerting/server/rule_type_registry.ts b/x-pack/plugins/alerting/server/rule_type_registry.ts index bc7a10d767ff0..d1ffe59df3b6f 100644 --- a/x-pack/plugins/alerting/server/rule_type_registry.ts +++ b/x-pack/plugins/alerting/server/rule_type_registry.ts @@ -14,7 +14,6 @@ import { Logger } from '@kbn/core/server'; import { LicensingPluginSetup } from '@kbn/licensing-plugin/server'; import { RunContext, TaskManagerSetupContract } from '@kbn/task-manager-plugin/server'; import { stateSchemaByVersion } from '@kbn/alerting-state-types'; -import { TaskCost } from '@kbn/task-manager-plugin/server/task'; import { TaskRunnerFactory } from './task_runner'; import { RuleType, @@ -41,9 +40,6 @@ import { AlertsService } from './alerts_service/alerts_service'; import { getRuleTypeIdValidLegacyConsumers } from './rule_type_registry_deprecated_consumers'; import { AlertingConfig } from './config'; -const RULE_TYPES_WITH_CUSTOM_COST: Record = { - 'siem.indicatorRule': TaskCost.ExtraLarge, -}; export interface ConstructorOptions { config: AlertingConfig; logger: Logger; @@ -293,8 +289,6 @@ export class RuleTypeRegistry { normalizedRuleType as unknown as UntypedNormalizedRuleType ); - const taskCost: TaskCost | undefined = RULE_TYPES_WITH_CUSTOM_COST[ruleType.id]; - this.taskManager.registerTaskDefinitions({ [`alerting:${ruleType.id}`]: { title: ruleType.name, @@ -316,7 +310,6 @@ export class RuleTypeRegistry { spaceId: schema.string(), consumer: schema.maybe(schema.string()), }), - ...(taskCost ? { cost: taskCost } : {}), }, }); diff --git a/x-pack/plugins/alerting/server/rules_client/rules_client.ts b/x-pack/plugins/alerting/server/rules_client/rules_client.ts index d03bd3f59486b..343fbec059940 100644 --- a/x-pack/plugins/alerting/server/rules_client/rules_client.ts +++ b/x-pack/plugins/alerting/server/rules_client/rules_client.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { UnmuteAlertParams } from '../application/rule/methods/unmute_alert/types'; import { getRuleTags, RuleTagsParams } from '../application/rule/methods/tags'; import { MuteAlertParams } from '../application/rule/methods/mute_alert/types'; import { SanitizedRule, RuleTypeParams } from '../types'; @@ -60,7 +61,7 @@ import { clearExpiredSnoozes } from './methods/clear_expired_snoozes'; import { muteInstance } from '../application/rule/methods/mute_alert/mute_instance'; import { muteAll } from './methods/mute_all'; import { unmuteAll } from './methods/unmute_all'; -import { unmuteInstance } from './methods/unmute_instance'; +import { unmuteInstance } from '../application/rule/methods/unmute_alert/unmute_instance'; import { runSoon } from './methods/run_soon'; import { listRuleTypes } from './methods/list_rule_types'; import { getAlertFromRaw, GetAlertFromRawParams } from './lib/get_alert_from_raw'; @@ -181,7 +182,7 @@ export class RulesClient { public muteAll = (options: { id: string }) => muteAll(this.context, options); public unmuteAll = (options: { id: string }) => unmuteAll(this.context, options); public muteInstance = (options: MuteAlertParams) => muteInstance(this.context, options); - public unmuteInstance = (options: MuteAlertParams) => unmuteInstance(this.context, options); + public unmuteInstance = (options: UnmuteAlertParams) => unmuteInstance(this.context, options); public bulkUntrackAlerts = (options: BulkUntrackBody) => bulkUntrackAlerts(this.context, options); diff --git a/x-pack/plugins/cases/docs/openapi/README.md b/x-pack/plugins/cases/docs/openapi/README.md index fedb9635abc82..6de117e966fe0 100644 --- a/x-pack/plugins/cases/docs/openapi/README.md +++ b/x-pack/plugins/cases/docs/openapi/README.md @@ -13,22 +13,11 @@ 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/cases/docs/openapi/` folder: - - ```bash - npx swagger-cli validate entrypoint.yaml - ``` - -Then you can generate the `bundled` files by running the following commands: +Generate the `bundled` files by running the following commands: ```bash npx @redocly/cli bundle entrypoint.yaml --output bundled.yaml --ext yaml npx @redocly/cli bundle entrypoint.yaml --output bundled.json --ext json ``` -After generating the json bundle ensure that it is also valid by running the following command: - - ```bash - npx @redocly/cli lint bundled.json - ``` +Then join these files with the rest of the Kibana APIs per `oas_docs/README.md` diff --git a/x-pack/plugins/cases/docs/openapi/bundled.json b/x-pack/plugins/cases/docs/openapi/bundled.json index 6bc965f7ee5fc..f9f2550580c80 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.json +++ b/x-pack/plugins/cases/docs/openapi/bundled.json @@ -1,9 +1,9 @@ { - "openapi": "3.1.0", + "openapi": "3.0.1", "info": { "title": "Cases", "description": "OpenAPI schema for Cases endpoints", - "version": "0.2", + "version": "0.1", "contact": { "name": "Cases Team" }, @@ -17,14 +17,6 @@ "url": "/" } ], - "security": [ - { - "basicAuth": [] - }, - { - "apiKeyAuth": [] - } - ], "tags": [ { "name": "cases", @@ -34,7 +26,7 @@ "paths": { "/api/cases": { "post": { - "summary": "Creates a case in the default space.", + "summary": "Create a case", "operationId": "createCaseDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating.\n", "tags": [ @@ -89,7 +81,7 @@ } }, "delete": { - "summary": "Deletes one or more cases in the default space.", + "summary": "Delete cases", "operationId": "deleteCaseDefaultSpace", "description": "You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", "tags": [ @@ -120,7 +112,7 @@ } }, "patch": { - "summary": "Updates one or more cases in the default space.", + "summary": "Update cases", "operationId": "updateCaseDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating.\n", "tags": [ @@ -179,7 +171,7 @@ }, "/api/cases/_find": { "get": { - "summary": "Retrieves a paginated subset of cases in the default space.", + "summary": "Search cases", "operationId": "findCasesDefaultSpace", "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", "tags": [ @@ -293,7 +285,7 @@ }, "/api/cases/alerts/{alertId}": { "get": { - "summary": "Returns the cases associated with a specific alert in the default space.", + "summary": "Get cases for an alert", "operationId": "getCasesByAlertDefaultSpace", "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", "x-technical-preview": true, @@ -329,7 +321,7 @@ } } }, - "examples": [ + "example": [ { "id": "06116b80-e1c3-11ec-be9b-9b1838238ee6", "title": "security_case" @@ -354,9 +346,9 @@ }, "/api/cases/configure": { "get": { - "summary": "Get case settings in the default space", + "summary": "Get case settings", "operationId": "getCaseConfigurationDefaultSpace", - "description": "Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n", + "description": "Get setting details such as the closure type, custom fields, templatse, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n", "tags": [ "cases" ], @@ -383,24 +375,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -410,9 +396,7 @@ "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] + "example": "2022-06-01T17:07:17.767Z" }, "created_by": { "type": "object", @@ -423,43 +407,28 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } }, "customFields": { "type": "array", - "x-technical-preview": true, "description": "Custom fields configuration details.", "items": { "type": "object", @@ -503,19 +472,13 @@ } }, "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "nullable": true, + "example": null }, "id": { "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] + "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" }, "mappings": { "type": "array", @@ -524,21 +487,15 @@ "properties": { "action_type": { "type": "string", - "examples": [ - "overwrite" - ] + "example": "overwrite" }, "source": { "type": "string", - "examples": [ - "title" - ] + "example": "title" }, "target": { "type": "string", - "examples": [ - "summary" - ] + "example": "summary" } } } @@ -550,20 +507,13 @@ "$ref": "#/components/schemas/templates" }, "updated_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] + "nullable": true, + "example": "2022-06-01T19:58:48.169Z" }, "updated_by": { - "type": [ - "object", - "null" - ], + "type": "object", "required": [ "email", "full_name", @@ -571,45 +521,30 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } - } + }, + "nullable": true }, "version": { "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] + "example": "WzIwNzMsMV0=" } } } @@ -635,7 +570,7 @@ } }, "post": { - "summary": "Add case settings in the default space", + "summary": "Add case settings", "operationId": "setCaseConfigurationDefaultSpace", "description": "Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n", "tags": [ @@ -676,24 +611,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -703,9 +632,7 @@ "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] + "example": "2022-06-01T17:07:17.767Z" }, "created_by": { "type": "object", @@ -716,43 +643,28 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } }, "customFields": { "type": "array", - "x-technical-preview": true, "description": "Custom fields configuration details.", "items": { "type": "object", @@ -796,19 +708,13 @@ } }, "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "nullable": true, + "example": null }, "id": { "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] + "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" }, "mappings": { "type": "array", @@ -817,21 +723,15 @@ "properties": { "action_type": { "type": "string", - "examples": [ - "overwrite" - ] + "example": "overwrite" }, "source": { "type": "string", - "examples": [ - "title" - ] + "example": "title" }, "target": { "type": "string", - "examples": [ - "summary" - ] + "example": "summary" } } } @@ -843,20 +743,13 @@ "$ref": "#/components/schemas/templates" }, "updated_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] + "nullable": true, + "example": "2022-06-01T19:58:48.169Z" }, "updated_by": { - "type": [ - "object", - "null" - ], + "type": "object", "required": [ "email", "full_name", @@ -864,45 +757,30 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } - } + }, + "nullable": true }, "version": { "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] + "example": "WzIwNzMsMV0=" } } }, @@ -929,9 +807,9 @@ }, "/api/cases/configure/{configurationId}": { "patch": { - "summary": "Update case settings in the default space", + "summary": "Update case settings", "operationId": "updateCaseConfigurationDefaultSpace", - "description": "Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n", + "description": "Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n", "tags": [ "cases" ], @@ -973,24 +851,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -1000,9 +872,7 @@ "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] + "example": "2022-06-01T17:07:17.767Z" }, "created_by": { "type": "object", @@ -1013,43 +883,28 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } }, "customFields": { "type": "array", - "x-technical-preview": true, "description": "Custom fields configuration details.", "items": { "type": "object", @@ -1093,19 +948,13 @@ } }, "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "nullable": true, + "example": null }, "id": { "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] + "example": "4a97a440-e1cd-11ec-be9b-9b1838238ee6" }, "mappings": { "type": "array", @@ -1114,21 +963,15 @@ "properties": { "action_type": { "type": "string", - "examples": [ - "overwrite" - ] + "example": "overwrite" }, "source": { "type": "string", - "examples": [ - "title" - ] + "example": "title" }, "target": { "type": "string", - "examples": [ - "summary" - ] + "example": "summary" } } } @@ -1140,20 +983,13 @@ "$ref": "#/components/schemas/templates" }, "updated_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] + "nullable": true, + "example": "2022-06-01T19:58:48.169Z" }, "updated_by": { - "type": [ - "object", - "null" - ], + "type": "object", "required": [ "email", "full_name", @@ -1161,45 +997,30 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } - } + }, + "nullable": true }, "version": { "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] + "example": "WzIwNzMsMV0=" } } }, @@ -1226,9 +1047,9 @@ }, "/api/cases/reporters": { "get": { - "summary": "Returns information about the users who opened cases in the default space.", + "summary": "Get case creators", "operationId": "getCaseReportersDefaultSpace", - "description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n", + "description": "Returns information about the users who opened cases. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n", "tags": [ "cases" ], @@ -1254,37 +1075,23 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } } @@ -1312,9 +1119,9 @@ }, "/api/cases/status": { "get": { - "summary": "Returns the number of cases that are open, closed, and in progress in the default space.", + "summary": "Get case status summary", "operationId": "getCaseStatusDefaultSpace", - "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", + "description": "Returns the number of cases that are open, closed, and in progress. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", "deprecated": true, "tags": [ "cases" @@ -1361,9 +1168,9 @@ }, "/api/cases/tags": { "get": { - "summary": "Aggregates and returns a list of case tags in the default space.", + "summary": "Get case tags", "operationId": "getCaseTagsDefaultSpace", - "description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", + "description": "Aggregates and returns a list of case tags. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", "tags": [ "cases" ], @@ -1407,7 +1214,7 @@ }, "/api/cases/{caseId}": { "get": { - "summary": "Retrieves information about a case in the default space.", + "summary": "Get case information", "operationId": "getCaseDefaultSpace", "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", "tags": [ @@ -1455,7 +1262,7 @@ }, "/api/cases/{caseId}/alerts": { "get": { - "summary": "Gets all alerts attached to a case in the default space.", + "summary": "Get all alerts for a case", "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", "x-technical-preview": true, "operationId": "getCaseAlertsDefaultSpace", @@ -1501,7 +1308,7 @@ }, "/api/cases/{caseId}/comments": { "post": { - "summary": "Adds a comment or alert to a case in the default space.", + "summary": "Add a case comment or alert", "operationId": "addCaseCommentDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts.\n", "tags": [ @@ -1559,9 +1366,9 @@ } }, "delete": { - "summary": "Deletes all comments and alerts from a case in the default space.", + "summary": "Delete all case comments and alerts", "operationId": "deleteCaseCommentsDefaultSpace", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", + "description": "Deletes all comments and alerts from a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", "tags": [ "cases" ], @@ -1590,7 +1397,7 @@ } }, "patch": { - "summary": "Updates a comment or alert in a case in the default space.", + "summary": "Update a case comment or alert", "operationId": "updateCaseCommentDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment.\n", "tags": [ @@ -1648,7 +1455,7 @@ } }, "get": { - "summary": "Retrieves all the comments from a case in the default space.", + "summary": "Get all case comments", "operationId": "getAllCaseCommentsDefaultSpace", "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; instead, use the get case comment API, which requires a comment identifier in the path. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", "deprecated": true, @@ -1684,9 +1491,55 @@ } } }, + "/api/cases/{caseId}/comments/_find": { + "get": { + "summary": "Find case comments and alerts", + "operationId": "findCaseCommentsDefaultSpace", + "description": "Retrieves a paginated list of comments for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", + "tags": [ + "cases" + ], + "parameters": [ + { + "$ref": "#/components/parameters/case_id" + }, + { + "$ref": "#/components/parameters/page_index" + }, + { + "$ref": "#/components/parameters/page_size" + }, + { + "$ref": "#/components/parameters/sort_order" + } + ], + "responses": { + "200": { + "description": "Indicates a successful call.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/case_response_properties" + } + } + } + }, + "401": { + "description": "Authorization information is missing or invalid.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/4xx_response" + } + } + } + } + } + } + }, "/api/cases/{caseId}/comments/{commentId}": { "delete": { - "summary": "Deletes a comment or alert from a case in the default space.", + "summary": "Delete a case comment or alert", "operationId": "deleteCaseCommentDefaultSpace", "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", "tags": [ @@ -1720,7 +1573,7 @@ } }, "get": { - "summary": "Retrieves a comment from a case in the default space.", + "summary": "Get a case comment or alert", "operationId": "getCaseCommentDefaultSpace", "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", "tags": [ @@ -1772,7 +1625,7 @@ }, "/api/cases/{caseId}/connector/{connectorId}/_push": { "post": { - "summary": "Pushes a case in the default space to an external service.", + "summary": "Push a case to an external service", "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing.\n", "operationId": "pushCaseDefaultSpace", "tags": [ @@ -1793,10 +1646,8 @@ "content": { "application/json": { "schema": { - "type": [ - "object", - "null" - ] + "type": "object", + "nullable": true } } } @@ -1832,8 +1683,8 @@ }, "/api/cases/{caseId}/user_actions": { "get": { - "summary": "Returns all user activity for a case in the default space.", - "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", + "summary": "Get case activity", + "description": "Returns all user activity for a case. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", "deprecated": true, "operationId": "getCaseActivityDefaultSpace", "tags": [ @@ -1873,8 +1724,8 @@ }, "/api/cases/{caseId}/user_actions/_find": { "get": { - "summary": "Finds user activity for a case in the default space.", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", + "summary": "Find case activity", + "description": "Retrives a paginated list of user activity for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", "operationId": "findCaseActivityDefaultSpace", "tags": [ "cases" @@ -1945,9 +1796,9 @@ }, "/api/cases/configure/connectors/_find": { "get": { - "summary": "Get case connectors in the default space", + "summary": "Get case connectors", "operationId": "findCaseConnectorsDefaultSpace", - "description": "Retrieves information about connectors that are supported for use in cases in the default space. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", + "description": "Get information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", "tags": [ "cases" ], @@ -2018,2150 +1869,33 @@ } } } - }, - "/s/{spaceId}/api/cases": { - "post": { - "summary": "Creates a case.", - "operationId": "createCase", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/create_case_request" - }, - "examples": { - "createCaseRequest": { - "$ref": "#/components/examples/create_case_request" - } - } - } - } + } + }, + "components": { + "parameters": { + "kbn_xsrf": { + "schema": { + "type": "string" }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - }, - "examples": { - "createCaseResponse": { - "$ref": "#/components/examples/create_case_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } + "in": "header", + "name": "kbn-xsrf", + "description": "Cross-site request forgery protection", + "required": true }, - "delete": { - "summary": "Deletes one or more cases.", - "operationId": "deleteCase", - "description": "You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/ids" - }, - { - "$ref": "#/components/parameters/space_id" + "ids": { + "name": "ids", + "description": "The cases that you want to removed. All non-ASCII characters must be URL encoded.\n", + "in": "query", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string", + "minItems": 1, + "maxItems": 100 } - ], - "responses": { - "204": { - "description": "Indicates a successful call." - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "patch": { - "summary": "Updates one or more cases.", - "operationId": "updateCase", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/update_case_request" - }, - "examples": { - "updateCaseRequest": { - "$ref": "#/components/examples/update_case_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/case_response_properties" - } - }, - "examples": { - "updateCaseResponse": { - "$ref": "#/components/examples/update_case_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/_find": { - "get": { - "summary": "Retrieves a paginated subset of cases.", - "operationId": "findCases", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/assignees" - }, - { - "$ref": "#/components/parameters/category" - }, - { - "$ref": "#/components/parameters/defaultSearchOperator" - }, - { - "$ref": "#/components/parameters/from" - }, - { - "$ref": "#/components/parameters/owner" - }, - { - "$ref": "#/components/parameters/page_index" - }, - { - "$ref": "#/components/parameters/page_size" - }, - { - "$ref": "#/components/parameters/reporters" - }, - { - "$ref": "#/components/parameters/search" - }, - { - "$ref": "#/components/parameters/searchFields" - }, - { - "$ref": "#/components/parameters/severity" - }, - { - "$ref": "#/components/parameters/sortField" - }, - { - "$ref": "#/components/parameters/sort_order" - }, - { - "$ref": "#/components/parameters/status" - }, - { - "$ref": "#/components/parameters/tags" - }, - { - "$ref": "#/components/parameters/to" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "cases": { - "type": "array", - "items": { - "$ref": "#/components/schemas/case_response_properties" - } - }, - "count_closed_cases": { - "type": "integer" - }, - "count_in_progress_cases": { - "type": "integer" - }, - "count_open_cases": { - "type": "integer" - }, - "page": { - "type": "integer" - }, - "per_page": { - "type": "integer" - }, - "total": { - "type": "integer" - } - } - }, - "examples": { - "findCaseResponse": { - "$ref": "#/components/examples/find_case_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/alerts/{alertId}": { - "get": { - "summary": "Returns the cases associated with a specific alert.", - "operationId": "getCasesByAlert", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", - "x-technical-preview": true, - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/alert_id" - }, - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/owner" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The case identifier." - }, - "title": { - "type": "string", - "description": "The case title." - } - } - }, - "examples": [ - { - "id": "06116b80-e1c3-11ec-be9b-9b1838238ee6", - "title": "security_case" - } - ] - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/configure": { - "get": { - "summary": "Get case settings", - "operationId": "getCaseConfiguration", - "description": "Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/owner" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "connector": { - "type": "object", - "properties": { - "fields": { - "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] - }, - "id": { - "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "name": { - "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "type": { - "$ref": "#/components/schemas/connector_types" - } - } - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] - }, - "created_by": { - "type": "object", - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "defaultValue": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } - ], - "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" - }, - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, - "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "id": { - "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] - }, - "mappings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action_type": { - "type": "string", - "examples": [ - "overwrite" - ] - }, - "source": { - "type": "string", - "examples": [ - "title" - ] - }, - "target": { - "type": "string", - "examples": [ - "summary" - ] - } - } - } - }, - "owner": { - "$ref": "#/components/schemas/owners" - }, - "templates": { - "$ref": "#/components/schemas/templates" - }, - "updated_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] - }, - "updated_by": { - "type": [ - "object", - "null" - ], - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "version": { - "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] - } - } - } - }, - "examples": { - "getConfigurationResponse": { - "$ref": "#/components/examples/get_case_configuration_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "post": { - "summary": "Add case settings", - "operationId": "setCaseConfiguration", - "description": "Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/set_case_configuration_request" - }, - "examples": { - "setCaseConfigRequest": { - "$ref": "#/components/examples/set_case_configuration_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "connector": { - "type": "object", - "properties": { - "fields": { - "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] - }, - "id": { - "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "name": { - "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "type": { - "$ref": "#/components/schemas/connector_types" - } - } - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] - }, - "created_by": { - "type": "object", - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "defaultValue": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } - ], - "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" - }, - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, - "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "id": { - "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] - }, - "mappings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action_type": { - "type": "string", - "examples": [ - "overwrite" - ] - }, - "source": { - "type": "string", - "examples": [ - "title" - ] - }, - "target": { - "type": "string", - "examples": [ - "summary" - ] - } - } - } - }, - "owner": { - "$ref": "#/components/schemas/owners" - }, - "templates": { - "$ref": "#/components/schemas/templates" - }, - "updated_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] - }, - "updated_by": { - "type": [ - "object", - "null" - ], - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "version": { - "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] - } - } - }, - "examples": { - "setCaseConfigResponse": { - "$ref": "#/components/examples/set_case_configuration_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/configure/{configurationId}": { - "patch": { - "summary": "Update case settings", - "operationId": "updateCaseConfiguration", - "description": "Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/configuration_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/update_case_configuration_request" - }, - "examples": { - "updateCaseConfigurationRequest": { - "$ref": "#/components/examples/update_case_configuration_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "closure_type": { - "$ref": "#/components/schemas/closure_types" - }, - "connector": { - "type": "object", - "properties": { - "fields": { - "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] - }, - "id": { - "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "name": { - "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", - "type": "string", - "examples": [ - "none" - ] - }, - "type": { - "$ref": "#/components/schemas/connector_types" - } - } - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2022-06-01T17:07:17.767Z" - ] - }, - "created_by": { - "type": "object", - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "customFields": { - "type": "array", - "x-technical-preview": true, - "description": "Custom fields configuration details.", - "items": { - "type": "object", - "properties": { - "defaultValue": { - "oneOf": [ - { - "type": "string" - }, - { - "type": "boolean" - } - ], - "description": "A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean.\n" - }, - "key": { - "description": "A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field.\n", - "type": "string", - "minLength": 1, - "maxLength": 36 - }, - "label": { - "description": "The custom field label that is displayed in the case.", - "type": "string", - "minLength": 1, - "maxLength": 50 - }, - "required": { - "description": "Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated.\n", - "type": "boolean" - }, - "type": { - "description": "The type of the custom field.", - "type": "string", - "enum": [ - "text", - "toggle" - ] - } - } - } - }, - "error": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "id": { - "type": "string", - "examples": [ - "4a97a440-e1cd-11ec-be9b-9b1838238ee6" - ] - }, - "mappings": { - "type": "array", - "items": { - "type": "object", - "properties": { - "action_type": { - "type": "string", - "examples": [ - "overwrite" - ] - }, - "source": { - "type": "string", - "examples": [ - "title" - ] - }, - "target": { - "type": "string", - "examples": [ - "summary" - ] - } - } - } - }, - "owner": { - "$ref": "#/components/schemas/owners" - }, - "templates": { - "$ref": "#/components/schemas/templates" - }, - "updated_at": { - "type": [ - "string", - "null" - ], - "format": "date-time", - "examples": [ - "2022-06-01T19:58:48.169Z" - ] - }, - "updated_by": { - "type": [ - "object", - "null" - ], - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - }, - "version": { - "type": "string", - "examples": [ - "WzIwNzMsMV0=" - ] - } - } - }, - "examples": { - "updateCaseConfigurationResponse": { - "$ref": "#/components/examples/update_case_configuration_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/configure/connectors/_find": { - "get": { - "summary": "Get case connectors", - "operationId": "findCaseConnectors", - "description": "Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "properties": { - "actionTypeId": { - "$ref": "#/components/schemas/connector_types" - }, - "config": { - "type": "object", - "properties": { - "apiUrl": { - "type": "string" - }, - "projectKey": { - "type": "string" - } - }, - "additionalProperties": true - }, - "id": { - "type": "string" - }, - "isDeprecated": { - "type": "boolean" - }, - "isMissingSecrets": { - "type": "boolean" - }, - "isPreconfigured": { - "type": "boolean" - }, - "name": { - "type": "string" - }, - "referencedByCount": { - "type": "integer" - } - } - } - }, - "examples": { - "findConnectorResponse": { - "$ref": "#/components/examples/find_connector_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/reporters": { - "get": { - "summary": "Returns information about the users who opened cases.", - "operationId": "getCaseReporters", - "description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/owner" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "object", - "required": [ - "email", - "full_name", - "username" - ], - "properties": { - "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { - "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] - }, - "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] - } - } - } - }, - "examples": { - "getReportersResponse": { - "$ref": "#/components/examples/get_reporters_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/status": { - "get": { - "summary": "Returns the number of cases that are open, closed, and in progress.", - "operationId": "getCaseStatus", - "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", - "deprecated": true, - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/owner" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "count_closed_cases": { - "type": "integer" - }, - "count_in_progress_cases": { - "type": "integer" - }, - "count_open_cases": { - "type": "integer" - } - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/tags": { - "get": { - "summary": "Aggregates and returns a list of case tags.", - "operationId": "getCaseTags", - "description": "You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/owner" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "type": "string" - } - }, - "examples": { - "getTagsResponse": { - "$ref": "#/components/examples/get_tags_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}": { - "get": { - "summary": "Retrieves information about a case.", - "operationId": "getCase", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/includeComments" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - }, - "examples": { - "getCaseResponse": { - "$ref": "#/components/examples/get_case_response" - }, - "getObservabilityCaseReponse": { - "$ref": "#/components/examples/get_case_observability_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/alerts": { - "get": { - "summary": "Gets all alerts attached to a case.", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking.\n", - "x-technical-preview": true, - "operationId": "getCaseAlerts", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/alert_response_properties" - } - }, - "examples": { - "getCaseAlertsResponse": { - "$ref": "#/components/examples/get_case_alerts_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/comments": { - "post": { - "summary": "Adds a comment or alert to a case.", - "operationId": "addCaseComment", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/add_case_comment_request" - }, - "examples": { - "createCaseCommentRequest": { - "$ref": "#/components/examples/add_comment_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - }, - "examples": { - "createCaseCommentResponse": { - "$ref": "#/components/examples/add_comment_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "delete": { - "summary": "Deletes all comments and alerts from a case.", - "operationId": "deleteCaseComments", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "204": { - "description": "Indicates a successful call." - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "patch": { - "summary": "Updates a comment or alert in a case.", - "operationId": "updateCaseComment", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/update_case_comment_request" - }, - "examples": { - "updateCaseCommentRequest": { - "$ref": "#/components/examples/update_comment_request" - } - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - }, - "examples": { - "updateCaseCommentResponse": { - "$ref": "#/components/examples/update_comment_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "get": { - "summary": "Retrieves all the comments from a case.", - "operationId": "getAllCaseComments", - "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; instead, use the get case comment API, which requires a comment identifier in the path. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", - "deprecated": true, - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/comments/_find": { - "get": { - "summary": "Retrieves all the user comments from a case.", - "operationId": "findCaseComments", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/page_index" - }, - { - "$ref": "#/components/parameters/page_size" - }, - { - "$ref": "#/components/parameters/sort_order" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/comments/{commentId}": { - "delete": { - "summary": "Deletes a comment or alert from a case.", - "operationId": "deleteCaseComment", - "description": "You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/comment_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "204": { - "description": "Indicates a successful call." - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - }, - "get": { - "summary": "Retrieves a comment from a case.", - "operationId": "getCaseComment", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.\n", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/comment_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "oneOf": [ - { - "$ref": "#/components/schemas/alert_comment_response_properties" - }, - { - "$ref": "#/components/schemas/user_comment_response_properties" - } - ] - }, - "examples": { - "getCaseCommentResponse": { - "$ref": "#/components/examples/get_comment_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push": { - "post": { - "summary": "Pushes a case to an external service.", - "description": "You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing.\n", - "operationId": "pushCase", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/connector_id" - }, - { - "$ref": "#/components/parameters/kbn_xsrf" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": [ - "object", - "null" - ] - } - } - } - }, - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/case_response_properties" - }, - "examples": { - "pushCaseResponse": { - "$ref": "#/components/examples/push_case_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/user_actions": { - "get": { - "summary": "Returns all user activity for a case.", - "description": "Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", - "deprecated": true, - "operationId": "getCaseActivity", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/user_actions_response_properties" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - }, - "/s/{spaceId}/api/cases/{caseId}/user_actions/_find": { - "get": { - "summary": "Finds user activity for a case.", - "description": "You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking.\n", - "operationId": "findCaseActivity", - "tags": [ - "cases" - ], - "parameters": [ - { - "$ref": "#/components/parameters/case_id" - }, - { - "$ref": "#/components/parameters/space_id" - }, - { - "$ref": "#/components/parameters/page_index" - }, - { - "$ref": "#/components/parameters/page_size" - }, - { - "$ref": "#/components/parameters/sort_order" - }, - { - "$ref": "#/components/parameters/user_action_types" - } - ], - "responses": { - "200": { - "description": "Indicates a successful call.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "page": { - "type": "integer" - }, - "perPage": { - "type": "integer" - }, - "total": { - "type": "integer" - }, - "userActions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/user_actions_find_response_properties" - } - } - } - }, - "examples": { - "findCaseActivityResponse": { - "$ref": "#/components/examples/find_case_activity_response" - } - } - } - } - }, - "401": { - "description": "Authorization information is missing or invalid.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/4xx_response" - } - } - } - } - } - } - } - }, - "components": { - "securitySchemes": { - "basicAuth": { - "type": "http", - "scheme": "basic" - }, - "apiKeyAuth": { - "type": "apiKey", - "in": "header", - "name": "Authorization", - "description": "e.g. Authorization: ApiKey base64AccessApiKey" - } - }, - "parameters": { - "kbn_xsrf": { - "schema": { - "type": "string" }, - "in": "header", - "name": "kbn-xsrf", - "description": "Cross-site request forgery protection", - "required": true - }, - "ids": { - "name": "ids", - "description": "The cases that you want to removed. All non-ASCII characters must be URL encoded.\n", - "in": "query", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string", - "minItems": 1, - "maxItems": 100 - }, - "examples": [ - [ - "d4e7abb0-b462-11ec-9a8d-698504725a43" - ] - ] - } + "example": "d4e7abb0-b462-11ec-9a8d-698504725a43" }, "assignees": { "in": "query", @@ -4189,19 +1923,15 @@ "schema": { "oneOf": [ { - "type": "string" + "type": "string", + "example": "my-category" }, { "type": "array", "items": { "type": "string" }, - "maxItems": 100, - "examples": [ - [ - "my-category" - ] - ] + "maxItems": 100 } ] } @@ -4212,11 +1942,9 @@ "description": "he default operator to use for the simple_query_string.", "schema": { "type": "string", - "default": "OR", - "examples": [ - "OR" - ] - } + "default": "OR" + }, + "example": "OR" }, "from": { "in": "query", @@ -4224,9 +1952,7 @@ "description": "Returns only cases that were created after a specific date. The date must be specified as a KQL data range or date match expression.\n", "schema": { "type": "string", - "examples": [ - "now-1d" - ] + "example": "now-1d" } }, "owner": { @@ -4242,15 +1968,11 @@ "type": "array", "items": { "$ref": "#/components/schemas/owners" - }, - "examples": [ - [ - "cases" - ] - ] + } } ] - } + }, + "example": "cases" }, "page_index": { "in": "query", @@ -4259,10 +1981,7 @@ "required": false, "schema": { "type": "integer", - "default": 1, - "examples": [ - 1 - ] + "default": 1 } }, "page_size": { @@ -4290,15 +2009,11 @@ "items": { "type": "string" }, - "maxItems": 100, - "examples": [ - [ - "elastic" - ] - ] + "maxItems": 100 } ] - } + }, + "example": "elastic" }, "search": { "in": "query", @@ -4355,11 +2070,9 @@ "status", "severity" ], - "default": "createdAt", - "examples": [ - "updatedAt" - ] - } + "default": "createdAt" + }, + "example": "updatedAt" }, "sort_order": { "in": "query", @@ -4385,11 +2098,9 @@ "closed", "in-progress", "open" - ], - "examples": [ - "open" ] - } + }, + "example": "open" }, "tags": { "in": "query", @@ -4405,26 +2116,20 @@ "items": { "type": "string" }, - "maxItems": 100, - "examples": [ - [ - "tag-1" - ] - ] + "maxItems": 100 } ] - } + }, + "example": "tag-1" }, "to": { "in": "query", "name": "to", "description": "Returns only cases that were created before a specific date. The date must be specified as a KQL data range or date match expression.\n", "schema": { - "type": "string", - "examples": [ - "now+1d" - ] - } + "type": "string" + }, + "example": "now+1d" }, "alert_id": { "in": "path", @@ -4433,9 +2138,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540" - ] + "example": "09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540" } }, "configuration_id": { @@ -4445,9 +2148,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9" - ] + "example": "3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9" } }, "case_id": { @@ -4457,9 +2158,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "9c235210-6834-11ea-a78c-6ffb38a34414" - ] + "example": "9c235210-6834-11ea-a78c-6ffb38a34414" } }, "includeComments": { @@ -4479,9 +2178,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "71ec1870-725b-11ea-a0b2-c51ea50a58e2" - ] + "example": "71ec1870-725b-11ea-a0b2-c51ea50a58e2" } }, "connector_id": { @@ -4491,9 +2188,7 @@ "required": true, "schema": { "type": "string", - "examples": [ - "abed3a70-71bd-11ea-a0b2-c51ea50a58e2" - ] + "example": "abed3a70-71bd-11ea-a0b2-c51ea50a58e2" } }, "user_action_types": { @@ -4521,35 +2216,17 @@ "title", "user" ] - }, - "examples": [ - [ - "create_case" - ] - ] - } - }, - "space_id": { - "in": "path", - "name": "spaceId", - "description": "An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used.", - "required": true, - "schema": { - "type": "string", - "examples": [ - "default" - ] - } + } + }, + "example": "create_case" } }, "schemas": { "assignees": { - "type": [ - "array", - "null" - ], + "type": "array", "description": "An array containing users that are assigned to the case.", "maxItems": 10, + "nullable": true, "items": { "type": "object", "required": [ @@ -4559,9 +2236,7 @@ "uid": { "type": "string", "description": "A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API.", - "examples": [ - "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" - ] + "example": "u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0" } } } @@ -4579,34 +2254,24 @@ "properties": { "fields": { "description": "An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null.", - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "nullable": true, + "type": "string", + "example": null }, "id": { "description": "The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "description": "The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`.", "type": "string", - "examples": [ - ".none" - ], + "example": ".none", "enum": [ ".none" ] @@ -4625,13 +2290,9 @@ "type": "object", "properties": { "fields": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "nullable": true, + "example": null }, "id": { "description": "The identifier for the connector. To retrieve connector IDs, use the find connectors API.", @@ -4644,9 +2305,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".cases-webhook" - ], + "example": ".cases-webhook", "enum": [ ".cases-webhook" ] @@ -4675,24 +2334,18 @@ "properties": { "issueType": { "description": "The type of issue.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "parent": { "description": "The key of the parent issue, when the issue type is sub-task.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "priority": { "description": "The priority of the issue.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true } } }, @@ -4707,9 +2360,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".jira" - ], + "example": ".jira", "enum": [ ".jira" ] @@ -4729,10 +2380,8 @@ "properties": { "fields": { "description": "An object containing the connector fields. If you want to omit any individual field, specify null as its value.", - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "required": [ "issueTypes", "severityCode" @@ -4762,9 +2411,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".resilient" - ], + "example": ".resilient", "enum": [ ".resilient" ] @@ -4795,38 +2442,28 @@ "properties": { "category": { "description": "The category of the incident.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "impact": { "description": "The effect an incident had on business.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "severity": { "description": "The severity of the incident.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "subcategory": { "description": "The subcategory of the incident.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "urgency": { "description": "The extent to which the incident resolution can be delayed.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true } } }, @@ -4841,9 +2478,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".servicenow" - ], + "example": ".servicenow", "enum": [ ".servicenow" ] @@ -4876,52 +2511,38 @@ "properties": { "category": { "description": "The category of the incident.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "destIp": { "description": "Indicates whether cases will send a comma-separated list of destination IPs.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "malwareHash": { "description": "Indicates whether cases will send a comma-separated list of malware hashes.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "malwareUrl": { "description": "Indicates whether cases will send a comma-separated list of malware URLs.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "priority": { "description": "The priority of the issue.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true }, "sourceIp": { "description": "Indicates whether cases will send a comma-separated list of source IPs.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "subcategory": { "description": "The subcategory of the incident.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true } } }, @@ -4936,9 +2557,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".servicenow-sir" - ], + "example": ".servicenow-sir", "enum": [ ".servicenow-sir" ] @@ -4965,10 +2584,8 @@ "properties": { "caseId": { "description": "The case identifier for Swimlane connectors.", - "type": [ - "string", - "null" - ] + "type": "string", + "nullable": true } } }, @@ -4983,9 +2600,7 @@ "type": { "description": "The type of connector.", "type": "string", - "examples": [ - ".swimlane" - ], + "example": ".swimlane", "enum": [ ".swimlane" ] @@ -5005,9 +2620,7 @@ "observability", "securitySolution" ], - "examples": [ - "cases" - ] + "example": "cases" }, "settings": { "type": "object", @@ -5019,9 +2632,7 @@ "syncAlerts": { "description": "Turns alert syncing on or off.", "type": "boolean", - "examples": [ - true - ] + "example": true } } }, @@ -5120,7 +2731,6 @@ "customFields": { "type": "array", "description": "Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n", - "x-technical-preview": true, "minItems": 0, "maxItems": 10, "items": { @@ -5147,12 +2757,10 @@ "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", "oneOf": [ { - "type": [ - "string", - "null" - ], + "type": "string", "minLength": 1, - "maxLength": 160 + "maxLength": 160, + "nullable": true }, { "type": "boolean" @@ -5166,43 +2774,27 @@ }, "case_response_closed_by_properties": { "title": "Case response properties for closed_by", - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -5222,17 +2814,13 @@ "type": "array", "items": { "type": "string", - "examples": [ - "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" - ] + "example": "a6e12ac4-7bce-457b-84f6-d7ce8deb8446" } }, "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2023-11-06T19:29:38.424Z" - ] + "example": "2023-11-06T19:29:38.424Z" }, "created_by": { "type": "object", @@ -5243,73 +2831,48 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, - "profile_uid": { + "full_name": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } }, "id": { "type": "string", - "examples": [ - "73362370-ab1a-11ec-985f-97e55adae8b9" - ] + "example": "73362370-ab1a-11ec-985f-97e55adae8b9" }, "index": { "type": "array", "items": { "type": "string", - "examples": [ - ".internal.alerts-security.alerts-default-000001" - ] + "example": ".internal.alerts-security.alerts-default-000001" } }, "owner": { "$ref": "#/components/schemas/owners" }, "pushed_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - null - ] + "example": null, + "nullable": true }, "pushed_by": { - "type": [ - "object", - "null" - ], + "type": "object", "required": [ "email", "full_name", @@ -5317,39 +2880,26 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } - } + }, + "nullable": true }, "rule": { "type": "object", @@ -5357,40 +2907,30 @@ "id": { "description": "The rule identifier.", "type": "string", - "examples": [ - "94d80550-aaf4-11ec-985f-97e55adae8b9" - ] + "example": "94d80550-aaf4-11ec-985f-97e55adae8b9" }, "name": { "description": "The rule name.", "type": "string", - "examples": [ - "security_rule" - ] + "example": "security_rule" } } }, "type": { "type": "string", - "examples": [ - "alert" - ], + "example": "alert", "enum": [ "alert" ] }, "updated_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" + "type": "string", + "format": "date-time", + "nullable": true }, "updated_by": { - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "required": [ "email", "full_name", @@ -5398,45 +2938,29 @@ ], "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } } }, "version": { "type": "string", - "examples": [ - "WzMwNDgsMV0=" - ] + "example": "WzMwNDgsMV0=" } } }, @@ -5449,69 +2973,51 @@ "properties": { "comment": { "type": "string", - "examples": [ - "A new comment." - ] + "example": "A new comment." }, "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-05-13T09:16:17.416Z" - ] + "example": "2022-05-13T09:16:17.416Z" }, "created_by": { "$ref": "#/components/schemas/case_response_created_by_properties" }, "id": { "type": "string", - "examples": [ - "8af6ac20-74f6-11ea-b83a-553aecdb28b6" - ] + "example": "8af6ac20-74f6-11ea-b83a-553aecdb28b6" }, "owner": { "$ref": "#/components/schemas/owners" }, "pushed_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - null - ] + "nullable": true, + "example": null }, "pushed_by": { "$ref": "#/components/schemas/case_response_pushed_by_properties" }, "type": { "type": "string", - "examples": [ - "user" - ], + "example": "user", "enum": [ "user" ] }, "updated_at": { - "type": [ - "string", - "null" - ], + "type": "string", "format": "date-time", - "examples": [ - null - ] + "nullable": true, + "example": null }, "updated_by": { "$ref": "#/components/schemas/case_response_updated_by_properties" }, "version": { "type": "string", - "examples": [ - "WzIwNDMxLDFd" - ] + "example": "WzIwNDMxLDFd" } } }, @@ -5520,37 +3026,23 @@ "type": "object", "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -5561,43 +3053,27 @@ }, "case_response_pushed_by_properties": { "title": "Case response properties for pushed_by", - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -5608,43 +3084,27 @@ }, "case_response_updated_by_properties": { "title": "Case response properties for updated_by", - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -5654,10 +3114,8 @@ ] }, "external_service": { - "type": [ - "object", - "null" - ], + "type": "object", + "nullable": true, "properties": { "connector_id": { "type": "string" @@ -5679,45 +3137,29 @@ "format": "date-time" }, "pushed_by": { - "type": [ - "object", - "null" - ], + "type": "object", "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } - } + }, + "nullable": true } } }, @@ -5761,18 +3203,14 @@ "$ref": "#/components/schemas/assignees" }, "category": { - "type": [ - "string", - "null" - ], - "description": "The case category." + "type": "string", + "description": "The case category.", + "nullable": true }, "closed_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" + "type": "string", + "format": "date-time", + "nullable": true }, "closed_by": { "$ref": "#/components/schemas/case_response_closed_by_properties" @@ -5841,9 +3279,7 @@ "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-05-13T09:16:17.416Z" - ] + "example": "2022-05-13T09:16:17.416Z" }, "created_by": { "$ref": "#/components/schemas/case_response_created_by_properties" @@ -5851,7 +3287,6 @@ "customFields": { "type": "array", "description": "Custom field values for the case.", - "x-technical-preview": true, "items": { "type": "object", "properties": { @@ -5871,12 +3306,10 @@ "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", "oneOf": [ { - "type": [ - "string", - "null" - ], + "type": "string", "minLength": 1, - "maxLength": 160 + "maxLength": 160, + "nullable": true }, { "type": "boolean" @@ -5888,28 +3321,20 @@ }, "description": { "type": "string", - "examples": [ - "A case description." - ] + "example": "A case description." }, "duration": { - "type": [ - "integer", - "null" - ], + "type": "integer", "description": "The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero.\n", - "examples": [ - 120 - ] + "nullable": true, + "example": 120 }, "external_service": { "$ref": "#/components/schemas/external_service" }, "id": { "type": "string", - "examples": [ - "66b9aa00-94fa-11ea-9f74-e7e108796192" - ] + "example": "66b9aa00-94fa-11ea-9f74-e7e108796192" }, "owner": { "$ref": "#/components/schemas/owners" @@ -5928,45 +3353,33 @@ "items": { "type": "string" }, - "examples": [ - [ - "tag-1" - ] + "example": [ + "tag-1" ] }, "title": { "type": "string", - "examples": [ - "Case title 1" - ] + "example": "Case title 1" }, "totalAlerts": { "type": "integer", - "examples": [ - 0 - ] + "example": 0 }, "totalComment": { "type": "integer", - "examples": [ - 0 - ] + "example": 0 }, "updated_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" + "type": "string", + "format": "date-time", + "nullable": true }, "updated_by": { "$ref": "#/components/schemas/case_response_updated_by_properties" }, "version": { "type": "string", - "examples": [ - "WzUzMiwxXQ==" - ] + "example": "WzUzMiwxXQ==" } } }, @@ -5976,18 +3389,14 @@ "properties": { "error": { "type": "string", - "examples": [ - "Unauthorized" - ] + "example": "Unauthorized" }, "message": { "type": "string" }, "statusCode": { "type": "integer", - "examples": [ - 401 - ] + "example": 401 } } }, @@ -6045,7 +3454,6 @@ "customFields": { "type": "array", "description": "Custom field values for a case. Any optional custom fields that are not specified in the request are set to null.\n", - "x-technical-preview": true, "minItems": 0, "maxItems": 10, "items": { @@ -6072,12 +3480,10 @@ "description": "The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`.\n", "oneOf": [ { - "type": [ - "string", - "null" - ], + "type": "string", "minLength": 1, - "maxLength": 160 + "maxLength": 160, + "nullable": true }, { "type": "boolean" @@ -6134,9 +3540,7 @@ "close-by-pushing", "close-by-user" ], - "examples": [ - "close-by-user" - ] + "example": "close-by-user" }, "connector_types": { "type": "string", @@ -6150,9 +3554,7 @@ ".servicenow-sir", ".swimlane" ], - "examples": [ - ".none" - ] + "example": ".none" }, "template_tags": { "description": "The words and phrases that help categorize templates. It can be an empty array.\n", @@ -6183,24 +3585,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -6294,24 +3690,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -6327,7 +3717,6 @@ "customFields": { "type": "array", "description": "Custom fields case configuration.", - "x-technical-preview": true, "minItems": 0, "maxItems": 10, "items": { @@ -6402,24 +3791,18 @@ "properties": { "fields": { "description": "The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`.", - "type": [ - "object", - "null" - ] + "nullable": true, + "type": "object" }, "id": { "description": "The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -6435,7 +3818,6 @@ "customFields": { "type": "array", "description": "Custom fields case configuration.", - "x-technical-preview": true, "items": { "type": "object", "required": [ @@ -6489,9 +3871,7 @@ "version": { "description": "The version of the connector. To retrieve the version value, use the get configuration API.\n", "type": "string", - "examples": [ - "WzIwMiwxXQ==" - ] + "example": "WzIwMiwxXQ==" } } }, @@ -6539,9 +3919,7 @@ "type": { "description": "The type of comment.", "type": "string", - "examples": [ - "alert" - ], + "example": "alert", "enum": [ "alert" ] @@ -6557,9 +3935,7 @@ "description": "The new comment. It is required only when `type` is `user`.", "type": "string", "maxLength": 30000, - "examples": [ - "A new comment." - ] + "example": "A new comment." }, "owner": { "$ref": "#/components/schemas/owners" @@ -6567,9 +3943,7 @@ "type": { "type": "string", "description": "The type of comment.", - "examples": [ - "user" - ], + "example": "user", "enum": [ "user" ] @@ -6597,9 +3971,7 @@ } ], "x-technical-preview": true, - "examples": [ - "6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42" - ] + "example": "6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42" }, "alert_indices": { "title": "Alert indices", @@ -6627,16 +3999,12 @@ "id": { "description": "The rule identifier.", "type": "string", - "examples": [ - "94d80550-aaf4-11ec-985f-97e55adae8b9" - ] + "example": "94d80550-aaf4-11ec-985f-97e55adae8b9" }, "name": { "description": "The rule name.", "type": "string", - "examples": [ - "security_rule" - ] + "example": "security_rule" } } }, @@ -6679,9 +4047,7 @@ "id": { "type": "string", "description": "The identifier for the comment. To retrieve comment IDs, use the get comments API.\n", - "examples": [ - "8af6ac20-74f6-11ea-b83a-553aecdb28b6" - ] + "example": "8af6ac20-74f6-11ea-b83a-553aecdb28b6" }, "index": { "$ref": "#/components/schemas/alert_indices" @@ -6698,16 +4064,12 @@ "enum": [ "alert" ], - "examples": [ - "alert" - ] + "example": "alert" }, "version": { "description": "The current comment version. To retrieve version values, use the get comments API.\n", "type": "string", - "examples": [ - "Wzk1LDFd" - ] + "example": "Wzk1LDFd" } } }, @@ -6720,16 +4082,12 @@ "description": "The new comment. It is required only when `type` is `user`.", "type": "string", "maxLength": 30000, - "examples": [ - "A new comment." - ] + "example": "A new comment." }, "id": { "type": "string", "description": "The identifier for the comment. To retrieve comment IDs, use the get comments API.\n", - "examples": [ - "8af6ac20-74f6-11ea-b83a-553aecdb28b6" - ] + "example": "8af6ac20-74f6-11ea-b83a-553aecdb28b6" }, "owner": { "$ref": "#/components/schemas/owners" @@ -6740,16 +4098,12 @@ "enum": [ "user" ], - "examples": [ - "user" - ] + "example": "user" }, "version": { "description": "The current comment version. To retrieve version values, use the get comments API.\n", "type": "string", - "examples": [ - "Wzk1LDFd" - ] + "example": "Wzk1LDFd" } }, "required": [ @@ -6788,9 +4142,7 @@ "push_to_service", "update" ], - "examples": [ - "create" - ] + "example": "create" }, "payload_alert_comment": { "type": "object", @@ -6802,9 +4154,7 @@ "oneOf": [ { "type": "string", - "examples": [ - "1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d" - ] + "example": "1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d" }, { "type": "array", @@ -6818,9 +4168,7 @@ "oneOf": [ { "type": "string", - "examples": [ - ".alerts-observability.logs.alerts-default" - ] + "example": ".alerts-observability.logs.alerts-default" }, { "type": "array", @@ -6839,16 +4187,12 @@ "id": { "description": "The rule identifier.", "type": "string", - "examples": [ - "94d80550-aaf4-11ec-985f-97e55adae8b9" - ] + "example": "94d80550-aaf4-11ec-985f-97e55adae8b9" }, "name": { "description": "The rule name.", "type": "string", - "examples": [ - "security_rule" - ] + "example": "security_rule" } } }, @@ -6877,11 +4221,9 @@ "type": "object", "properties": { "fields": { - "description": "An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.\n", - "type": [ - "object", - "null" - ], + "description": "An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.", + "nullable": true, + "type": "object", "properties": { "caseId": { "description": "The case identifier for Swimlane connectors.", @@ -6893,10 +4235,8 @@ }, "destIp": { "description": "Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "impact": { "description": "The effect an incident had on business for ServiceNow ITSM connectors.", @@ -6915,17 +4255,13 @@ }, "malwareHash": { "description": "Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "malwareUrl": { "description": "Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "parent": { "description": "The key of the parent issue, when the issue type is sub-task for Jira connectors.", @@ -6945,10 +4281,8 @@ }, "sourceIp": { "description": "Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "subcategory": { "description": "The subcategory of the incident for ServiceNow ITSM connectors.", @@ -6959,23 +4293,17 @@ "type": "string" } }, - "examples": [ - null - ] + "example": null }, "id": { "description": "The identifier for the connector. To create a case without a connector, use `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. To create a case without a connector, use `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -6994,11 +4322,9 @@ "type": "object", "properties": { "fields": { - "description": "An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.\n", - "type": [ - "object", - "null" - ], + "description": "An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value.", + "nullable": true, + "type": "object", "properties": { "caseId": { "description": "The case identifier for Swimlane connectors.", @@ -7010,10 +4336,8 @@ }, "destIp": { "description": "Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "impact": { "description": "The effect an incident had on business for ServiceNow ITSM connectors.", @@ -7032,17 +4356,13 @@ }, "malwareHash": { "description": "Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "malwareUrl": { "description": "Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "parent": { "description": "The key of the parent issue, when the issue type is sub-task for Jira connectors.", @@ -7062,10 +4382,8 @@ }, "sourceIp": { "description": "Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors.", - "type": [ - "boolean", - "null" - ] + "type": "boolean", + "nullable": true }, "subcategory": { "description": "The subcategory of the incident for ServiceNow ITSM connectors.", @@ -7076,23 +4394,17 @@ "type": "string" } }, - "examples": [ - null - ] + "example": null }, "id": { "description": "The identifier for the connector. To create a case without a connector, use `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "name": { "description": "The name of the connector. To create a case without a connector, use `none`.", "type": "string", - "examples": [ - "none" - ] + "example": "none" }, "type": { "$ref": "#/components/schemas/connector_types" @@ -7117,13 +4429,11 @@ "tags": { "type": "array", "items": { - "type": "string" - }, - "examples": [ - [ + "type": "string", + "example": [ "tag-1" ] - ] + } }, "title": { "type": "string" @@ -7131,11 +4441,9 @@ } }, "payload_delete": { - "type": [ - "object", - "null" - ], - "description": "If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable." + "type": "object", + "description": "If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable.", + "nullable": true }, "payload_description": { "type": "object", @@ -7185,10 +4493,8 @@ "items": { "type": "string" }, - "examples": [ - [ - "tag-1" - ] + "example": [ + "tag-1" ] } } @@ -7240,9 +4546,7 @@ "settings", "severity" ], - "examples": [ - "create_case" - ] + "example": "create_case" }, "user_actions_response_properties": { "type": "object", @@ -7263,67 +4567,43 @@ }, "action_id": { "type": "string", - "examples": [ - "22fd3e30-03b1-11ed-920c-974bfa104448" - ] + "example": "22fd3e30-03b1-11ed-920c-974bfa104448" }, "case_id": { "type": "string", - "examples": [ - "22df07d0-03b1-11ed-920c-974bfa104448" - ] + "example": "22df07d0-03b1-11ed-920c-974bfa104448" }, "comment_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "578608d0-03b1-11ed-920c-974bfa104448" - ] + "type": "string", + "nullable": true, + "example": "578608d0-03b1-11ed-920c-974bfa104448" }, "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-05-13T09:16:17.416Z" - ] + "example": "2022-05-13T09:16:17.416Z" }, "created_by": { "type": "object", "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -7401,56 +4681,36 @@ "$ref": "#/components/schemas/actions" }, "comment_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "578608d0-03b1-11ed-920c-974bfa104448" - ] + "type": "string", + "nullable": true, + "example": "578608d0-03b1-11ed-920c-974bfa104448" }, "created_at": { "type": "string", "format": "date-time", - "examples": [ - "2022-05-13T09:16:17.416Z" - ] + "example": "2022-05-13T09:16:17.416Z" }, "created_by": { "type": "object", "properties": { "email": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] + "type": "string", + "example": null, + "nullable": true }, "full_name": { - "type": [ - "string", - "null" - ], - "examples": [ - null - ] - }, - "profile_uid": { "type": "string", - "examples": [ - "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" - ] + "example": null, + "nullable": true }, "username": { - "type": [ - "string", - "null" - ], - "examples": [ - "elastic" - ] + "type": "string", + "example": "elastic", + "nullable": true + }, + "profile_uid": { + "type": "string", + "example": "u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0" } }, "required": [ @@ -7461,9 +4721,7 @@ }, "id": { "type": "string", - "examples": [ - "22fd3e30-03b1-11ed-920c-974bfa104448" - ] + "example": "22fd3e30-03b1-11ed-920c-974bfa104448" }, "owner": { "$ref": "#/components/schemas/owners" @@ -7513,9 +4771,7 @@ }, "version": { "type": "string", - "examples": [ - "WzM1ODg4LDFd" - ] + "example": "WzM1ODg4LDFd" }, "type": { "type": "string", @@ -7533,9 +4789,7 @@ "settings", "severity" ], - "examples": [ - "create_case" - ] + "example": "create_case" } } } diff --git a/x-pack/plugins/cases/docs/openapi/bundled.yaml b/x-pack/plugins/cases/docs/openapi/bundled.yaml index 7aeea6de8e052..5c56a0196ec24 100644 --- a/x-pack/plugins/cases/docs/openapi/bundled.yaml +++ b/x-pack/plugins/cases/docs/openapi/bundled.yaml @@ -1,8 +1,8 @@ -openapi: 3.1.0 +openapi: 3.0.1 info: title: Cases description: OpenAPI schema for Cases endpoints - version: '0.2' + version: '0.1' contact: name: Cases Team license: @@ -10,16 +10,13 @@ info: url: https://www.elastic.co/licensing/elastic-license servers: - url: / -security: - - basicAuth: [] - - apiKeyAuth: [] tags: - name: cases description: Case APIs enable you to open and track issues. paths: /api/cases: post: - summary: Creates a case in the default space. + summary: Create a case operationId: createCaseDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. @@ -53,7 +50,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' delete: - summary: Deletes one or more cases in the default space. + summary: Delete cases operationId: deleteCaseDefaultSpace description: | You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. @@ -72,7 +69,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' patch: - summary: Updates one or more cases in the default space. + summary: Update cases operationId: updateCaseDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. @@ -108,7 +105,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/_find: get: - summary: Retrieves a paginated subset of cases in the default space. + summary: Search cases operationId: findCasesDefaultSpace description: | You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. @@ -167,7 +164,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/alerts/{alertId}: get: - summary: Returns the cases associated with a specific alert in the default space. + summary: Get cases for an alert operationId: getCasesByAlertDefaultSpace description: | You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. @@ -194,7 +191,7 @@ paths: title: type: string description: The case title. - examples: + example: - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 title: security_case '401': @@ -205,10 +202,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure: get: - summary: Get case settings in the default space + summary: Get case settings operationId: getCaseConfigurationDefaultSpace description: | - Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. + Get setting details such as the closure type, custom fields, templatse, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. tags: - cases parameters: @@ -230,26 +227,22 @@ paths: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' created_at: type: string format: date-time - examples: - - '2022-06-01T17:07:17.767Z' + example: '2022-06-01T17:07:17.767Z' created_by: type: object required: @@ -258,27 +251,20 @@ paths: - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 customFields: type: array description: Custom fields configuration details. @@ -313,15 +299,12 @@ paths: - text - toggle error: - type: - - string - - 'null' - examples: - - null + type: string + nullable: true + example: null id: type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 mappings: type: array items: @@ -329,62 +312,48 @@ paths: properties: action_type: type: string - examples: - - overwrite + example: overwrite source: type: string - examples: - - title + example: title target: type: string - examples: - - summary + example: summary owner: $ref: '#/components/schemas/owners' templates: $ref: '#/components/schemas/templates' updated_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - '2022-06-01T19:58:48.169Z' + nullable: true + example: '2022-06-01T19:58:48.169Z' updated_by: - type: - - object - - 'null' + type: object required: - email - full_name - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true version: type: string - examples: - - WzIwNzMsMV0= + example: WzIwNzMsMV0= examples: getConfigurationResponse: $ref: '#/components/examples/get_case_configuration_response' @@ -395,7 +364,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' post: - summary: Add case settings in the default space + summary: Add case settings operationId: setCaseConfigurationDefaultSpace description: | Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. @@ -426,26 +395,22 @@ paths: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' created_at: type: string format: date-time - examples: - - '2022-06-01T17:07:17.767Z' + example: '2022-06-01T17:07:17.767Z' created_by: type: object required: @@ -454,27 +419,20 @@ paths: - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 customFields: type: array description: Custom fields configuration details. @@ -509,15 +467,12 @@ paths: - text - toggle error: - type: - - string - - 'null' - examples: - - null + type: string + nullable: true + example: null id: type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 mappings: type: array items: @@ -525,62 +480,48 @@ paths: properties: action_type: type: string - examples: - - overwrite + example: overwrite source: type: string - examples: - - title + example: title target: type: string - examples: - - summary + example: summary owner: $ref: '#/components/schemas/owners' templates: $ref: '#/components/schemas/templates' updated_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - '2022-06-01T19:58:48.169Z' + nullable: true + example: '2022-06-01T19:58:48.169Z' updated_by: - type: - - object - - 'null' + type: object required: - email - full_name - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true version: type: string - examples: - - WzIwNzMsMV0= + example: WzIwNzMsMV0= examples: setCaseConfigResponse: $ref: '#/components/examples/set_case_configuration_response' @@ -592,10 +533,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure/{configurationId}: patch: - summary: Update case settings in the default space + summary: Update case settings operationId: updateCaseConfigurationDefaultSpace description: | - Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. tags: - cases parameters: @@ -624,26 +565,22 @@ paths: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' created_at: type: string format: date-time - examples: - - '2022-06-01T17:07:17.767Z' + example: '2022-06-01T17:07:17.767Z' created_by: type: object required: @@ -652,27 +589,20 @@ paths: - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 customFields: type: array description: Custom fields configuration details. @@ -707,15 +637,12 @@ paths: - text - toggle error: - type: - - string - - 'null' - examples: - - null + type: string + nullable: true + example: null id: type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 mappings: type: array items: @@ -723,62 +650,48 @@ paths: properties: action_type: type: string - examples: - - overwrite + example: overwrite source: type: string - examples: - - title + example: title target: type: string - examples: - - summary + example: summary owner: $ref: '#/components/schemas/owners' templates: $ref: '#/components/schemas/templates' updated_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - '2022-06-01T19:58:48.169Z' + nullable: true + example: '2022-06-01T19:58:48.169Z' updated_by: - type: - - object - - 'null' + type: object required: - email - full_name - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true version: type: string - examples: - - WzIwNzMsMV0= + example: WzIwNzMsMV0= examples: updateCaseConfigurationResponse: $ref: '#/components/examples/update_case_configuration_response' @@ -790,10 +703,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/reporters: get: - summary: Returns information about the users who opened cases in the default space. + summary: Get case creators operationId: getCaseReportersDefaultSpace description: | - You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged. + Returns information about the users who opened cases. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged. tags: - cases parameters: @@ -814,27 +727,20 @@ paths: - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 examples: getReportersResponse: $ref: '#/components/examples/get_reporters_response' @@ -846,10 +752,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/status: get: - summary: Returns the number of cases that are open, closed, and in progress in the default space. + summary: Get case status summary operationId: getCaseStatusDefaultSpace description: | - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. + Returns the number of cases that are open, closed, and in progress. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. deprecated: true tags: - cases @@ -877,10 +783,10 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/tags: get: - summary: Aggregates and returns a list of case tags in the default space. + summary: Get case tags operationId: getCaseTagsDefaultSpace description: | - You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. + Aggregates and returns a list of case tags. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. tags: - cases parameters: @@ -906,7 +812,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}: get: - summary: Retrieves information about a case in the default space. + summary: Get case information operationId: getCaseDefaultSpace description: | You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. @@ -935,7 +841,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/alerts: get: - summary: Gets all alerts attached to a case in the default space. + summary: Get all alerts for a case description: | You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. x-technical-preview: true @@ -964,7 +870,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/comments: post: - summary: Adds a comment or alert to a case in the default space. + summary: Add a case comment or alert operationId: addCaseCommentDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts. @@ -999,10 +905,10 @@ paths: schema: $ref: '#/components/schemas/4xx_response' delete: - summary: Deletes all comments and alerts from a case in the default space. + summary: Delete all case comments and alerts operationId: deleteCaseCommentsDefaultSpace description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. + Deletes all comments and alerts from a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. tags: - cases parameters: @@ -1018,7 +924,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' patch: - summary: Updates a comment or alert in a case in the default space. + summary: Update a case comment or alert operationId: updateCaseCommentDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment. @@ -1053,7 +959,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' get: - summary: Retrieves all the comments from a case in the default space. + summary: Get all case comments operationId: getAllCaseCommentsDefaultSpace description: | Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; instead, use the get case comment API, which requires a comment identifier in the path. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. @@ -1075,9 +981,35 @@ paths: application/json: schema: $ref: '#/components/schemas/4xx_response' + /api/cases/{caseId}/comments/_find: + get: + summary: Find case comments and alerts + operationId: findCaseCommentsDefaultSpace + description: | + Retrieves a paginated list of comments for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. + tags: + - cases + parameters: + - $ref: '#/components/parameters/case_id' + - $ref: '#/components/parameters/page_index' + - $ref: '#/components/parameters/page_size' + - $ref: '#/components/parameters/sort_order' + responses: + '200': + description: Indicates a successful call. + content: + application/json: + schema: + $ref: '#/components/schemas/case_response_properties' + '401': + description: Authorization information is missing or invalid. + content: + application/json: + schema: + $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/comments/{commentId}: delete: - summary: Deletes a comment or alert from a case in the default space. + summary: Delete a case comment or alert operationId: deleteCaseCommentDefaultSpace description: | You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. @@ -1097,7 +1029,7 @@ paths: schema: $ref: '#/components/schemas/4xx_response' get: - summary: Retrieves a comment from a case in the default space. + summary: Get a case comment or alert operationId: getCaseCommentDefaultSpace description: | You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. @@ -1126,7 +1058,7 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/connector/{connectorId}/_push: post: - summary: Pushes a case in the default space to an external service. + summary: Push a case to an external service description: | You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing. operationId: pushCaseDefaultSpace @@ -1140,9 +1072,8 @@ paths: content: application/json: schema: - type: - - object - - 'null' + type: object + nullable: true responses: '200': description: Indicates a successful call. @@ -1161,9 +1092,9 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/user_actions: get: - summary: Returns all user activity for a case in the default space. + summary: Get case activity description: | - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. + Returns all user activity for a case. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. deprecated: true operationId: getCaseActivityDefaultSpace tags: @@ -1187,9 +1118,9 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/{caseId}/user_actions/_find: get: - summary: Finds user activity for a case in the default space. + summary: Find case activity description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. + Retrives a paginated list of user activity for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. operationId: findCaseActivityDefaultSpace tags: - cases @@ -1229,1353 +1160,48 @@ paths: $ref: '#/components/schemas/4xx_response' /api/cases/configure/connectors/_find: get: - summary: Get case connectors in the default space + summary: Get case connectors operationId: findCaseConnectorsDefaultSpace description: | - Retrieves information about connectors that are supported for use in cases in the default space. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - cases - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - actionTypeId: - $ref: '#/components/schemas/connector_types' - config: - type: object - properties: - apiUrl: - type: string - projectKey: - type: string - additionalProperties: true - id: - type: string - isDeprecated: - type: boolean - isMissingSecrets: - type: boolean - isPreconfigured: - type: boolean - name: - type: string - referencedByCount: - type: integer - maxItems: 1000 - examples: - findConnectorResponse: - $ref: '#/components/examples/find_connector_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases: - post: - summary: Creates a case. - operationId: createCase - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/create_case_request' - examples: - createCaseRequest: - $ref: '#/components/examples/create_case_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - examples: - createCaseResponse: - $ref: '#/components/examples/create_case_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - delete: - summary: Deletes one or more cases. - operationId: deleteCase - description: | - You must have `read` or `all` privileges and the `delete` sub-feature privilege for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/ids' - - $ref: '#/components/parameters/space_id' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - patch: - summary: Updates one or more cases. - operationId: updateCase - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/update_case_request' - examples: - updateCaseRequest: - $ref: '#/components/examples/update_case_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/case_response_properties' - examples: - updateCaseResponse: - $ref: '#/components/examples/update_case_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/_find: - get: - summary: Retrieves a paginated subset of cases. - operationId: findCases - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. + Get information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/assignees' - - $ref: '#/components/parameters/category' - - $ref: '#/components/parameters/defaultSearchOperator' - - $ref: '#/components/parameters/from' - - $ref: '#/components/parameters/owner' - - $ref: '#/components/parameters/page_index' - - $ref: '#/components/parameters/page_size' - - $ref: '#/components/parameters/reporters' - - $ref: '#/components/parameters/search' - - $ref: '#/components/parameters/searchFields' - - $ref: '#/components/parameters/severity' - - $ref: '#/components/parameters/sortField' - - $ref: '#/components/parameters/sort_order' - - $ref: '#/components/parameters/status' - - $ref: '#/components/parameters/tags' - - $ref: '#/components/parameters/to' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - cases: - type: array - items: - $ref: '#/components/schemas/case_response_properties' - count_closed_cases: - type: integer - count_in_progress_cases: - type: integer - count_open_cases: - type: integer - page: - type: integer - per_page: - type: integer - total: - type: integer - examples: - findCaseResponse: - $ref: '#/components/examples/find_case_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/alerts/{alertId}: - get: - summary: Returns the cases associated with a specific alert. - operationId: getCasesByAlert - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. - x-technical-preview: true - tags: - - cases - parameters: - - $ref: '#/components/parameters/alert_id' - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/owner' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - description: The case identifier. - title: - type: string - description: The case title. - examples: - - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 - title: security_case - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/configure: - get: - summary: Get case settings - operationId: getCaseConfiguration - description: | - Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. - tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/owner' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - closure_type: - $ref: '#/components/schemas/closure_types' - connector: - type: object - properties: - fields: - description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' - id: - description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. - type: string - examples: - - none - name: - description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. - type: string - examples: - - none - type: - $ref: '#/components/schemas/connector_types' - created_at: - type: string - format: date-time - examples: - - '2022-06-01T17:07:17.767Z' - created_by: - type: object - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - customFields: - type: array - description: Custom fields configuration details. - items: - type: object - properties: - defaultValue: - oneOf: - - type: string - - type: boolean - description: | - A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle - error: - type: - - string - - 'null' - examples: - - null - id: - type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 - mappings: - type: array - items: - type: object - properties: - action_type: - type: string - examples: - - overwrite - source: - type: string - examples: - - title - target: - type: string - examples: - - summary - owner: - $ref: '#/components/schemas/owners' - templates: - $ref: '#/components/schemas/templates' - updated_at: - type: - - string - - 'null' - format: date-time - examples: - - '2022-06-01T19:58:48.169Z' - updated_by: - type: - - object - - 'null' - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - version: - type: string - examples: - - WzIwNzMsMV0= - examples: - getConfigurationResponse: - $ref: '#/components/examples/get_case_configuration_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - post: - summary: Add case settings - operationId: setCaseConfiguration - description: | - Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/set_case_configuration_request' - examples: - setCaseConfigRequest: - $ref: '#/components/examples/set_case_configuration_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - closure_type: - $ref: '#/components/schemas/closure_types' - connector: - type: object - properties: - fields: - description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' - id: - description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. - type: string - examples: - - none - name: - description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. - type: string - examples: - - none - type: - $ref: '#/components/schemas/connector_types' - created_at: - type: string - format: date-time - examples: - - '2022-06-01T17:07:17.767Z' - created_by: - type: object - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - customFields: - type: array - description: Custom fields configuration details. - items: - type: object - properties: - defaultValue: - oneOf: - - type: string - - type: boolean - description: | - A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle - error: - type: - - string - - 'null' - examples: - - null - id: - type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 - mappings: - type: array - items: - type: object - properties: - action_type: - type: string - examples: - - overwrite - source: - type: string - examples: - - title - target: - type: string - examples: - - summary - owner: - $ref: '#/components/schemas/owners' - templates: - $ref: '#/components/schemas/templates' - updated_at: - type: - - string - - 'null' - format: date-time - examples: - - '2022-06-01T19:58:48.169Z' - updated_by: - type: - - object - - 'null' - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - version: - type: string - examples: - - WzIwNzMsMV0= - examples: - setCaseConfigResponse: - $ref: '#/components/examples/set_case_configuration_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/configure/{configurationId}: - patch: - summary: Update case settings - operationId: updateCaseConfiguration - description: | - Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/configuration_id' - - $ref: '#/components/parameters/space_id' - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/update_case_configuration_request' - examples: - updateCaseConfigurationRequest: - $ref: '#/components/examples/update_case_configuration_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - closure_type: - $ref: '#/components/schemas/closure_types' - connector: - type: object - properties: - fields: - description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' - id: - description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. - type: string - examples: - - none - name: - description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. - type: string - examples: - - none - type: - $ref: '#/components/schemas/connector_types' - created_at: - type: string - format: date-time - examples: - - '2022-06-01T17:07:17.767Z' - created_by: - type: object - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - customFields: - type: array - description: Custom fields configuration details. - items: - type: object - properties: - defaultValue: - oneOf: - - type: string - - type: boolean - description: | - A default value for the custom field. If the `type` is `text`, the default value must be a string. If the `type` is `toggle`, the default value must be boolean. - key: - description: | - A unique key for the custom field. Must be lower case and composed only of a-z, 0-9, '_', and '-' characters. It is used in API calls to refer to a specific custom field. - type: string - minLength: 1 - maxLength: 36 - label: - description: The custom field label that is displayed in the case. - type: string - minLength: 1 - maxLength: 50 - required: - description: | - Indicates whether the field is required. If `false`, the custom field can be set to null or omitted when a case is created or updated. - type: boolean - type: - description: The type of the custom field. - type: string - enum: - - text - - toggle - error: - type: - - string - - 'null' - examples: - - null - id: - type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 - mappings: - type: array - items: - type: object - properties: - action_type: - type: string - examples: - - overwrite - source: - type: string - examples: - - title - target: - type: string - examples: - - summary - owner: - $ref: '#/components/schemas/owners' - templates: - $ref: '#/components/schemas/templates' - updated_at: - type: - - string - - 'null' - format: date-time - examples: - - '2022-06-01T19:58:48.169Z' - updated_by: - type: - - object - - 'null' - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - version: - type: string - examples: - - WzIwNzMsMV0= - examples: - updateCaseConfigurationResponse: - $ref: '#/components/examples/update_case_configuration_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/configure/connectors/_find: - get: - summary: Get case connectors - operationId: findCaseConnectors - description: | - Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - actionTypeId: - $ref: '#/components/schemas/connector_types' - config: - type: object - properties: - apiUrl: - type: string - projectKey: - type: string - additionalProperties: true - id: - type: string - isDeprecated: - type: boolean - isMissingSecrets: - type: boolean - isPreconfigured: - type: boolean - name: - type: string - referencedByCount: - type: integer - examples: - findConnectorResponse: - $ref: '#/components/examples/find_connector_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/reporters: - get: - summary: Returns information about the users who opened cases. - operationId: getCaseReporters - description: | - You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged. - tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/owner' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - required: - - email - - full_name - - username - properties: - email: - type: - - string - - 'null' - examples: - - null - full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: - type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 - username: - type: - - string - - 'null' - examples: - - elastic - examples: - getReportersResponse: - $ref: '#/components/examples/get_reporters_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/status: - get: - summary: Returns the number of cases that are open, closed, and in progress. - operationId: getCaseStatus - description: | - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. - deprecated: true - tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/owner' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - count_closed_cases: - type: integer - count_in_progress_cases: - type: integer - count_open_cases: - type: integer - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/tags: - get: - summary: Aggregates and returns a list of case tags. - operationId: getCaseTags - description: | - You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. - tags: - - cases - parameters: - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/owner' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: string - examples: - getTagsResponse: - $ref: '#/components/examples/get_tags_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}: - get: - summary: Retrieves information about a case. - operationId: getCase - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/includeComments' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - examples: - getCaseResponse: - $ref: '#/components/examples/get_case_response' - getObservabilityCaseReponse: - $ref: '#/components/examples/get_case_observability_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/alerts: - get: - summary: Gets all alerts attached to a case. - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. - x-technical-preview: true - operationId: getCaseAlerts - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/alert_response_properties' - examples: - getCaseAlertsResponse: - $ref: '#/components/examples/get_case_alerts_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/comments: - post: - summary: Adds a comment or alert to a case. - operationId: addCaseComment - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. NOTE: Each case can have a maximum of 1,000 alerts. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/add_case_comment_request' - examples: - createCaseCommentRequest: - $ref: '#/components/examples/add_comment_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - examples: - createCaseCommentResponse: - $ref: '#/components/examples/add_comment_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - delete: - summary: Deletes all comments and alerts from a case. - operationId: deleteCaseComments - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - patch: - summary: Updates a comment or alert in a case. - operationId: updateCaseComment - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. NOTE: You cannot change the comment type or the owner of a comment. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/update_case_comment_request' - examples: - updateCaseCommentRequest: - $ref: '#/components/examples/update_comment_request' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - examples: - updateCaseCommentResponse: - $ref: '#/components/examples/update_comment_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - get: - summary: Retrieves all the comments from a case. - operationId: getAllCaseComments - description: | - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; instead, use the get case comment API, which requires a comment identifier in the path. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. - deprecated: true - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/comments/_find: - get: - summary: Retrieves all the user comments from a case. - operationId: findCaseComments - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/page_index' - - $ref: '#/components/parameters/page_size' - - $ref: '#/components/parameters/sort_order' - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/comments/{commentId}: - delete: - summary: Deletes a comment or alert from a case. - operationId: deleteCaseComment - description: | - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/comment_id' - - $ref: '#/components/parameters/space_id' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - get: - summary: Retrieves a comment from a case. - operationId: getCaseComment - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/comment_id' - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - oneOf: - - $ref: '#/components/schemas/alert_comment_response_properties' - - $ref: '#/components/schemas/user_comment_response_properties' - examples: - getCaseCommentResponse: - $ref: '#/components/examples/get_comment_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push: - post: - summary: Pushes a case to an external service. - description: | - You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing. - operationId: pushCase - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/connector_id' - - $ref: '#/components/parameters/kbn_xsrf' - - $ref: '#/components/parameters/space_id' - requestBody: - content: - application/json: - schema: - type: - - object - - 'null' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '#/components/schemas/case_response_properties' - examples: - pushCaseResponse: - $ref: '#/components/examples/push_case_response' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/user_actions: - get: - summary: Returns all user activity for a case. - description: | - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. - deprecated: true - operationId: getCaseActivity - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/user_actions_response_properties' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '#/components/schemas/4xx_response' - /s/{spaceId}/api/cases/{caseId}/user_actions/_find: - get: - summary: Finds user activity for a case. - description: | - You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. - operationId: findCaseActivity - tags: - - cases - parameters: - - $ref: '#/components/parameters/case_id' - - $ref: '#/components/parameters/space_id' - - $ref: '#/components/parameters/page_index' - - $ref: '#/components/parameters/page_size' - - $ref: '#/components/parameters/sort_order' - - $ref: '#/components/parameters/user_action_types' + - cases responses: '200': description: Indicates a successful call. content: application/json: schema: - type: object - properties: - page: - type: integer - perPage: - type: integer - total: - type: integer - userActions: - type: array - items: - $ref: '#/components/schemas/user_actions_find_response_properties' + type: array + items: + type: object + properties: + actionTypeId: + $ref: '#/components/schemas/connector_types' + config: + type: object + properties: + apiUrl: + type: string + projectKey: + type: string + additionalProperties: true + id: + type: string + isDeprecated: + type: boolean + isMissingSecrets: + type: boolean + isPreconfigured: + type: boolean + name: + type: string + referencedByCount: + type: integer + maxItems: 1000 examples: - findCaseActivityResponse: - $ref: '#/components/examples/find_case_activity_response' + findConnectorResponse: + $ref: '#/components/examples/find_connector_response' '401': description: Authorization information is missing or invalid. content: @@ -2583,15 +1209,6 @@ paths: schema: $ref: '#/components/schemas/4xx_response' components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' parameters: kbn_xsrf: schema: @@ -2612,8 +1229,7 @@ components: type: string minItems: 1 maxItems: 100 - examples: - - - d4e7abb0-b462-11ec-9a8d-698504725a43 + example: d4e7abb0-b462-11ec-9a8d-698504725a43 assignees: in: query name: assignees @@ -2633,12 +1249,11 @@ components: schema: oneOf: - type: string + example: my-category - type: array items: type: string maxItems: 100 - examples: - - - my-category defaultSearchOperator: in: query name: defaultSearchOperator @@ -2646,8 +1261,7 @@ components: schema: type: string default: OR - examples: - - OR + example: OR from: in: query name: from @@ -2655,8 +1269,7 @@ components: Returns only cases that were created after a specific date. The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now-1d + example: now-1d owner: in: query name: owner @@ -2668,8 +1281,7 @@ components: - type: array items: $ref: '#/components/schemas/owners' - examples: - - - cases + example: cases page_index: in: query name: page @@ -2678,8 +1290,6 @@ components: schema: type: integer default: 1 - examples: - - 1 page_size: in: query name: perPage @@ -2700,8 +1310,7 @@ components: items: type: string maxItems: 100 - examples: - - - elastic + example: elastic search: in: query name: search @@ -2744,8 +1353,7 @@ components: - status - severity default: createdAt - examples: - - updatedAt + example: updatedAt sort_order: in: query name: sortOrder @@ -2767,8 +1375,7 @@ components: - closed - in-progress - open - examples: - - open + example: open tags: in: query name: tags @@ -2780,8 +1387,7 @@ components: items: type: string maxItems: 100 - examples: - - - tag-1 + example: tag-1 to: in: query name: to @@ -2789,8 +1395,7 @@ components: Returns only cases that were created before a specific date. The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now+1d + example: now+1d alert_id: in: path name: alertId @@ -2798,8 +1403,7 @@ components: required: true schema: type: string - examples: - - 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 + example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 configuration_id: in: path name: configurationId @@ -2807,8 +1411,7 @@ components: required: true schema: type: string - examples: - - 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 + example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 case_id: in: path name: caseId @@ -2816,8 +1419,7 @@ components: required: true schema: type: string - examples: - - 9c235210-6834-11ea-a78c-6ffb38a34414 + example: 9c235210-6834-11ea-a78c-6ffb38a34414 includeComments: in: query name: includeComments @@ -2834,8 +1436,7 @@ components: required: true schema: type: string - examples: - - 71ec1870-725b-11ea-a0b2-c51ea50a58e2 + example: 71ec1870-725b-11ea-a0b2-c51ea50a58e2 connector_id: in: path name: connectorId @@ -2843,8 +1444,7 @@ components: required: true schema: type: string - examples: - - abed3a70-71bd-11ea-a0b2-c51ea50a58e2 + example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 user_action_types: in: query name: types @@ -2869,24 +1469,13 @@ components: - tags - title - user - examples: - - - create_case - space_id: - in: path - name: spaceId - description: An identifier for the space. If `/s/` and the identifier are omitted from the path, the default space is used. - required: true - schema: - type: string - examples: - - default + example: create_case schemas: assignees: - type: - - array - - 'null' + type: array description: An array containing users that are assigned to the case. maxItems: 10 + nullable: true items: type: object required: @@ -2895,8 +1484,7 @@ components: uid: type: string description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API. - examples: - - u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 + example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 connector_properties_none: title: Create or update case request properties for no connector required: @@ -2909,26 +1497,21 @@ components: properties: fields: description: An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null. - type: - - string - - 'null' - examples: - - null + nullable: true + type: string + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none type: description: The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`. type: string - examples: - - .none + example: .none enum: - .none connector_properties_cases_webhook: @@ -2942,11 +1525,9 @@ components: type: object properties: fields: - type: - - string - - 'null' - examples: - - null + type: string + nullable: true + example: null id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -2956,8 +1537,7 @@ components: type: description: The type of connector. type: string - examples: - - .cases-webhook + example: .cases-webhook enum: - .cases-webhook connector_properties_jira: @@ -2980,19 +1560,16 @@ components: properties: issueType: description: The type of issue. - type: - - string - - 'null' + type: string + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task. - type: - - string - - 'null' + type: string + nullable: true priority: description: The priority of the issue. - type: - - string - - 'null' + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -3002,8 +1579,7 @@ components: type: description: The type of connector. type: string - examples: - - .jira + example: .jira enum: - .jira connector_properties_resilient: @@ -3018,9 +1594,8 @@ components: properties: fields: description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. - type: - - object - - 'null' + type: object + nullable: true required: - issueTypes - severityCode @@ -3042,8 +1617,7 @@ components: type: description: The type of connector. type: string - examples: - - .resilient + example: .resilient enum: - .resilient connector_properties_servicenow: @@ -3068,29 +1642,24 @@ components: properties: category: description: The category of the incident. - type: - - string - - 'null' + type: string + nullable: true impact: description: The effect an incident had on business. - type: - - string - - 'null' + type: string + nullable: true severity: description: The severity of the incident. - type: - - string - - 'null' + type: string + nullable: true subcategory: description: The subcategory of the incident. - type: - - string - - 'null' + type: string + nullable: true urgency: description: The extent to which the incident resolution can be delayed. - type: - - string - - 'null' + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -3100,8 +1669,7 @@ components: type: description: The type of connector. type: string - examples: - - .servicenow + example: .servicenow enum: - .servicenow connector_properties_servicenow_sir: @@ -3128,39 +1696,32 @@ components: properties: category: description: The category of the incident. - type: - - string - - 'null' + type: string + nullable: true destIp: description: Indicates whether cases will send a comma-separated list of destination IPs. - type: - - boolean - - 'null' + type: boolean + nullable: true malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes. - type: - - boolean - - 'null' + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs. - type: - - boolean - - 'null' + type: boolean + nullable: true priority: description: The priority of the issue. - type: - - string - - 'null' + type: string + nullable: true sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs. - type: - - boolean - - 'null' + type: boolean + nullable: true subcategory: description: The subcategory of the incident. - type: - - string - - 'null' + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -3170,8 +1731,7 @@ components: type: description: The type of connector. type: string - examples: - - .servicenow-sir + example: .servicenow-sir enum: - .servicenow-sir connector_properties_swimlane: @@ -3192,9 +1752,8 @@ components: properties: caseId: description: The case identifier for Swimlane connectors. - type: - - string - - 'null' + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -3204,8 +1763,7 @@ components: type: description: The type of connector. type: string - examples: - - .swimlane + example: .swimlane enum: - .swimlane case_description: @@ -3220,8 +1778,7 @@ components: - cases - observability - securitySolution - examples: - - cases + example: cases settings: type: object description: An object that contains the case settings. @@ -3231,8 +1788,7 @@ components: syncAlerts: description: Turns alert syncing on or off. type: boolean - examples: - - true + example: true case_severity: type: string description: The severity of the case. @@ -3323,40 +1879,31 @@ components: description: | The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. oneOf: - - type: - - string - - 'null' + - type: string minLength: 1 maxLength: 160 + nullable: true - type: boolean case_response_closed_by_properties: title: Case response properties for closed_by - type: - - object - - 'null' + type: object + nullable: true properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name @@ -3371,13 +1918,11 @@ components: type: array items: type: string - examples: - - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - examples: - - '2023-11-06T19:29:38.424Z' + example: '2023-11-06T19:29:38.424Z' created_by: type: object required: @@ -3386,136 +1931,104 @@ components: - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 id: type: string - examples: - - 73362370-ab1a-11ec-985f-97e55adae8b9 + example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: type: array items: type: string - examples: - - .internal.alerts-security.alerts-default-000001 + example: .internal.alerts-security.alerts-default-000001 owner: $ref: '#/components/schemas/owners' pushed_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - null + example: null + nullable: true pushed_by: - type: - - object - - 'null' + type: object required: - email - full_name - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true rule: type: object properties: id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule + example: security_rule type: type: string - examples: - - alert + example: alert enum: - alert updated_at: - type: - - string - - 'null' + type: string format: date-time + nullable: true updated_by: - type: - - object - - 'null' + type: object + nullable: true required: - email - full_name - username properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 version: type: string - examples: - - WzMwNDgsMV0= + example: WzMwNDgsMV0= user_comment_response_properties: title: Case response properties for user comments type: object @@ -3524,147 +2037,114 @@ components: properties: comment: type: string - examples: - - A new comment. + example: A new comment. created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: $ref: '#/components/schemas/case_response_created_by_properties' id: type: string - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: '#/components/schemas/owners' pushed_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - null + nullable: true + example: null pushed_by: $ref: '#/components/schemas/case_response_pushed_by_properties' type: type: string - examples: - - user + example: user enum: - user updated_at: - type: - - string - - 'null' + type: string format: date-time - examples: - - null + nullable: true + example: null updated_by: $ref: '#/components/schemas/case_response_updated_by_properties' version: type: string - examples: - - WzIwNDMxLDFd + example: WzIwNDMxLDFd case_response_created_by_properties: title: Case response properties for created_by type: object properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name - username case_response_pushed_by_properties: title: Case response properties for pushed_by - type: - - object - - 'null' + type: object + nullable: true properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name - username case_response_updated_by_properties: title: Case response properties for updated_by - type: - - object - - 'null' + type: object + nullable: true properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name - username external_service: - type: - - object - - 'null' + type: object + nullable: true properties: connector_id: type: string @@ -3680,32 +2160,24 @@ components: type: string format: date-time pushed_by: - type: - - object - - 'null' + type: object properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + nullable: true case_status: type: string description: The status of the case. @@ -3742,15 +2214,13 @@ components: assignees: $ref: '#/components/schemas/assignees' category: - type: - - string - - 'null' + type: string description: The case category. + nullable: true closed_at: - type: - - string - - 'null' + type: string format: date-time + nullable: true closed_by: $ref: '#/components/schemas/case_response_closed_by_properties' comments: @@ -3790,8 +2260,7 @@ components: created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: $ref: '#/components/schemas/case_response_created_by_properties' customFields: @@ -3815,30 +2284,25 @@ components: description: | The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. oneOf: - - type: - - string - - 'null' + - type: string minLength: 1 maxLength: 160 + nullable: true - type: boolean description: type: string - examples: - - A case description. + example: A case description. duration: - type: - - integer - - 'null' + type: integer description: | The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero. - examples: - - 120 + nullable: true + example: 120 external_service: $ref: '#/components/schemas/external_service' id: type: string - examples: - - 66b9aa00-94fa-11ea-9f74-e7e108796192 + example: 66b9aa00-94fa-11ea-9f74-e7e108796192 owner: $ref: '#/components/schemas/owners' settings: @@ -3851,45 +2315,38 @@ components: type: array items: type: string - examples: - - - tag-1 + example: + - tag-1 title: type: string - examples: - - Case title 1 + example: Case title 1 totalAlerts: type: integer - examples: - - 0 + example: 0 totalComment: type: integer - examples: - - 0 + example: 0 updated_at: - type: - - string - - 'null' + type: string format: date-time + nullable: true updated_by: $ref: '#/components/schemas/case_response_updated_by_properties' version: type: string - examples: - - WzUzMiwxXQ== + example: WzUzMiwxXQ== 4xx_response: type: object title: Unsuccessful cases API response properties: error: type: string - examples: - - Unauthorized + example: Unauthorized message: type: string statusCode: type: integer - examples: - - 401 + example: 401 update_case_request: title: Update case request description: The update case API request body varies depending on the type of connector. @@ -3949,11 +2406,10 @@ components: description: | The custom field value. If the custom field is required, it cannot be explicitly set to null. However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. oneOf: - - type: - - string - - 'null' + - type: string minLength: 1 maxLength: 160 + nullable: true - type: boolean description: $ref: '#/components/schemas/case_description' @@ -3986,8 +2442,7 @@ components: enum: - close-by-pushing - close-by-user - examples: - - close-by-user + example: close-by-user connector_types: type: string description: The type of connector. @@ -3999,8 +2454,7 @@ components: - .servicenow - .servicenow-sir - .swimlane - examples: - - .none + example: .none template_tags: description: | The words and phrases that help categorize templates. It can be an empty array. @@ -4027,23 +2481,21 @@ components: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' customFields: type: array + x-technical-preview: true description: Custom field values in the template. items: type: object @@ -4102,19 +2554,16 @@ components: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' required: @@ -4182,19 +2631,16 @@ components: properties: fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - object - - 'null' + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' required: @@ -4246,8 +2692,7 @@ components: description: | The version of the connector. To retrieve the version value, use the get configuration API. type: string - examples: - - WzIwMiwxXQ== + example: WzIwMiwxXQ== alert_response_properties: type: object properties: @@ -4282,8 +2727,7 @@ components: type: description: The type of comment. type: string - examples: - - alert + example: alert enum: - alert add_user_comment_request_properties: @@ -4295,15 +2739,13 @@ components: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. owner: $ref: '#/components/schemas/owners' type: type: string description: The type of comment. - examples: - - user + example: user enum: - user required: @@ -4321,8 +2763,7 @@ components: type: string maxItems: 1000 x-technical-preview: true - examples: - - 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 + example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 alert_indices: title: Alert indices description: | @@ -4344,13 +2785,11 @@ components: id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule + example: security_rule add_case_comment_request: title: Add case comment request description: The add comment to case API request body varies depending on whether you are adding an alert or a comment. @@ -4381,8 +2820,7 @@ components: type: string description: | The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 index: $ref: '#/components/schemas/alert_indices' owner: @@ -4394,14 +2832,12 @@ components: type: string enum: - alert - examples: - - alert + example: alert version: description: | The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd + example: Wzk1LDFd update_user_comment_request_properties: title: Update case comment request properties for user comments description: Defines properties for case comment requests when type is user. @@ -4411,14 +2847,12 @@ components: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. id: type: string description: | The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: '#/components/schemas/owners' type: @@ -4426,14 +2860,12 @@ components: description: The type of comment. enum: - user - examples: - - user + example: user version: description: | The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd + example: Wzk1LDFd required: - comment - id @@ -4459,8 +2891,7 @@ components: - delete - push_to_service - update - examples: - - create + example: create payload_alert_comment: type: object properties: @@ -4470,16 +2901,14 @@ components: alertId: oneOf: - type: string - examples: - - 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d + example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d - type: array items: type: string index: oneOf: - type: string - examples: - - .alerts-observability.logs.alerts-default + example: .alerts-observability.logs.alerts-default - type: array items: type: string @@ -4491,13 +2920,11 @@ components: id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule + example: security_rule type: type: string enum: @@ -4514,11 +2941,9 @@ components: type: object properties: fields: - description: | - An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. - type: - - object - - 'null' + description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. + nullable: true + type: object properties: caseId: description: The case identifier for Swimlane connectors. @@ -4528,9 +2953,8 @@ components: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -4544,14 +2968,12 @@ components: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string @@ -4566,27 +2988,23 @@ components: type: string sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true subcategory: description: The subcategory of the incident for ServiceNow ITSM connectors. type: string urgency: description: The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors. type: string - examples: - - null + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' payload_create_case: @@ -4598,11 +3016,9 @@ components: type: object properties: fields: - description: | - An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. - type: - - object - - 'null' + description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. + nullable: true + type: object properties: caseId: description: The case identifier for Swimlane connectors. @@ -4612,9 +3028,8 @@ components: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -4628,14 +3043,12 @@ components: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string @@ -4650,27 +3063,23 @@ components: type: string sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors. - type: - - boolean - - 'null' + type: boolean + nullable: true subcategory: description: The subcategory of the incident for ServiceNow ITSM connectors. type: string urgency: description: The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors. type: string - examples: - - null + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none type: $ref: '#/components/schemas/connector_types' description: @@ -4687,15 +3096,14 @@ components: type: array items: type: string - examples: - - - tag-1 + example: + - tag-1 title: type: string payload_delete: - type: - - object - - 'null' + type: object description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable. + nullable: true payload_description: type: object properties: @@ -4728,8 +3136,8 @@ components: type: array items: type: string - examples: - - - tag-1 + example: + - tag-1 payload_title: type: object properties: @@ -4765,8 +3173,7 @@ components: - status - settings - severity - examples: - - create_case + example: create_case user_actions_response_properties: type: object required: @@ -4784,48 +3191,36 @@ components: $ref: '#/components/schemas/actions' action_id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 case_id: type: string - examples: - - 22df07d0-03b1-11ed-920c-974bfa104448 + example: 22df07d0-03b1-11ed-920c-974bfa104448 comment_id: - type: - - string - - 'null' - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: type: object properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name @@ -4865,49 +3260,38 @@ components: action: $ref: '#/components/schemas/actions' comment_id: - type: - - string - - 'null' - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: type: object properties: email: - type: - - string - - 'null' - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - string - - 'null' - examples: - - null - profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - string - - 'null' - examples: - - elastic + type: string + example: elastic + nullable: true + profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 required: - email - full_name - username id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 owner: $ref: '#/components/schemas/owners' payload: @@ -4927,8 +3311,7 @@ components: - $ref: '#/components/schemas/payload_user_comment' version: type: string - examples: - - WzM1ODg4LDFd + example: WzM1ODg4LDFd type: type: string description: The type of action. @@ -4944,8 +3327,7 @@ components: - status - settings - severity - examples: - - create_case + example: create_case examples: create_case_request: summary: Create a security case that uses a Jira connector. diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml index 24c728f017d12..8677b327b91be 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/alert_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the alert. required: true schema: type: string - examples: - - 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 \ No newline at end of file + example: 09f0c261e39e36351d75995b78bb83673774d1bc2cca9df2d15f0e5c0a99a540 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml index de7cfebbeb6bf..eebde85823746 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/case_id.yaml @@ -4,5 +4,4 @@ description: The identifier for the case. To retrieve case IDs, use the find cas required: true schema: type: string - examples: - - 9c235210-6834-11ea-a78c-6ffb38a34414 \ No newline at end of file + example: 9c235210-6834-11ea-a78c-6ffb38a34414 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml index 8d28898750ae2..4fd903b11f479 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/category.yaml @@ -4,9 +4,8 @@ description: Filters the returned cases by category. schema: oneOf: - type: string + example: my-category - type: array items: type: string - maxItems: 100 - examples: - - [ my-category ] \ No newline at end of file + maxItems: 100 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml index 852ad328c6c4e..a46f47569e8d2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/comment_id.yaml @@ -6,5 +6,4 @@ description: > required: true schema: type: string - examples: - - '71ec1870-725b-11ea-a0b2-c51ea50a58e2' \ No newline at end of file + example: '71ec1870-725b-11ea-a0b2-c51ea50a58e2' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml index 884821a79952f..65cce12afaa92 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/configuration_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the configuration. required: true schema: type: string - examples: - - 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 \ No newline at end of file + example: 3297a0f0-b5ec-11ec-b141-0fdb20a7f9a9 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml index 7fc146b22126c..71cdc7191cfa1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/connector_id.yaml @@ -4,5 +4,4 @@ description: An identifier for the connector. To retrieve connector IDs, use the required: true schema: type: string - examples: - - abed3a70-71bd-11ea-a0b2-c51ea50a58e2 \ No newline at end of file + example: abed3a70-71bd-11ea-a0b2-c51ea50a58e2 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml index cd3cf8cb1c005..8e9004c859b46 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/defaultSearchOperator.yaml @@ -4,5 +4,4 @@ description: he default operator to use for the simple_query_string. schema: type: string default: OR - examples: - - OR \ No newline at end of file +example: OR \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml index bf92b68ad6ba3..6f9a24dae5956 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/from.yaml @@ -5,5 +5,4 @@ description: > The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now-1d \ No newline at end of file + example: now-1d \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml index acd48cd0955a2..c84ec64ab2a53 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/ids.yaml @@ -10,5 +10,4 @@ schema: type: string minItems: 1 maxItems: 100 - examples: - - [ d4e7abb0-b462-11ec-9a8d-698504725a43 ] +example: d4e7abb0-b462-11ec-9a8d-698504725a43 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml index d4f40a4403723..3c5e511742bf2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/owner.yaml @@ -10,5 +10,4 @@ schema: - type: array items: $ref: '../schemas/owners.yaml' - examples: - - [ cases ] \ No newline at end of file +example: cases \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml index 8ac69a105d15b..9176d3b62094e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/page_index.yaml @@ -5,5 +5,3 @@ required: false schema: type: integer default: 1 - examples: - - 1 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml index 3d4d24cafd3ca..db28a6c48ae02 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/reporters.yaml @@ -8,5 +8,4 @@ schema: items: type: string maxItems: 100 - examples: - - [ elastic ] +example: elastic diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml index d5a49214e9d90..9df834cf9f5ac 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/sortField.yaml @@ -12,5 +12,4 @@ schema: - status - severity default: createdAt - examples: - - updatedAt \ No newline at end of file +example: updatedAt \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml index 45787e844caec..0a9fba457e3e7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/space_id.yaml @@ -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 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml index b90edcd58286b..0517e7516a87f 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/status.yaml @@ -7,5 +7,4 @@ schema: - closed - in-progress - open - examples: - - open \ No newline at end of file +example: open \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml index b1732fb124577..d899edbcc38eb 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/tags.yaml @@ -8,5 +8,4 @@ schema: items: type: string maxItems: 100 - examples: - - [ tag-1 ] +example: tag-1 diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml index dd326cabd8dca..c176ce8407803 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/to.yaml @@ -5,5 +5,4 @@ description: > The date must be specified as a KQL data range or date match expression. schema: type: string - examples: - - now+1d \ No newline at end of file +example: now+1d \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml b/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml index 320dc67b631ca..2b04b7c806620 100644 --- a/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/parameters/user_action_types.yaml @@ -21,5 +21,4 @@ schema: - tags - title - user - examples: - - [ create_case ] \ No newline at end of file +example: create_case \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml index 72d3bd82cbf60..75d0ac39903bf 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/4xx_response.yaml @@ -3,11 +3,9 @@ title: Unsuccessful cases API response properties: error: type: string - examples: - - Unauthorized + example: Unauthorized message: type: string statusCode: type: integer - examples: - - 401 \ No newline at end of file + example: 401 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml index 140b606b44565..3568008b07000 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/action_types.yaml @@ -13,5 +13,4 @@ enum: - status - settings - severity -examples: - - create_case \ No newline at end of file +example: create_case \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml index f2b20517efd54..1638ed67c78e2 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/actions.yaml @@ -5,5 +5,4 @@ enum: - delete - push_to_service - update -examples: - - create \ No newline at end of file +example: create \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml index 192e12f62857c..c99ebb19cc818 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/add_alert_comment_request_properties.yaml @@ -19,7 +19,6 @@ properties: type: description: The type of comment. type: string - examples: - - alert + example: alert enum: - alert \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml index a0740dbdc51bc..beac63c377ade 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/add_user_comment_request_properties.yaml @@ -6,15 +6,13 @@ properties: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. owner: $ref: 'owners.yaml' type: type: string description: The type of comment. - examples: - - user + example: user enum: - user required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml index 3305732cee6ec..443d9dcc55523 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_comment_response_properties.yaml @@ -7,13 +7,11 @@ properties: type: array items: type: string - examples: - - a6e12ac4-7bce-457b-84f6-d7ce8deb8446 + example: a6e12ac4-7bce-457b-84f6-d7ce8deb8446 created_at: type: string format: date-time - examples: - - 2023-11-06T19:29:38.424Z + example: 2023-11-06T19:29:38.424Z created_by: type: object required: @@ -24,52 +22,44 @@ properties: $ref: 'user_properties.yaml' id: type: string - examples: - - 73362370-ab1a-11ec-985f-97e55adae8b9 + example: 73362370-ab1a-11ec-985f-97e55adae8b9 index: type: array items: type: string - examples: - - .internal.alerts-security.alerts-default-000001 + example: .internal.alerts-security.alerts-default-000001 owner: $ref: 'owners.yaml' pushed_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + example: null + nullable: true pushed_by: - type: - - "object" - - "null" + type: object required: - email - full_name - username properties: $ref: 'user_properties.yaml' + nullable: true rule: type: object properties: $ref: 'rule_properties.yaml' type: type: string - examples: - - alert + example: alert enum: - alert updated_at: - type: - - "string" - - "null" + type: string format: date-time + nullable: true updated_by: - type: - - "object" - - "null" + type: object + nullable: true required: - email - full_name @@ -78,5 +68,4 @@ properties: $ref: 'user_properties.yaml' version: type: string - examples: - - WzMwNDgsMV0= \ No newline at end of file + example: WzMwNDgsMV0= \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml index 5a8f821931f57..cca8eb74f5019 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/alert_identifiers.yaml @@ -13,5 +13,4 @@ oneOf: type: string maxItems: 1000 x-technical-preview: true -examples: - - 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 \ No newline at end of file +example: 6b24c4dc44bc720cfc92797f3d61fff952f2b2627db1fb4f8cc49f4530c4ff42 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml index 4109c4d476909..5b4e18517bd43 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/assignees.yaml @@ -1,8 +1,7 @@ -type: - - "array" - - "null" +type: array description: An array containing users that are assigned to the case. maxItems: 10 +nullable: true items: type: object required: @@ -11,5 +10,4 @@ items: uid: type: string description: A unique identifier for the user profile. These identifiers can be found by using the suggest user profile API. - examples: - - u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 \ No newline at end of file + example: u_0wpfV1MqYDaXzLtRVY-gLMrddKDEmfz51Fszhj7hWC8_0 \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml index 3873a8ae9e0f6..ce1669c37941e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_connector_properties.yaml @@ -1,17 +1,14 @@ fields: description: The fields specified in the case configuration are not used and are not propagated to individual cases, therefore it is recommended to set it to `null`. - type: - - "object" - - "null" + nullable: true + type: object id: description: The identifier for the connector. If you do not want a default connector, use `none`. To retrieve connector IDs, use the find connectors API. type: string - examples: - - none + example: none name: description: The name of the connector. If you do not want a default connector, use `none`. To retrieve connector names, use the find connectors API. type: string - examples: - - none + example: none type: $ref: 'connector_types.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml index 1085e1f8ef974..07a94129b0180 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_configure_response_properties.yaml @@ -7,8 +7,7 @@ connector: created_at: type: string format: date-time - examples: - - 2022-06-01T17:07:17.767Z + example: 2022-06-01T17:07:17.767Z created_by: type: object required: @@ -25,15 +24,12 @@ customFields: properties: $ref: 'case_configure_customfields.yaml' error: - type: - - 'string' - - 'null' - examples: - - null + type: string + nullable: true + example: null id: type: string - examples: - - 4a97a440-e1cd-11ec-be9b-9b1838238ee6 + example: 4a97a440-e1cd-11ec-be9b-9b1838238ee6 mappings: type: array items: @@ -41,38 +37,31 @@ mappings: properties: action_type: type: string - examples: - - overwrite + example: overwrite source: type: string - examples: - - title + example: title target: type: string - examples: - - summary + example: summary owner: $ref: 'owners.yaml' templates: $ref: 'templates.yaml' updated_at: - type: - - 'string' - - 'null' + type: string format: date-time - examples: - - 2022-06-01T19:58:48.169Z + nullable: true + example: 2022-06-01T19:58:48.169Z updated_by: - type: - - 'object' - - 'null' + type: object required: - email - full_name - username properties: $ref: 'user_properties.yaml' + nullable: true version: type: string - examples: - - WzIwNzMsMV0= + example: WzIwNzMsMV0= diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml index 5a4c9f26e09b2..4170833e818cc 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_customfields.yaml @@ -18,9 +18,8 @@ value: However, for cases that existed when the required custom field was added, the default value stored in Elasticsearch is `undefined`. The value returned in the API and user interface in this case is `null`. oneOf: - - type: - - "string" - - "null" + - type: string minLength: 1 maxLength: 160 + nullable: true - type: boolean diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml index 26b3eaa7395eb..95bd14e4957a3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_closed_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for closed_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml index 18f79997e31ce..1ac30d325d45e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_connector_field_properties.yaml @@ -1,8 +1,7 @@ title: Case response properties for connector fields -type: - - "object" - - "null" +type: object description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. +nullable: true properties: caseId: description: The case identifier for Swimlane connectors. @@ -12,9 +11,8 @@ properties: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -28,14 +26,12 @@ properties: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml index a0ef24983502f..0c4560dc6362a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_properties.yaml @@ -26,15 +26,13 @@ properties: assignees: $ref: 'assignees.yaml' category: - type: - - 'string' - - 'null' + type: string description: The case category. + nullable: true closed_at: - type: - - 'string' - - 'null' + type: string format: date-time + nullable: true closed_by: $ref: 'case_response_closed_by_properties.yaml' comments: @@ -74,8 +72,7 @@ properties: created_at: type: string format: date-time - examples: - - '2022-05-13T09:16:17.416Z' + example: '2022-05-13T09:16:17.416Z' created_by: $ref: 'case_response_created_by_properties.yaml' customFields: @@ -87,25 +84,21 @@ properties: $ref: 'case_customfields.yaml' description: type: string - examples: - - A case description. + example: A case description. duration: - type: - - 'integer' - - 'null' + type: integer description: > The elapsed time from the creation of the case to its closure (in seconds). If the case has not been closed, the duration is set to null. If the case was closed after less than half a second, the duration is rounded down to zero. - examples: - - 120 + nullable: true + example: 120 external_service: $ref: 'external_service.yaml' id: type: string - examples: - - 66b9aa00-94fa-11ea-9f74-e7e108796192 + example: 66b9aa00-94fa-11ea-9f74-e7e108796192 owner: $ref: 'owners.yaml' settings: @@ -118,28 +111,23 @@ properties: type: array items: type: string - examples: - - [tag-1] + example: + - tag-1 title: type: string - examples: - - Case title 1 + example: Case title 1 totalAlerts: type: integer - examples: - - 0 + example: 0 totalComment: type: integer - examples: - - 0 + example: 0 updated_at: - type: - - 'string' - - 'null' + type: string format: date-time + nullable: true updated_by: $ref: 'case_response_updated_by_properties.yaml' version: type: string - examples: - - WzUzMiwxXQ== + example: WzUzMiwxXQ== diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml index 72f2c3ef619a2..c59a5565c98b9 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_pushed_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for pushed_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml index 8e475c5d205d6..cd1bae033f2ff 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/case_response_updated_by_properties.yaml @@ -1,7 +1,6 @@ title: Case response properties for updated_by -type: - - "object" - - "null" +type: object +nullable: true properties: $ref: 'user_properties.yaml' required: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml index 8484d4d051ca4..6879f820d6f5c 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/closure_types.yaml @@ -3,5 +3,4 @@ description: Indicates whether a case is automatically closed when it is pushed enum: - close-by-pushing - close-by-user -examples: - - close-by-user \ No newline at end of file +example: close-by-user \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml index 6a41e07aada44..9731b8ce4fad5 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/comment_types.yaml @@ -3,5 +3,4 @@ description: The type of comment. enum: - alert - user -examples: - - user \ No newline at end of file +example: user \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml index e68c226ee9b92..9416a31f38775 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties.yaml @@ -1,11 +1,7 @@ fields: - description: > - An object containing the connector fields. - To create a case without a connector, specify null. - If you want to omit any individual field, specify null as its value. - type: - - "object" - - "null" + description: An object containing the connector fields. To create a case without a connector, specify null. If you want to omit any individual field, specify null as its value. + nullable: true + type: object properties: caseId: description: The case identifier for Swimlane connectors. @@ -15,9 +11,8 @@ fields: type: string destIp: description: Indicates whether cases will send a comma-separated list of destination IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true impact: description: The effect an incident had on business for ServiceNow ITSM connectors. type: string @@ -31,14 +26,12 @@ fields: type: string malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task for Jira connectors. type: string @@ -53,26 +46,22 @@ fields: type: string sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs for ServiceNow SecOps connectors. - type: - - "boolean" - - "null" + type: boolean + nullable: true subcategory: description: The subcategory of the incident for ServiceNow ITSM connectors. type: string urgency: description: The extent to which the incident resolution can be delayed for ServiceNow ITSM connectors. type: string - examples: - - null + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. type: string - examples: - - none + example: none type: $ref: 'connector_types.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml index b204dcbdd9f4d..871b3180bc22e 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_cases_webhook.yaml @@ -8,11 +8,9 @@ description: Defines properties for connectors when type is `.cases-webhook`. type: object properties: fields: - type: - - "string" - - "null" - examples: - - null + type: string + nullable: true + example: null id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -22,7 +20,6 @@ properties: type: description: The type of connector. type: string - examples: - - .cases-webhook + example: .cases-webhook enum: - .cases-webhook \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml index 6eb1c0baa8e4e..a63f1fbd568d0 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_jira.yaml @@ -17,19 +17,16 @@ properties: properties: issueType: description: The type of issue. - type: - - "string" - - "null" + type: string + nullable: true parent: description: The key of the parent issue, when the issue type is sub-task. - type: - - "string" - - "null" + type: string + nullable: true priority: description: The priority of the issue. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -39,7 +36,6 @@ properties: type: description: The type of connector. type: string - examples: - - .jira + example: .jira enum: - .jira diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml index 2497b1357c86c..c1bc49372f645 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_none.yaml @@ -9,25 +9,20 @@ type: object properties: fields: description: An object containing the connector fields. To create a case without a connector, specify null. To update a case to remove the connector, specify null. - type: - - "string" - - "null" - examples: - - null + nullable: true + type: string + example: null id: description: The identifier for the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none name: description: The name of the connector. To create a case without a connector, use `none`. To update a case to remove the connector, specify `none`. type: string - examples: - - none + example: none type: description: The type of connector. To create a case without a connector, use `.none`. To update a case to remove the connector, specify `.none`. type: string - examples: - - .none + example: .none enum: - .none \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml index df8e34057de0e..bf7929b3060e3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_resilient.yaml @@ -9,9 +9,8 @@ type: object properties: fields: description: An object containing the connector fields. If you want to omit any individual field, specify null as its value. - type: - - "object" - - "null" + type: object + nullable: true required: - issueTypes - severityCode @@ -33,7 +32,6 @@ properties: type: description: The type of connector. type: string - examples: - - .resilient + example: .resilient enum: - .resilient \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml index 7a57a9e69ccc2..5bc76ab7a9dd1 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow.yaml @@ -19,29 +19,24 @@ properties: properties: category: description: The category of the incident. - type: - - "string" - - "null" + type: string + nullable: true impact: description: The effect an incident had on business. - type: - - "string" - - "null" + type: string + nullable: true severity: description: The severity of the incident. - type: - - "string" - - "null" + type: string + nullable: true subcategory: description: The subcategory of the incident. - type: - - "string" - - "null" + type: string + nullable: true urgency: description: The extent to which the incident resolution can be delayed. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -51,7 +46,6 @@ properties: type: description: The type of connector. type: string - examples: - - .servicenow + example: .servicenow enum: - .servicenow \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml index cafff746d18f5..42245f9771e39 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_servicenow_sir.yaml @@ -21,39 +21,32 @@ properties: properties: category: description: The category of the incident. - type: - - "string" - - "null" + type: string + nullable: true destIp: description: Indicates whether cases will send a comma-separated list of destination IPs. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareHash: description: Indicates whether cases will send a comma-separated list of malware hashes. - type: - - "boolean" - - "null" + type: boolean + nullable: true malwareUrl: description: Indicates whether cases will send a comma-separated list of malware URLs. - type: - - "boolean" - - "null" + type: boolean + nullable: true priority: description: The priority of the issue. - type: - - "string" - - "null" + type: string + nullable: true sourceIp: description: Indicates whether cases will send a comma-separated list of source IPs. - type: - - "boolean" - - "null" + type: boolean + nullable: true subcategory: description: The subcategory of the incident. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -63,7 +56,6 @@ properties: type: description: The type of connector. type: string - examples: - - .servicenow-sir + example: .servicenow-sir enum: - .servicenow-sir \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml index 9cde6dd09d7c8..f4c138463078b 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_properties_swimlane.yaml @@ -15,9 +15,8 @@ properties: properties: caseId: description: The case identifier for Swimlane connectors. - type: - - "string" - - "null" + type: string + nullable: true id: description: The identifier for the connector. To retrieve connector IDs, use the find connectors API. type: string @@ -27,7 +26,6 @@ properties: type: description: The type of connector. type: string - examples: - - .swimlane + example: .swimlane enum: - .swimlane \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml index 4bc12b3ae9481..fc23b9cab5f8a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/connector_types.yaml @@ -8,5 +8,4 @@ enum: - .servicenow - .servicenow-sir - .swimlane -examples: - - .none \ No newline at end of file +example: .none \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml index 411f977928a8c..b3b3182b8c964 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/external_service.yaml @@ -1,6 +1,5 @@ -type: - - "object" - - "null" +type: object +nullable: true properties: connector_id: type: string @@ -16,8 +15,7 @@ properties: type: string format: date-time pushed_by: - type: - - "object" - - "null" + type: object properties: - $ref: 'user_properties.yaml' \ No newline at end of file + $ref: 'user_properties.yaml' + nullable: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml index fa265756d9506..9036fd5a3833a 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/owners.yaml @@ -6,5 +6,4 @@ enum: - cases - observability - securitySolution -examples: - - cases \ No newline at end of file +example: cases \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml index eaaaa539a33ca..0b0d3fc3c07ce 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_alert_comment.yaml @@ -6,16 +6,14 @@ properties: alertId: oneOf: - type: string - examples: - - 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d + example: 1c0b056b-cc9f-4b61-b5c9-cb801abd5e1d - type: array items: type: string index: oneOf: - type: string - examples: - - .alerts-observability.logs.alerts-default + example: .alerts-observability.logs.alerts-default - type: array items: type: string diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml index a5483b6412871..728614cd36692 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_create_case.yaml @@ -20,7 +20,6 @@ properties: type: array items: type: string - examples: - - ["tag-1"] + example: ["tag-1"] title: type: string \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml index 29e16039ec273..933d91305dca7 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_delete.yaml @@ -1,4 +1,3 @@ -type: - - "object" - - "null" -description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable. \ No newline at end of file +type: object +description: If the `action` is `delete` and the `type` is `delete_case`, the payload is nullable. +nullable: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml index 8ea6902802514..bed767719e6f3 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/payload_tags.yaml @@ -4,5 +4,4 @@ properties: type: array items: type: string - examples: - - ["tag-1"] \ No newline at end of file + example: ["tag-1"] \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml index 0a4dfb828dcb5..09712b57ce138 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/rule.yaml @@ -10,10 +10,8 @@ properties: id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule \ No newline at end of file + example: security_rule \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml index 2ed5e0e89e8d7..64b93b77429a4 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/rule_properties.yaml @@ -1,10 +1,8 @@ id: description: The rule identifier. type: string - examples: - - 94d80550-aaf4-11ec-985f-97e55adae8b9 + example: 94d80550-aaf4-11ec-985f-97e55adae8b9 name: description: The rule name. type: string - examples: - - security_rule \ No newline at end of file + example: security_rule \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml index 576b8b9dff157..a344eb0491951 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/settings.yaml @@ -6,5 +6,4 @@ properties: syncAlerts: description: Turns alert syncing on or off. type: boolean - examples: - - true \ No newline at end of file + example: true \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml index 5c5619cec298a..2c7bd5dcc1215 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_alert_comment_request_properties.yaml @@ -17,8 +17,7 @@ properties: description: > The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 index: $ref: 'alert_indices.yaml' owner: @@ -30,12 +29,10 @@ properties: type: string enum: - alert - examples: - - alert + example: alert version: description: > The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd \ No newline at end of file + example: Wzk1LDFd \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml index e359eea8e1030..aa6329b7370de 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_case_configuration_request.yaml @@ -36,5 +36,4 @@ properties: The version of the connector. To retrieve the version value, use the get configuration API. type: string - examples: - - WzIwMiwxXQ== + example: WzIwMiwxXQ== diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml index 003f12d63a30d..a83050e93eaaf 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/update_user_comment_request_properties.yaml @@ -6,15 +6,13 @@ properties: description: The new comment. It is required only when `type` is `user`. type: string maxLength: 30000 - examples: - - A new comment. + example: A new comment. id: type: string description: > The identifier for the comment. To retrieve comment IDs, use the get comments API. - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: 'owners.yaml' type: @@ -22,15 +20,13 @@ properties: description: The type of comment. enum: - user - examples: - - user + example: user version: description: > The current comment version. To retrieve version values, use the get comments API. type: string - examples: - - Wzk1LDFd + example: Wzk1LDFd required: - comment - id diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml index 12b45d987598b..a17f98d8007ad 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_find_response_properties.yaml @@ -13,16 +13,13 @@ properties: action: $ref: 'actions.yaml' comment_id: - type: - - "string" - - "null" - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: type: object properties: @@ -33,8 +30,7 @@ properties: - username id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 owner: $ref: 'owners.yaml' payload: @@ -54,8 +50,7 @@ properties: - $ref: 'payload_user_comment.yaml' version: type: string - examples: - - WzM1ODg4LDFd + example: WzM1ODg4LDFd type: type: string description: The type of action. @@ -71,5 +66,4 @@ properties: - status - settings - severity - examples: - - create_case + example: create_case diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml index 02521d975d8de..ef39c531c357d 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_actions_response_properties.yaml @@ -14,23 +14,18 @@ properties: $ref: 'actions.yaml' action_id: type: string - examples: - - 22fd3e30-03b1-11ed-920c-974bfa104448 + example: 22fd3e30-03b1-11ed-920c-974bfa104448 case_id: type: string - examples: - - 22df07d0-03b1-11ed-920c-974bfa104448 + example: 22df07d0-03b1-11ed-920c-974bfa104448 comment_id: - type: - - "string" - - "null" - examples: - - 578608d0-03b1-11ed-920c-974bfa104448 + type: string + nullable: true + example: 578608d0-03b1-11ed-920c-974bfa104448 created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: type: object properties: diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml index 832d603e366dc..b1727d3279abe 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_comment_response_properties.yaml @@ -5,46 +5,37 @@ required: properties: comment: type: string - examples: - - A new comment. + example: A new comment. created_at: type: string format: date-time - examples: - - 2022-05-13T09:16:17.416Z + example: 2022-05-13T09:16:17.416Z created_by: $ref: 'case_response_created_by_properties.yaml' id: type: string - examples: - - 8af6ac20-74f6-11ea-b83a-553aecdb28b6 + example: 8af6ac20-74f6-11ea-b83a-553aecdb28b6 owner: $ref: 'owners.yaml' pushed_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + nullable: true + example: null pushed_by: $ref: 'case_response_pushed_by_properties.yaml' type: type: string - examples: - - user + example: user enum: - user updated_at: - type: - - "string" - - "null" + type: string format: date-time - examples: - - null + nullable: true + example: null updated_by: $ref: 'case_response_updated_by_properties.yaml' version: type: string - examples: - - WzIwNDMxLDFd \ No newline at end of file + example: WzIwNDMxLDFd \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml b/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml index 3c5439ac7aeee..19b76a6000c02 100644 --- a/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml +++ b/x-pack/plugins/cases/docs/openapi/components/schemas/user_properties.yaml @@ -1,22 +1,15 @@ email: - type: - - "string" - - "null" - examples: - - null + type: string + example: null + nullable: true full_name: - type: - - "string" - - "null" - examples: - - null -profile_uid: type: string - examples: - - u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 + example: null + nullable: true username: - type: - - "string" - - "null" - examples: - - elastic + type: string + example: elastic + nullable: true +profile_uid: + type: string + example: u_J41Oh6L9ki-Vo2tOogS8WRTENzhHurGtRc87NgEAlkc_0 diff --git a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml index dff3dff43622c..764de3e6570fb 100644 --- a/x-pack/plugins/cases/docs/openapi/entrypoint.yaml +++ b/x-pack/plugins/cases/docs/openapi/entrypoint.yaml @@ -1,8 +1,8 @@ -openapi: 3.1.0 +openapi: 3.0.1 info: title: Cases description: OpenAPI schema for Cases endpoints - version: '0.2' + version: '0.1' contact: name: Cases Team license: @@ -37,6 +37,8 @@ paths: $ref: 'paths/api@cases@{caseid}@alerts.yaml' '/api/cases/{caseId}/comments': $ref: 'paths/api@cases@{caseid}@comments.yaml' + '/api/cases/{caseId}/comments/_find': + $ref: 'paths/api@cases@{caseid}@comments@_find.yaml' '/api/cases/{caseId}/comments/{commentId}': $ref: 'paths/api@cases@{caseid}@comments@{commentid}.yaml' '/api/cases/{caseId}/connector/{connectorId}/_push': @@ -48,50 +50,50 @@ paths: '/api/cases/configure/connectors/_find': $ref: paths/api@cases@configure@connectors@_find.yaml # Paths with space identifiers - '/s/{spaceId}/api/cases': - $ref: 'paths/s@{spaceid}@api@cases.yaml' - '/s/{spaceId}/api/cases/_find': - $ref: 'paths/s@{spaceid}@api@cases@_find.yaml' - '/s/{spaceId}/api/cases/alerts/{alertId}': - $ref: 'paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml' - '/s/{spaceId}/api/cases/configure': - $ref: paths/s@{spaceid}@api@cases@configure.yaml - '/s/{spaceId}/api/cases/configure/{configurationId}': - $ref: paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml - '/s/{spaceId}/api/cases/configure/connectors/_find': - $ref: paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml - '/s/{spaceId}/api/cases/reporters': - $ref: 'paths/s@{spaceid}@api@cases@reporters.yaml' - '/s/{spaceId}/api/cases/status': - $ref: 'paths/s@{spaceid}@api@cases@status.yaml' - '/s/{spaceId}/api/cases/tags': - $ref: 'paths/s@{spaceid}@api@cases@tags.yaml' - '/s/{spaceId}/api/cases/{caseId}': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}.yaml' - '/s/{spaceId}/api/cases/{caseId}/alerts': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml' - '/s/{spaceId}/api/cases/{caseId}/comments': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments.yaml' - '/s/{spaceId}/api/cases/{caseId}/comments/_find': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml' - '/s/{spaceId}/api/cases/{caseId}/comments/{commentId}': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml' - '/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml' - '/s/{spaceId}/api/cases/{caseId}/user_actions': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml' - '/s/{spaceId}/api/cases/{caseId}/user_actions/_find': - $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml' -components: - securitySchemes: - basicAuth: - type: http - scheme: basic - apiKeyAuth: - type: apiKey - in: header - name: Authorization - description: 'e.g. Authorization: ApiKey base64AccessApiKey' -security: - - basicAuth: [] - - apiKeyAuth: [] + # '/s/{spaceId}/api/cases': + # $ref: 'paths/s@{spaceid}@api@cases.yaml' + # '/s/{spaceId}/api/cases/_find': + # $ref: 'paths/s@{spaceid}@api@cases@_find.yaml' + # '/s/{spaceId}/api/cases/alerts/{alertId}': + # $ref: 'paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml' + # '/s/{spaceId}/api/cases/configure': + # $ref: paths/s@{spaceid}@api@cases@configure.yaml + # '/s/{spaceId}/api/cases/configure/{configurationId}': + # $ref: paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml + # '/s/{spaceId}/api/cases/configure/connectors/_find': + # $ref: paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml + # '/s/{spaceId}/api/cases/reporters': + # $ref: 'paths/s@{spaceid}@api@cases@reporters.yaml' + # '/s/{spaceId}/api/cases/status': + # $ref: 'paths/s@{spaceid}@api@cases@status.yaml' + # '/s/{spaceId}/api/cases/tags': + # $ref: 'paths/s@{spaceid}@api@cases@tags.yaml' + # '/s/{spaceId}/api/cases/{caseId}': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}.yaml' + # '/s/{spaceId}/api/cases/{caseId}/alerts': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml' + # '/s/{spaceId}/api/cases/{caseId}/comments': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments.yaml' + # '/s/{spaceId}/api/cases/{caseId}/comments/_find': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml' + # '/s/{spaceId}/api/cases/{caseId}/comments/{commentId}': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml' + # '/s/{spaceId}/api/cases/{caseId}/connector/{connectorId}/_push': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml' + # '/s/{spaceId}/api/cases/{caseId}/user_actions': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml' + # '/s/{spaceId}/api/cases/{caseId}/user_actions/_find': + # $ref: 'paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml' +# components: +# securitySchemes: +# basicAuth: +# type: http +# scheme: basic +# apiKeyAuth: +# type: apiKey +# in: header +# name: Authorization +# description: 'e.g. Authorization: ApiKey base64AccessApiKey' +# security: +# - basicAuth: [] +# - apiKeyAuth: [] diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml index f92df59625dc2..d4b5cf73208f4 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases.yaml @@ -1,5 +1,5 @@ post: - summary: Creates a case in the default space. + summary: Create a case operationId: createCaseDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the @@ -36,7 +36,7 @@ post: $ref: '../components/schemas/4xx_response.yaml' delete: - summary: Deletes one or more cases in the default space. + summary: Delete cases operationId: deleteCaseDefaultSpace description: > You must have `read` or `all` privileges and the `delete` sub-feature @@ -59,7 +59,7 @@ delete: $ref: '../components/schemas/4xx_response.yaml' patch: - summary: Updates one or more cases in the default space. + summary: Update cases operationId: updateCaseDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml index aa926636802a2..bfceadc7a7c55 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@_find.yaml @@ -1,5 +1,5 @@ get: - summary: Retrieves a paginated subset of cases in the default space. + summary: Search cases operationId: findCasesDefaultSpace description: > You must have `read` privileges for the **Cases** feature in the diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml index 7914c8a994c60..0531c2675bce2 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@alerts@{alertid}.yaml @@ -1,5 +1,5 @@ get: - summary: Returns the cases associated with a specific alert in the default space. + summary: Get cases for an alert operationId: getCasesByAlertDefaultSpace description: > You must have `read` privileges for the **Cases** feature in the @@ -28,7 +28,7 @@ get: title: type: string description: The case title. - examples: + example: - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 title: security_case '401': diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml index 5618eb08a4b72..b4c0d9b7ddf79 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure.yaml @@ -1,8 +1,8 @@ get: - summary: Get case settings in the default space + summary: Get case settings operationId: getCaseConfigurationDefaultSpace description: > - Retrieves setting details such as the closure type, custom fields, templatse, and the default connector for cases in the default space. + Get setting details such as the closure type, custom fields, templatse, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. @@ -32,7 +32,7 @@ get: $ref: '../components/schemas/4xx_response.yaml' post: - summary: Add case settings in the default space + summary: Add case settings operationId: setCaseConfigurationDefaultSpace description: > Case settings include external connection details, custom fields, and templates. diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml index 5ce6113cf699d..9d0bea7ef029b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@connectors@_find.yaml @@ -1,8 +1,8 @@ get: - summary: Get case connectors in the default space + summary: Get case connectors operationId: findCaseConnectorsDefaultSpace description: > - Retrieves information about connectors that are supported for use in cases in the default space. + Get information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. tags: - cases diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml index 90f75c8d45e45..262730590b9d1 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@configure@{configurationid}.yaml @@ -1,8 +1,8 @@ patch: - summary: Update case settings in the default space + summary: Update case settings operationId: updateCaseConfigurationDefaultSpace description: > - Updates setting details such as the closure type, custom fields, templates, and the default connector for cases in the default space. + Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml index 15fca2baef247..61a791073cd80 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@reporters.yaml @@ -1,7 +1,8 @@ get: - summary: Returns information about the users who opened cases in the default space. + summary: Get case creators operationId: getCaseReportersDefaultSpace description: > + Returns information about the users who opened cases. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases. The API returns information about the users as they existed at the time of the case creation, including their name, full name, and email address. If any of those details change thereafter or if a user is deleted, the information returned by this API is unchanged. diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml index cd0792b7b3174..13600ae78d9d1 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@status.yaml @@ -1,11 +1,10 @@ get: - summary: Returns the number of cases that are open, closed, and in progress in the default space. + summary: Get case status summary operationId: getCaseStatusDefaultSpace description: > + Returns the number of cases that are open, closed, and in progress. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. + You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. deprecated: true tags: - cases diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml index 5f0083d087b5c..0117a1461280b 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@tags.yaml @@ -1,7 +1,8 @@ get: - summary: Aggregates and returns a list of case tags in the default space. + summary: Get case tags operationId: getCaseTagsDefaultSpace description: > + Aggregates and returns a list of case tags. You must have read privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. tags: - cases diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml index c5b52a52b741f..9f195e9d67f94 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}.yaml @@ -1,5 +1,5 @@ get: - summary: Retrieves information about a case in the default space. + summary: Get case information operationId: getCaseDefaultSpace description: > You must have `read` privileges for the **Cases** feature in the diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml index 525fb25f4b6d5..cbf4803df681a 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@alerts.yaml @@ -1,5 +1,5 @@ get: - summary: Gets all alerts attached to a case in the default space. + summary: Get all alerts for a case description: > You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml index fa25d6263143d..be5fc2aa49d95 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments.yaml @@ -1,5 +1,5 @@ post: - summary: Adds a comment or alert to a case in the default space. + summary: Add a case comment or alert operationId: addCaseCommentDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the @@ -38,9 +38,10 @@ post: $ref: '../components/schemas/4xx_response.yaml' delete: - summary: Deletes all comments and alerts from a case in the default space. + summary: Delete all case comments and alerts operationId: deleteCaseCommentsDefaultSpace description: > + Deletes all comments and alerts from a case. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. @@ -60,7 +61,7 @@ delete: $ref: '../components/schemas/4xx_response.yaml' patch: - summary: Updates a comment or alert in a case in the default space. + summary: Update a case comment or alert operationId: updateCaseCommentDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the @@ -99,7 +100,7 @@ patch: $ref: '../components/schemas/4xx_response.yaml' get: - summary: Retrieves all the comments from a case in the default space. + summary: Get all case comments operationId: getAllCaseCommentsDefaultSpace description: > Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@_find.yaml similarity index 69% rename from x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml rename to x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@_find.yaml index b027660aaf1ea..c1d874f95f8b4 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@_find.yaml @@ -1,10 +1,9 @@ get: - summary: Retrieves all the user comments from a case. - operationId: findCaseComments + summary: Find case comments and alerts + operationId: findCaseCommentsDefaultSpace description: > - You must have `read` privileges for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the cases with the comments you're seeking. + Retrieves a paginated list of comments for a case. + You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. tags: - cases parameters: @@ -12,7 +11,6 @@ get: - $ref: '../components/parameters/page_index.yaml' - $ref: '../components/parameters/page_size.yaml' - $ref: '../components/parameters/sort_order.yaml' - - $ref: '../components/parameters/space_id.yaml' responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml index 354b008201406..0e6071826d703 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@comments@{commentid}.yaml @@ -1,5 +1,5 @@ delete: - summary: Deletes a comment or alert from a case in the default space. + summary: Delete a case comment or alert operationId: deleteCaseCommentDefaultSpace description: > You must have `all` privileges for the **Cases** feature in the @@ -22,7 +22,7 @@ delete: $ref: '../components/schemas/4xx_response.yaml' get: - summary: Retrieves a comment from a case in the default space. + summary: Get a case comment or alert operationId: getCaseCommentDefaultSpace description: > You must have `read` privileges for the **Cases** feature in the **Management**, diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml index 8b52cf5d013cd..f5cff3b88bbd0 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@connector@{connectorid}@_push.yaml @@ -1,5 +1,5 @@ post: - summary: Pushes a case in the default space to an external service. + summary: Push a case to an external service description: > You must have `all` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. You must also have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're pushing. @@ -14,9 +14,8 @@ post: content: application/json: schema: - type: - - "object" - - "null" + type: object + nullable: true responses: '200': description: Indicates a successful call. diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml index 83657ecc123b3..049f1ee895c2c 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions.yaml @@ -1,6 +1,7 @@ get: - summary: Returns all user activity for a case in the default space. + summary: Get case activity description: > + Returns all user activity for a case. Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana diff --git a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml index 99caec414b132..470bb26ac51ab 100644 --- a/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml +++ b/x-pack/plugins/cases/docs/openapi/paths/api@cases@{caseid}@user_actions@_find.yaml @@ -1,6 +1,7 @@ get: - summary: Finds user activity for a case in the default space. + summary: Find case activity description: > + Retrives a paginated list of user activity for a case. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml deleted file mode 100644 index 1703dc5eecdc5..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases.yaml +++ /dev/null @@ -1,100 +0,0 @@ -post: - summary: Creates a case. - operationId: createCase - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're creating. - tags: - - cases - parameters: - - $ref: ../components/headers/kbn_xsrf.yaml - - $ref: '../components/parameters/space_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - $ref: '../components/schemas/create_case_request.yaml' - examples: - createCaseRequest: - $ref: '../components/examples/create_case_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - createCaseResponse: - $ref: '../components/examples/create_case_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -delete: - summary: Deletes one or more cases. - operationId: deleteCase - description: > - You must have `read` or `all` privileges and the `delete` sub-feature - privilege for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: ../components/headers/kbn_xsrf.yaml - - $ref: '../components/parameters/ids.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -patch: - summary: Updates one or more cases. - operationId: updateCase - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're updating. - tags: - - cases - parameters: - - $ref: ../components/headers/kbn_xsrf.yaml - - $ref: '../components/parameters/space_id.yaml' - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/update_case_request.yaml' - examples: - updateCaseRequest: - $ref: '../components/examples/update_case_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - updateCaseResponse: - $ref: '../components/examples/update_case_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml deleted file mode 100644 index a688b10389ecd..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@_find.yaml +++ /dev/null @@ -1,60 +0,0 @@ -get: - summary: Retrieves a paginated subset of cases. - operationId: findCases - description: > - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/assignees.yaml' - - $ref: '../components/parameters/category.yaml' - - $ref: '../components/parameters/defaultSearchOperator.yaml' - - $ref: '../components/parameters/from.yaml' - - $ref: '../components/parameters/owner.yaml' - - $ref: '../components/parameters/page_index.yaml' - - $ref: '../components/parameters/page_size.yaml' - - $ref: '../components/parameters/reporters.yaml' - - $ref: '../components/parameters/search.yaml' - - $ref: '../components/parameters/searchFields.yaml' - - $ref: '../components/parameters/severity.yaml' - - $ref: '../components/parameters/sortField.yaml' - - $ref: '../components/parameters/sort_order.yaml' - - $ref: '../components/parameters/status.yaml' - - $ref: '../components/parameters/tags.yaml' - - $ref: '../components/parameters/to.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - cases: - type: array - items: - $ref: '../components/schemas/case_response_properties.yaml' - count_closed_cases: - type: integer - count_in_progress_cases: - type: integer - count_open_cases: - type: integer - page: - type: integer - per_page: - type: integer - total: - type: integer - examples: - findCaseResponse: - $ref: '../components/examples/find_case_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml deleted file mode 100644 index 0ffe229fd9e69..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@alerts@{alertid}.yaml +++ /dev/null @@ -1,39 +0,0 @@ -get: - summary: Returns the cases associated with a specific alert. - operationId: getCasesByAlert - description: > - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. - x-technical-preview: true - tags: - - cases - parameters: - - $ref: ../components/parameters/alert_id.yaml - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/owner.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - id: - type: string - description: The case identifier. - title: - type: string - description: The case title. - examples: - - id: 06116b80-e1c3-11ec-be9b-9b1838238ee6 - title: security_case - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml deleted file mode 100644 index 7e616ed1c4f14..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure.yaml +++ /dev/null @@ -1,75 +0,0 @@ -get: - summary: Get case settings - operationId: getCaseConfiguration - description: > - Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on where the cases were created. - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/owner.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - $ref: '../components/schemas/case_configure_response_properties.yaml' - examples: - getConfigurationResponse: - $ref: '../components/examples/get_case_configuration_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -post: - summary: Add case settings - operationId: setCaseConfiguration - description: > - Case settings include external connection details, custom fields, and templates. - Connectors are used to interface with external systems. - You must create a connector before you can use it in your cases. - If you set a default connector, it is automatically selected when you create cases in Kibana. - If you use the create case API, however, you must still specify all of the connector details. - You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. - tags: - - cases - parameters: - - $ref: ../components/headers/kbn_xsrf.yaml - - $ref: '../components/parameters/space_id.yaml' - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/set_case_configuration_request.yaml' - examples: - setCaseConfigRequest: - $ref: '../components/examples/set_case_configuration_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - $ref: '../components/schemas/case_configure_response_properties.yaml' - examples: - setCaseConfigResponse: - $ref: '../components/examples/set_case_configuration_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml deleted file mode 100644 index b496bb141f2ee..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@connectors@_find.yaml +++ /dev/null @@ -1,30 +0,0 @@ -get: - summary: Get case connectors - operationId: findCaseConnectors - description: > - Retrieves information about connectors that are supported for use in cases. - You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - properties: - $ref: '../components/schemas/connector_response_properties.yaml' - examples: - findConnectorResponse: - $ref: '../components/examples/find_connector_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml deleted file mode 100644 index 5d31a7e027cb2..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@configure@{configurationid}.yaml +++ /dev/null @@ -1,42 +0,0 @@ -patch: - summary: Update case settings - operationId: updateCaseConfiguration - description: > - Updates setting details such as the closure type, custom fields, templates, and the default connector for cases. - Connectors are used to interface with external systems. - You must create a connector before you can use it in your cases. - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on where the case was created. - tags: - - cases - parameters: - - $ref: ../components/headers/kbn_xsrf.yaml - - $ref: ../components/parameters/configuration_id.yaml - - $ref: '../components/parameters/space_id.yaml' - requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/update_case_configuration_request.yaml' - examples: - updateCaseConfigurationRequest: - $ref: '../components/examples/update_case_configuration_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - $ref: '../components/schemas/case_configure_response_properties.yaml' - examples: - updateCaseConfigurationResponse: - $ref: '../components/examples/update_case_configuration_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml deleted file mode 100644 index b2a3bd11d5c9c..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@reporters.yaml +++ /dev/null @@ -1,40 +0,0 @@ -get: - summary: Returns information about the users who opened cases. - operationId: getCaseReporters - description: > - You must have read privileges for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the cases. - The API returns information about the users as they existed at the time of - the case creation, including their name, full name, and email address. If - any of those details change thereafter or if a user is deleted, the - information returned by this API is unchanged. - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/owner.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: object - required: - - email - - full_name - - username - properties: - $ref: '../components/schemas/user_properties.yaml' - examples: - getReportersResponse: - $ref: '../components/examples/get_reporters_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml deleted file mode 100644 index d4a6292e6e0fb..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@status.yaml +++ /dev/null @@ -1,35 +0,0 @@ -get: - summary: Returns the number of cases that are open, closed, and in progress. - operationId: getCaseStatus - description: > - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find cases API instead. - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. - deprecated: true - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/owner.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - count_closed_cases: - type: integer - count_in_progress_cases: - type: integer - count_open_cases: - type: integer - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml deleted file mode 100644 index 88025633b12d1..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@tags.yaml +++ /dev/null @@ -1,30 +0,0 @@ -get: - summary: Aggregates and returns a list of case tags. - operationId: getCaseTags - description: > - You must have read privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. - tags: - - cases - parameters: - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/owner.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - type: string - examples: - getTagsResponse: - $ref: '../components/examples/get_tags_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml deleted file mode 100644 index aecd3f6394bb7..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}.yaml +++ /dev/null @@ -1,31 +0,0 @@ -get: - summary: Retrieves information about a case. - operationId: getCase - description: > - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're seeking. - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/includeComments.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - getCaseResponse: - $ref: '../components/examples/get_case_response.yaml' - getObservabilityCaseReponse: - $ref: '../components/examples/get_case_observability_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml deleted file mode 100644 index 7784c49bf9ca0..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@alerts.yaml +++ /dev/null @@ -1,31 +0,0 @@ -get: - summary: Gets all alerts attached to a case. - description: > - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're seeking. - x-technical-preview: true - operationId: getCaseAlerts - tags: - - cases - parameters: - - $ref: ../components/parameters/case_id.yaml - - $ref: '../components/parameters/space_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '../components/schemas/alert_response_properties.yaml' - examples: - getCaseAlertsResponse: - $ref: '../components/examples/get_case_alerts_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml deleted file mode 100644 index 0551151b613f1..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments.yaml +++ /dev/null @@ -1,131 +0,0 @@ -post: - summary: Adds a comment or alert to a case. - operationId: addCaseComment - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're creating. - NOTE: Each case can have a maximum of 1,000 alerts. - tags: - - cases - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - $ref: '../components/schemas/add_case_comment_request.yaml' - examples: - createCaseCommentRequest: - $ref: '../components/examples/add_comment_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - createCaseCommentResponse: - $ref: '../components/examples/add_comment_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -delete: - summary: Deletes all comments and alerts from a case. - operationId: deleteCaseComments - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -patch: - summary: Updates a comment or alert in a case. - operationId: updateCaseComment - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're updating. - NOTE: You cannot change the comment type or the owner of a comment. - tags: - - cases - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - requestBody: - required: true - content: - application/json: - schema: - $ref: '../components/schemas/update_case_comment_request.yaml' - examples: - updateCaseCommentRequest: - $ref: '../components/examples/update_comment_request.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - updateCaseCommentResponse: - $ref: '../components/examples/update_comment_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -get: - summary: Retrieves all the comments from a case. - operationId: getAllCaseComments - description: > - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; - instead, use the get case comment API, which requires a comment identifier in the path. - You must have `read` privileges for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the cases with the comments you're seeking. - deprecated: true - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml deleted file mode 100644 index 2db1929ae4373..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@comments@{commentid}.yaml +++ /dev/null @@ -1,55 +0,0 @@ -delete: - summary: Deletes a comment or alert from a case. - operationId: deleteCaseComment - description: > - You must have `all` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the cases you're deleting. - tags: - - cases - parameters: - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/comment_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '204': - description: Indicates a successful call. - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' - -get: - summary: Retrieves a comment from a case. - operationId: getCaseComment - description: > - You must have `read` privileges for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the cases with the comments you're seeking. - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/comment_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - oneOf: - - $ref: '../components/schemas/alert_comment_response_properties.yaml' - - $ref: '../components/schemas/user_comment_response_properties.yaml' - examples: - getCaseCommentResponse: - $ref: '../components/examples/get_comment_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml deleted file mode 100644 index c06972c8dd0e8..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@connector@{connectorid}@_push.yaml +++ /dev/null @@ -1,39 +0,0 @@ -post: - summary: Pushes a case to an external service. - description: > - You must have `all` privileges for the **Actions and Connectors** feature in - the **Management** section of the Kibana feature privileges. You must also - have `all` privileges for the **Cases** feature in the **Management**, - **Observability**, or **Security** section of the Kibana feature privileges, - depending on the owner of the case you're pushing. - operationId: pushCase - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/connector_id.yaml' - - $ref: '../components/headers/kbn_xsrf.yaml' - - $ref: '../components/parameters/space_id.yaml' - requestBody: - content: - application/json: - schema: - type: - - "object" - - "null" - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - $ref: '../components/schemas/case_response_properties.yaml' - examples: - pushCaseResponse: - $ref: '../components/examples/push_case_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml deleted file mode 100644 index 0cb3770be5b13..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions.yaml +++ /dev/null @@ -1,29 +0,0 @@ -get: - summary: Returns all user activity for a case. - description: > - Deprecated in 8.1.0. This API is deprecated and will be removed in a future release; use the find user actions API instead. - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're seeking. - deprecated: true - operationId: getCaseActivity - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: array - items: - $ref: '../components/schemas/user_actions_response_properties.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' \ No newline at end of file diff --git a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml b/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml deleted file mode 100644 index 9fda51fa59792..0000000000000 --- a/x-pack/plugins/cases/docs/openapi/paths/s@{spaceid}@api@cases@{caseid}@user_actions@_find.yaml +++ /dev/null @@ -1,43 +0,0 @@ -get: - summary: Finds user activity for a case. - description: > - You must have `read` privileges for the **Cases** feature in the - **Management**, **Observability**, or **Security** section of the Kibana - feature privileges, depending on the owner of the case you're seeking. - operationId: findCaseActivity - tags: - - cases - parameters: - - $ref: '../components/parameters/case_id.yaml' - - $ref: '../components/parameters/space_id.yaml' - - $ref: '../components/parameters/page_index.yaml' - - $ref: '../components/parameters/page_size.yaml' - - $ref: '../components/parameters/sort_order.yaml' - - $ref: '../components/parameters/user_action_types.yaml' - responses: - '200': - description: Indicates a successful call. - content: - application/json: - schema: - type: object - properties: - page: - type: integer - perPage: - type: integer - total: - type: integer - userActions: - type: array - items: - $ref: '../components/schemas/user_actions_find_response_properties.yaml' - examples: - findCaseActivityResponse: - $ref: '../components/examples/find_case_activity_response.yaml' - '401': - description: Authorization information is missing or invalid. - content: - application/json: - schema: - $ref: '../components/schemas/4xx_response.yaml' diff --git a/x-pack/plugins/cases/public/components/all_cases/columns_popover.test.tsx b/x-pack/plugins/cases/public/components/all_cases/columns_popover.test.tsx index 27f94319ecbcf..4d6eb887c86d5 100644 --- a/x-pack/plugins/cases/public/components/all_cases/columns_popover.test.tsx +++ b/x-pack/plugins/cases/public/components/all_cases/columns_popover.test.tsx @@ -14,7 +14,8 @@ import type { AppMockRenderer } from '../../common/mock'; import { createAppMockRenderer } from '../../common/mock'; import { ColumnsPopover } from './columns_popover'; -describe('ColumnsPopover', () => { +// FLAKY: https://github.com/elastic/kibana/issues/174682 +describe.skip('ColumnsPopover', () => { let appMockRenderer: AppMockRenderer; beforeEach(() => { diff --git a/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx b/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx index 70e91af618854..508af2099b913 100644 --- a/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx +++ b/x-pack/plugins/cases/public/components/connector_selector/form.test.tsx @@ -19,7 +19,8 @@ jest.mock('../../common/lib/kibana'); const useKibanaMock = useKibana as jest.Mocked; -describe('ConnectorSelector', () => { +// FLAKY: https://github.com/elastic/kibana/issues/189530 +describe.skip('ConnectorSelector', () => { const handleChange = jest.fn(); const defaultProps = { connectors: [], diff --git a/x-pack/plugins/cases/public/components/files/files_utility_bar.test.tsx b/x-pack/plugins/cases/public/components/files/files_utility_bar.test.tsx index bfac1998a857a..42e4c4c69fff4 100644 --- a/x-pack/plugins/cases/public/components/files/files_utility_bar.test.tsx +++ b/x-pack/plugins/cases/public/components/files/files_utility_bar.test.tsx @@ -18,7 +18,8 @@ const defaultProps = { onSearch: jest.fn(), }; -describe('FilesUtilityBar', () => { +// FLAKY: https://github.com/elastic/kibana/issues/174571 +describe.skip('FilesUtilityBar', () => { let appMockRender: AppMockRenderer; beforeEach(() => { diff --git a/x-pack/plugins/cases/public/components/templates/template_tags.test.tsx b/x-pack/plugins/cases/public/components/templates/template_tags.test.tsx index 6a99321bb7727..ed94b28d80d5e 100644 --- a/x-pack/plugins/cases/public/components/templates/template_tags.test.tsx +++ b/x-pack/plugins/cases/public/components/templates/template_tags.test.tsx @@ -15,7 +15,8 @@ import { FormTestComponent } from '../../common/test_utils'; import { TemplateTags } from './template_tags'; import { showEuiComboBoxOptions } from '@elastic/eui/lib/test/rtl'; -describe('TemplateTags', () => { +// FLAKY: https://github.com/elastic/kibana/issues/189293 +describe.skip('TemplateTags', () => { let appMockRenderer: AppMockRenderer; const onSubmit = jest.fn(); const formDefaultValue = { templateTags: [] }; diff --git a/x-pack/plugins/cases/server/routes/api/cases/alerts/get_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/alerts/get_cases.ts index e82c93039b2bc..9ff212f3d4774 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/alerts/get_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/alerts/get_cases.ts @@ -22,6 +22,7 @@ export const getCasesByAlertIdRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Get cases for an alert`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts index a9b05c92e0f3d..65016de1758ae 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/delete_cases.ts @@ -17,6 +17,7 @@ export const deleteCaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Delete cases`, + tags: ['oas-tag:cases'], }, params: { query: schema.object({ diff --git a/x-pack/plugins/cases/server/routes/api/cases/find_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/find_cases.ts index 070bb4f125725..3e92333615991 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/find_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/find_cases.ts @@ -16,6 +16,7 @@ export const findCaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Search cases`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/get_case.ts b/x-pack/plugins/cases/server/routes/api/cases/get_case.ts index b7557359b005e..b988a85aa052c 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/get_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/get_case.ts @@ -22,7 +22,7 @@ const params = { /** * @deprecated since version 8.1.0 */ - includeComments: schema.boolean({ defaultValue: true }), + includeComments: schema.boolean({ defaultValue: true, meta: { deprecated: true } }), }), }; @@ -33,6 +33,7 @@ export const getCaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Get a case`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response, logger, kibanaVersion }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts b/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts index 9a01378d0a86c..1e0c1b3984225 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/patch_cases.ts @@ -16,7 +16,8 @@ export const patchCaseRoute = createCasesRoute({ path: CASES_URL, routerOptions: { access: 'public', - summary: `Update cases`, + summary: 'Update cases', + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/post_case.ts b/x-pack/plugins/cases/server/routes/api/cases/post_case.ts index f72819bf7536d..f9440e428af40 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/post_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/post_case.ts @@ -17,6 +17,7 @@ export const postCaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Create a case`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/push_case.ts b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts index 2933a383aa13d..4e46034c7d8f7 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/push_case.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/push_case.ts @@ -19,6 +19,7 @@ export const pushCaseRoute: CaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Push a case to an external service`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts b/x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts index 9945b5ffa13bf..c196cc01e8417 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/reporters/get_reporters.ts @@ -15,7 +15,8 @@ export const getReportersRoute = createCasesRoute({ path: CASE_REPORTERS_URL, routerOptions: { access: 'public', - summary: `Get all case creators`, + summary: `Get case creators`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts b/x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts index 1d34fb3e566b1..11a9aa006e77f 100644 --- a/x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts +++ b/x-pack/plugins/cases/server/routes/api/cases/tags/get_tags.ts @@ -16,6 +16,7 @@ export const getTagsRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Get case tags`, + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/delete_all_comments.ts b/x-pack/plugins/cases/server/routes/api/comments/delete_all_comments.ts index 499b102dbed73..26c4400212339 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/delete_all_comments.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/delete_all_comments.ts @@ -15,7 +15,10 @@ export const deleteAllCommentsRoute = createCasesRoute({ path: CASE_COMMENTS_URL, routerOptions: { access: 'public', - summary: `Delete all alerts and comments from a case`, + summary: `Delete all case comments and alerts`, + tags: ['oas-tag:cases'], + description: 'Deletes all comments and alerts from a case.', + // You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting. }, params: { params: schema.object({ diff --git a/x-pack/plugins/cases/server/routes/api/comments/delete_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/delete_comment.ts index 2d0e30bf49eca..40fe590d8e2f7 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/delete_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/delete_comment.ts @@ -22,7 +22,9 @@ export const deleteCommentRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Delete an alert or comment from a case`, + summary: `Delete a case comment or alert`, + // decription: 'You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're deleting.', + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/find_comments.ts b/x-pack/plugins/cases/server/routes/api/comments/find_comments.ts index d44deffc1a9ae..933d0bb1b0fd5 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/find_comments.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/find_comments.ts @@ -22,7 +22,10 @@ export const findCommentsRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Get all alerts and comments for a case`, + summary: `Find case comments and alerts`, + tags: ['oas-tag:cases'], + description: 'Retrieves a paginated list of comments and alerts for a case.', + // You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking. }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/get_alerts.ts b/x-pack/plugins/cases/server/routes/api/comments/get_alerts.ts index 4de1d4690f3b3..988cee1f854d6 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/get_alerts.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/get_alerts.ts @@ -23,6 +23,8 @@ export const getAllAlertsAttachedToCaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Get all alerts for a case`, + tags: ['oas-tag:cases'], + // description: 'You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you\'re seeking.', }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/get_all_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/get_all_comment.ts index 10f6b072636aa..a33b638f5310e 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/get_all_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/get_all_comment.ts @@ -28,7 +28,10 @@ export const getAllCommentsRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Gets all comments for a case`, + summary: `Gets all case comments`, + tags: ['oas-tag:cases'], + // description: 'You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you\'re seeking.', + deprecated: true, }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/get_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/get_comment.ts index 69382492ff40b..6a1a56b4d6358 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/get_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/get_comment.ts @@ -23,7 +23,9 @@ export const getCommentRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Get an alert or comment for a case`, + summary: `Get a case comment or alert`, + // decription: 'You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases with the comments you're seeking.', + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts index ecd4bc6454e55..ce00c566321d5 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/patch_comment.ts @@ -23,7 +23,10 @@ export const patchCommentRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Update an alert or comment in a case`, + summary: `Update a case comment or alert`, + tags: ['oas-tag:cases'], + description: 'You cannot change the comment type or the owner of a comment.', + // You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're updating. }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/comments/post_comment.ts b/x-pack/plugins/cases/server/routes/api/comments/post_comment.ts index 8128439b74672..a44c93f9a7879 100644 --- a/x-pack/plugins/cases/server/routes/api/comments/post_comment.ts +++ b/x-pack/plugins/cases/server/routes/api/comments/post_comment.ts @@ -22,7 +22,10 @@ export const postCommentRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Add an alert or comment to a case`, + summary: `Add a case comment or alert`, + tags: ['oas-tag:cases'], + description: 'Each case can have a maximum of 1,000 alerts.', + // You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're creating. }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts index 21407054bb970..881fc71833a65 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/get_configure.ts @@ -17,7 +17,9 @@ export const getCaseConfigureRoute = createCasesRoute({ access: 'public', summary: 'Get case settings', description: - 'Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases. You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created.', + 'Retrieves setting details such as the closure type, custom fields, templates, and the default connector for cases.', + // You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the cases were created. + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts b/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts index 8c6aa326d4ddb..a11af001480e6 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/get_connectors.ts @@ -16,11 +16,11 @@ export const getConnectorsRoute = createCasesRoute({ method: 'get', path: `${CASE_CONFIGURE_CONNECTORS_URL}/_find`, routerOptions: { - tags: ['access:casesGetConnectorsConfigure'], + tags: ['access:casesGetConnectorsConfigure', 'oas-tag:cases'], access: 'public', summary: 'Get case connectors', - description: - 'Retrieves information about connectors that are supported for use in cases. You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges.', + description: 'Retrieves information about connectors that are supported for use in cases.', + // You must have `read` privileges for the **Actions and Connectors** feature in the **Management** section of the Kibana feature privileges. }, handler: async ({ context, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts index f7f3fa51c7a89..9deb650fa91e4 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/patch_configure.ts @@ -19,7 +19,9 @@ export const patchCaseConfigureRoute = createCasesRoute({ access: 'public', summary: 'Update case settings', description: - 'Updates case settings such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created.', + 'Updates case settings such as the closure type, custom fields, templates, and the default connector for cases. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases.', + // You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where the case was created. + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts index 9797f8805d85d..fa42207ac211c 100644 --- a/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts +++ b/x-pack/plugins/cases/server/routes/api/configure/post_configure.ts @@ -19,7 +19,9 @@ export const postCaseConfigureRoute = createCasesRoute({ access: 'public', summary: 'Add case settings', description: - 'Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details. You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases.', + 'Case settings include external connection details, custom fields, and templates. Connectors are used to interface with external systems. You must create a connector before you can use it in your cases. If you set a default connector, it is automatically selected when you create cases in Kibana. If you use the create case API, however, you must still specify all of the connector details.', + // You must have `all` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on where you are creating cases. + tags: ['oas-tag:cases'], }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/stats/get_status.ts b/x-pack/plugins/cases/server/routes/api/stats/get_status.ts index 1db0220365a02..07d02c0b6713f 100644 --- a/x-pack/plugins/cases/server/routes/api/stats/get_status.ts +++ b/x-pack/plugins/cases/server/routes/api/stats/get_status.ts @@ -22,6 +22,11 @@ export const getStatusRoute: CaseRoute = createCasesRoute({ routerOptions: { access: 'public', summary: `Get case status summary`, + tags: ['oas-tag:cases'], + description: + 'Returns the number of cases that are open, closed, and in progress in the default space.', + // You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the cases you're seeking. + deprecated: true, }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/user_actions/find_user_actions.ts b/x-pack/plugins/cases/server/routes/api/user_actions/find_user_actions.ts index 0a6c818cffa8b..3002a4c67305e 100644 --- a/x-pack/plugins/cases/server/routes/api/user_actions/find_user_actions.ts +++ b/x-pack/plugins/cases/server/routes/api/user_actions/find_user_actions.ts @@ -22,7 +22,12 @@ export const findUserActionsRoute = createCasesRoute({ }, routerOptions: { access: 'public', - summary: `Get user activity for a case`, + summary: `Find case activity`, + tags: ['oas-tag:cases'], + description: 'Returns a paginated list of user activity for a case.', + // You must have `read` privileges for the **Cases** feature in the + // **Management**, **Observability**, or **Security** section of the Kibana + // feature privileges, depending on the owner of the case you're seeking. }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/cases/server/routes/api/user_actions/get_all_user_actions.ts b/x-pack/plugins/cases/server/routes/api/user_actions/get_all_user_actions.ts index e69e7197c1ece..5edc7a261b3c4 100644 --- a/x-pack/plugins/cases/server/routes/api/user_actions/get_all_user_actions.ts +++ b/x-pack/plugins/cases/server/routes/api/user_actions/get_all_user_actions.ts @@ -26,7 +26,11 @@ export const getUserActionsRoute = createCasesRoute({ options: { deprecated: true }, routerOptions: { access: 'public', - summary: `Get all user activity for a case`, + summary: 'Get case activity', + description: `Returns all user activity for a case.`, + // You must have `read` privileges for the **Cases** feature in the **Management**, **Observability**, or **Security** section of the Kibana feature privileges, depending on the owner of the case you're seeking. + tags: ['oas-tag:cases'], + deprecated: true, }, handler: async ({ context, request, response }) => { try { diff --git a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts index 83d56a133ea16..9b9dba6108ff3 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.test.ts @@ -45,7 +45,9 @@ describe('Key rotation routes', () => { it('correctly defines route.', () => { expect(routeConfig.options).toEqual({ tags: ['access:rotateEncryptionKey', 'oas-tag:saved objects'], - description: `Rotate a key for encrypted saved objects`, + summary: `Rotate a key for encrypted saved objects`, + description: `If a saved object cannot be decrypted using the primary encryption key, Kibana attempts to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key. + NOTE: Bulk key rotation can consume a considerable amount of resources and hence only user with a superuser role can trigger it.`, }); expect(routeConfig.validate).toEqual({ body: undefined, diff --git a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts index e26efbb2a93b3..80907497010da 100644 --- a/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts +++ b/x-pack/plugins/encrypted_saved_objects/server/routes/key_rotation.ts @@ -41,8 +41,10 @@ export function defineKeyRotationRoutes({ }, options: { tags: ['access:rotateEncryptionKey', 'oas-tag:saved objects'], - description: `Rotate a key for encrypted saved objects`, access: buildFlavor === 'serverless' ? 'internal' : undefined, + summary: `Rotate a key for encrypted saved objects`, + description: `If a saved object cannot be decrypted using the primary encryption key, Kibana attempts to decrypt it using the specified decryption-only keys. In most of the cases this overhead is negligible, but if you're dealing with a large number of saved objects and experiencing performance issues, you may want to rotate the encryption key. + NOTE: Bulk key rotation can consume a considerable amount of resources and hence only user with a superuser role can trigger it.`, }, }, async (context, request, response) => { diff --git a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx index 06d29aafc1986..75afa8c9455b2 100644 --- a/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx +++ b/x-pack/plugins/index_management/__jest__/client_integration/index_details_page/select_inference_id.test.tsx @@ -16,13 +16,21 @@ import { SelectInferenceIdProps, } from '../../../public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id'; import React from 'react'; +import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; const createInferenceEndpointMock = jest.fn(); const mockDispatch = jest.fn(); jest.mock('../../../public/application/app_context', () => ({ useAppContext: jest.fn().mockReturnValue({ - core: { application: {} }, + core: { + application: {}, + http: { + basePath: { + get: jest.fn().mockReturnValue('/base-path'), + }, + }, + }, docLinks: { links: { enterpriseSearch: { @@ -60,6 +68,18 @@ jest.mock('../../../public/application/components/mappings_editor/mappings_state useDispatch: () => mockDispatch, })); +jest.mock('../../../public/application/services/api', () => ({ + useLoadInferenceEndpoints: jest.fn().mockReturnValue({ + data: [ + { model_id: 'endpoint-1', task_type: 'text_embedding' }, + { model_id: 'endpoint-2', task_type: 'sparse_embedding' }, + { model_id: 'endpoint-3', task_type: 'completion' }, + ] as InferenceAPIConfigResponse[], + isLoading: false, + error: null, + }), +})); + function getTestForm(Component: React.FC) { return (defaultProps: SelectInferenceIdProps) => { const { form } = useForm(); @@ -107,5 +127,8 @@ describe('SelectInferenceId', () => { find('inferenceIdButton').simulate('click'); expect(find('data-inference-endpoint-list').contains('e5')).toBe(true); expect(find('data-inference-endpoint-list').contains('elser_model_2')).toBe(true); + expect(find('data-inference-endpoint-list').contains('endpoint-1')).toBe(true); + expect(find('data-inference-endpoint-list').contains('endpoint-2')).toBe(true); + expect(find('data-inference-endpoint-list').contains('endpoint-3')).toBe(false); }); }); diff --git a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx index fab94b2e4204f..672d64766e576 100644 --- a/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx +++ b/x-pack/plugins/index_management/public/application/components/mappings_editor/components/document_fields/field_parameters/select_inference_id.tsx @@ -89,17 +89,13 @@ const SelectInferenceIdContent: React.FC = ({ value, }) => { const { - core: { application }, + core: { application, http }, docLinks, plugins: { ml }, } = useAppContext(); const config = getFieldConfig('inference_id'); - const getMlTrainedModelPageUrl = useCallback(async () => { - return await ml?.locator?.getUrl({ - page: 'trained_models', - }); - }, [ml]); + const inferenceEndpointsPageLink = `${http.basePath.get()}/app/enterprise_search/relevance/inference_endpoints`; const [isInferenceFlyoutVisible, setIsInferenceFlyoutVisible] = useState(false); const [availableTrainedModels, setAvailableTrainedModels] = useState< @@ -133,11 +129,16 @@ const SelectInferenceIdContent: React.FC = ({ const { isLoading, data: endpoints, resendRequest } = useLoadInferenceEndpoints(); const options: EuiSelectableOption[] = useMemo(() => { + const filteredEndpoints = endpoints?.filter( + (endpoint) => + endpoint.task_type === 'text_embedding' || endpoint.task_type === 'sparse_embedding' + ); + const missingDefaultEndpoints = defaultEndpoints.filter( - (endpoint) => !(endpoints || []).find((e) => e.model_id === endpoint.model_id) + (endpoint) => !(filteredEndpoints || []).find((e) => e.model_id === endpoint.model_id) ); const newOptions: EuiSelectableOption[] = [ - ...(endpoints || []), + ...(filteredEndpoints || []), ...missingDefaultEndpoints, ].map((endpoint) => ({ label: endpoint.model_id, @@ -245,10 +246,7 @@ const SelectInferenceIdContent: React.FC = ({ size="s" data-test-subj="manageInferenceEndpointButton" onClick={async () => { - const mlTrainedPageUrl = await getMlTrainedModelPageUrl(); - if (typeof mlTrainedPageUrl === 'string') { - application.navigateToUrl(mlTrainedPageUrl); - } + application.navigateToUrl(inferenceEndpointsPageLink); }} > {i18n.translate( diff --git a/x-pack/plugins/lens/kibana.jsonc b/x-pack/plugins/lens/kibana.jsonc index 10eb3721414fe..6a3f9875d1da9 100644 --- a/x-pack/plugins/lens/kibana.jsonc +++ b/x-pack/plugins/lens/kibana.jsonc @@ -56,6 +56,7 @@ "embeddable", "fieldFormats", "charts", + "esqlDataGrid", "esql", ], "extraPublicDirs": [ diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/esql_data_grid_accordion.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/esql_data_grid_accordion.tsx new file mode 100644 index 0000000000000..b05c6ec0cf592 --- /dev/null +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/esql_data_grid_accordion.tsx @@ -0,0 +1,105 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useCallback } from 'react'; +import { i18n } from '@kbn/i18n'; +import { css } from '@emotion/react'; +import { EuiTitle, EuiAccordion, EuiSpacer, EuiFlexItem, EuiNotificationBadge } from '@elastic/eui'; +import type { AggregateQuery } from '@kbn/es-query'; +import { euiThemeVars } from '@kbn/ui-theme'; +import { ESQLDataGrid } from '@kbn/esql-datagrid/public'; +import type { ESQLDataGridAttrs } from './helpers'; + +interface ESQLDataGridAccordionProps { + isAccordionOpen: boolean; + dataGridAttrs: ESQLDataGridAttrs; + query: AggregateQuery; + isTableView: boolean; + setIsAccordionOpen: (flag: boolean) => void; + onAccordionToggleCb: (status: boolean) => void; +} + +export const ESQLDataGridAccordion = ({ + isAccordionOpen, + dataGridAttrs, + query, + isTableView, + setIsAccordionOpen, + onAccordionToggleCb, +}: ESQLDataGridAccordionProps) => { + const onAccordionToggle = useCallback( + (status: boolean) => { + setIsAccordionOpen(!isAccordionOpen); + onAccordionToggleCb(status); + }, + [isAccordionOpen, onAccordionToggleCb, setIsAccordionOpen] + ); + return ( + + +
+ {i18n.translate('xpack.lens.config.ESQLQueryResultsTitle', { + defaultMessage: 'ES|QL Query Results', + })} +
+ + } + buttonProps={{ + paddingSize: 'm', + }} + initialIsOpen={isAccordionOpen} + forceState={isAccordionOpen ? 'open' : 'closed'} + onToggle={onAccordionToggle} + extraAction={ + + {dataGridAttrs.rows.length} + + } + > + <> + + + +
+
+ ); +}; diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.test.ts b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.test.ts index fcdb83a978f6a..5f80fdb89ed64 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.test.ts +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.test.ts @@ -5,7 +5,7 @@ * 2.0. */ import { dataViewPluginMocks } from '@kbn/data-views-plugin/public/mocks'; -import { getESQLQueryColumns } from '@kbn/esql-utils'; +import { getESQLResults } from '@kbn/esql-utils'; import type { LensPluginStartDependencies } from '../../../plugin'; import { createMockStartDependencies } from '../../../editor_frame_service/mocks'; import { @@ -18,7 +18,7 @@ import { suggestionsApi } from '../../../lens_suggestions_api'; import { getSuggestions } from './helpers'; const mockSuggestionApi = suggestionsApi as jest.Mock; -const mockFetchData = getESQLQueryColumns as jest.Mock; +const mockFetchData = getESQLResults as jest.Mock; jest.mock('../../../lens_suggestions_api', () => ({ suggestionsApi: jest.fn(() => mockAllSuggestions), @@ -26,7 +26,37 @@ jest.mock('../../../lens_suggestions_api', () => ({ jest.mock('@kbn/esql-utils', () => { return { - getESQLQueryColumns: jest.fn().mockResolvedValue(() => [ + getESQLResults: jest.fn().mockResolvedValue({ + response: { + columns: [ + { + name: '@timestamp', + id: '@timestamp', + meta: { + type: 'date', + }, + }, + { + name: 'bytes', + id: 'bytes', + meta: { + type: 'number', + }, + }, + { + name: 'memory', + id: 'memory', + meta: { + type: 'number', + }, + }, + ], + values: [], + }, + }), + getIndexPatternFromESQLQuery: jest.fn().mockReturnValue('index1'), + getESQLAdHocDataview: jest.fn().mockResolvedValue({}), + formatESQLColumns: jest.fn().mockReturnValue([ { name: '@timestamp', id: '@timestamp', @@ -49,7 +79,6 @@ jest.mock('@kbn/esql-utils', () => { }, }, ]), - getIndexPatternFromESQLQuery: jest.fn().mockReturnValue('index1'), }; }); diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts index dcd47d6c9170c..4e6f1ef70acbd 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/helpers.ts @@ -7,16 +7,59 @@ import { getIndexPatternFromESQLQuery, getESQLAdHocDataview, - getESQLQueryColumns, + getESQLResults, + formatESQLColumns, } from '@kbn/esql-utils'; import type { AggregateQuery } from '@kbn/es-query'; +import type { ESQLRow } from '@kbn/es-types'; import { getLensAttributesFromSuggestion } from '@kbn/visualization-utils'; import type { DataViewSpec } from '@kbn/data-views-plugin/public'; +import type { DataView } from '@kbn/data-views-plugin/common'; +import type { DatatableColumn } from '@kbn/expressions-plugin/common'; import type { TypedLensByValueInput } from '../../../embeddable/embeddable_component'; import type { LensPluginStartDependencies } from '../../../plugin'; import type { DatasourceMap, VisualizationMap } from '../../../types'; import { suggestionsApi } from '../../../lens_suggestions_api'; +export interface ESQLDataGridAttrs { + rows: ESQLRow[]; + dataView: DataView; + columns: DatatableColumn[]; +} + +export const getGridAttrs = async ( + query: AggregateQuery, + adHocDataViews: DataViewSpec[], + deps: LensPluginStartDependencies, + abortController?: AbortController +): Promise => { + const indexPattern = getIndexPatternFromESQLQuery(query.esql); + const dataViewSpec = adHocDataViews.find((adHoc) => { + return adHoc.name === indexPattern; + }); + + const [results, dataView] = await Promise.all([ + getESQLResults({ + esqlQuery: query.esql, + search: deps.data.search.search, + signal: abortController?.signal, + dropNullColumns: true, + timeRange: deps.data.query.timefilter.timefilter.getAbsoluteTime(), + }), + dataViewSpec + ? deps.dataViews.create(dataViewSpec) + : getESQLAdHocDataview(query.esql, deps.dataViews), + ]); + + const columns = formatESQLColumns(results.response.columns); + + return { + rows: results.response.values, + dataView, + columns, + }; +}; + export const getSuggestions = async ( query: AggregateQuery, deps: LensPluginStartDependencies, @@ -24,24 +67,23 @@ export const getSuggestions = async ( visualizationMap: VisualizationMap, adHocDataViews: DataViewSpec[], setErrors: (errors: Error[]) => void, - abortController?: AbortController + abortController?: AbortController, + setDataGridAttrs?: (attrs: ESQLDataGridAttrs) => void ) => { try { - const indexPattern = getIndexPatternFromESQLQuery(query.esql); - const dataViewSpec = adHocDataViews.find((adHoc) => { - return adHoc.name === indexPattern; - }); - - const dataView = dataViewSpec - ? await deps.dataViews.create(dataViewSpec) - : await getESQLAdHocDataview(query.esql, deps.dataViews); + const { dataView, columns, rows } = await getGridAttrs( + query, + adHocDataViews, + deps, + abortController + ); - const columns = await getESQLQueryColumns({ - esqlQuery: 'esql' in query ? query.esql : '', - search: deps.data.search.search, - signal: abortController?.signal, - timeRange: deps.data.query.timefilter.timefilter.getAbsoluteTime(), + setDataGridAttrs?.({ + rows, + dataView, + columns, }); + const context = { dataViewSpec: dataView?.toSpec(false), fieldName: '', diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.test.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.test.tsx index bda603bb0909d..2c1d3290fde7f 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.test.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.test.tsx @@ -6,7 +6,7 @@ */ import React from 'react'; import { renderWithReduxStore } from '../../../mocks'; -import { screen } from '@testing-library/react'; +import { screen, waitFor } from '@testing-library/react'; import userEvent from '@testing-library/user-event'; import type { Query, AggregateQuery } from '@kbn/es-query'; import { coreMock } from '@kbn/core/public/mocks'; @@ -17,6 +17,64 @@ import type { TypedLensByValueInput } from '../../../embeddable/embeddable_compo import { LensEditConfigurationFlyout } from './lens_configuration_flyout'; import type { EditConfigPanelProps } from './types'; +jest.mock('@kbn/esql-utils', () => { + return { + getESQLResults: jest.fn().mockResolvedValue({ + response: { + columns: [ + { + name: '@timestamp', + id: '@timestamp', + meta: { + type: 'date', + }, + }, + { + name: 'bytes', + id: 'bytes', + meta: { + type: 'number', + }, + }, + { + name: 'memory', + id: 'memory', + meta: { + type: 'number', + }, + }, + ], + values: [], + }, + }), + getIndexPatternFromESQLQuery: jest.fn().mockReturnValue('index1'), + getESQLAdHocDataview: jest.fn().mockResolvedValue({}), + formatESQLColumns: jest.fn().mockReturnValue([ + { + name: '@timestamp', + id: '@timestamp', + meta: { + type: 'date', + }, + }, + { + name: 'bytes', + id: 'bytes', + meta: { + type: 'number', + }, + }, + { + name: 'memory', + id: 'memory', + meta: { + type: 'number', + }, + }, + ]), + }; +}); + const lensAttributes = { title: 'test', visualizationType: 'testVis', @@ -38,11 +96,27 @@ const lensAttributes = { } as unknown as TypedLensByValueInput['attributes']; const mockStartDependencies = createMockStartDependencies() as unknown as LensPluginStartDependencies; -const data = mockDataPlugin(); -(data.query.timefilter.timefilter.getTime as jest.Mock).mockReturnValue({ - from: 'now-2m', - to: 'now', -}); + +const data = { + ...mockDataPlugin(), + query: { + ...mockDataPlugin().query, + timefilter: { + ...mockDataPlugin().query.timefilter, + timefilter: { + ...mockDataPlugin().query.timefilter.timefilter, + getTime: jest.fn(() => ({ + from: 'now-2m', + to: 'now', + })), + getAbsoluteTime: jest.fn(() => ({ + from: '2021-01-10T04:00:00.000Z', + to: '2021-01-10T04:00:00.000Z', + })), + }, + }, + }, +}; const startDependencies = { ...mockStartDependencies, data, @@ -196,6 +270,14 @@ describe('LensEditConfigurationFlyout', () => { expect(screen.getByTestId('InlineEditingESQLEditor')).toBeInTheDocument(); expect(screen.getByTestId('InlineEditingSuggestions')).toBeInTheDocument(); }); + + it('should display the ES|QL results table if canEditTextBasedQuery prop is true', async () => { + renderConfigFlyout({ + canEditTextBasedQuery: true, + }); + await waitFor(() => expect(screen.getByTestId('ESQLQueryResults')).toBeInTheDocument()); + }); + it('save button is disabled if no changes have been made', async () => { const updateByRefInputSpy = jest.fn(); const saveByRefSpy = jest.fn(); diff --git a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx index f796ea26810c8..a30fb5d3f52fc 100644 --- a/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx +++ b/x-pack/plugins/lens/public/app_plugin/shared/edit_on_the_fly/lens_configuration_flyout.tsx @@ -45,10 +45,11 @@ import { import { LayerConfiguration } from './layer_configuration_section'; import type { EditConfigPanelProps } from './types'; import { FlyoutWrapper } from './flyout_wrapper'; -import { getSuggestions } from './helpers'; +import { getSuggestions, getGridAttrs, type ESQLDataGridAttrs } from './helpers'; import { SuggestionPanel } from '../../../editor_frame_service/editor_frame/suggestion_panel'; import { useApplicationUserMessages } from '../../get_application_user_messages'; import { trackUiCounterEvents } from '../../../lens_ui_telemetry'; +import { ESQLDataGridAccordion } from './esql_data_grid_accordion'; export function LensEditConfigurationFlyout({ attributes, @@ -86,7 +87,9 @@ export function LensEditConfigurationFlyout({ const [isLayerAccordionOpen, setIsLayerAccordionOpen] = useState(true); const [suggestsLimitedColumns, setSuggestsLimitedColumns] = useState(false); const [isSuggestionsAccordionOpen, setIsSuggestionsAccordionOpen] = useState(false); + const [isESQLResultsAccordionOpen, setIsESQLResultsAccordionOpen] = useState(false); const [isVisualizationLoading, setIsVisualizationLoading] = useState(false); + const [dataGridAttrs, setDataGridAttrs] = useState(undefined); const datasourceState = attributes.state.datasourceStates[datasourceId]; const activeDatasource = datasourceMap[datasourceId]; @@ -107,6 +110,9 @@ export function LensEditConfigurationFlyout({ [activeDatasource, datasourceState] ); + // needed for text based languages mode which works ONLY with adHoc dataviews + const adHocDataViews = Object.values(attributes.state.adHocDataViews ?? {}); + const dispatch = useLensDispatch(); useEffect(() => { const s = output$?.subscribe(() => { @@ -128,6 +134,30 @@ export function LensEditConfigurationFlyout({ return () => s?.unsubscribe(); }, [dispatch, output$, layers]); + useEffect(() => { + const abortController = new AbortController(); + const getESQLGridAttrs = async () => { + if (!dataGridAttrs && isOfAggregateQueryType(query)) { + const { dataView, columns, rows } = await getGridAttrs( + query, + adHocDataViews, + startDependencies, + abortController + ); + + setDataGridAttrs({ + rows, + dataView, + columns, + }); + } + }; + getESQLGridAttrs(); + return () => { + abortController.abort(); + }; + }, [adHocDataViews, dataGridAttrs, query, startDependencies]); + const attributesChanged: boolean = useMemo(() => { const previousAttrs = previousAttributes.current; @@ -284,9 +314,6 @@ export function LensEditConfigurationFlyout({ visualizationState: visualization, }); - // needed for text based languages mode which works ONLY with adHoc dataviews - const adHocDataViews = Object.values(attributes.state.adHocDataViews ?? {}); - const runQuery = useCallback( async (q, abortController) => { const attrs = await getSuggestions( @@ -296,7 +323,8 @@ export function LensEditConfigurationFlyout({ visualizationMap, adHocDataViews, setErrors, - abortController + abortController, + setDataGridAttrs ); if (attrs) { setCurrentAttributes?.(attrs); @@ -479,6 +507,23 @@ export function LensEditConfigurationFlyout({ /> )} + {isOfAggregateQueryType(query) && canEditTextBasedQuery && dataGridAttrs && ( + { + if (status && isSuggestionsAccordionOpen) { + setIsSuggestionsAccordionOpen(!status); + } + if (status && isLayerAccordionOpen) { + setIsLayerAccordionOpen(!status); + } + }} + /> + )} @@ -562,6 +610,9 @@ export function LensEditConfigurationFlyout({ if (!status && isLayerAccordionOpen) { setIsLayerAccordionOpen(status); } + if (status && isESQLResultsAccordionOpen) { + setIsESQLResultsAccordionOpen(!status); + } setIsSuggestionsAccordionOpen(!isSuggestionsAccordionOpen); }} /> diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx index 8e7fb9e310f66..73842e6cae114 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.test.tsx @@ -14,16 +14,21 @@ import { FilterPopover } from './filter_popover'; import { LabelInput } from '../shared_components'; import { QueryStringInput } from '@kbn/unified-search-plugin/public'; import { QueryInput } from '@kbn/visualization-ui-components'; +import { Query } from '@kbn/es-query'; -jest.mock('.', () => ({ - isQueryValid: () => true, - defaultLabel: 'label', -})); +jest.mock('.', () => ({})); + +jest.mock('@kbn/visualization-ui-components', () => { + const original = jest.requireActual('@kbn/visualization-ui-components'); + + return { + ...original, + isQueryValid: jest.fn((q: Query) => (q.query === 'bytes >= 1 and' ? false : true)), + }; +}); jest.mock('@kbn/unified-search-plugin/public', () => ({ - QueryStringInput: () => { - return 'QueryStringInput'; - }, + QueryStringInput: () => 'QueryStringInput', })); describe('filter popover', () => { @@ -118,6 +123,16 @@ describe('filter popover', () => { }); }); + it('should not call setFilter if QueryInput value is not valid', () => { + const setFilter = jest.fn(); + const instance = shallow(); + instance.find(QueryInput).prop('onChange')!({ + query: 'bytes >= 1 and', + language: 'kuery', + }); + expect(setFilter).not.toHaveBeenCalled(); + }); + it('should call setFilter when modifying LabelInput', () => { const setFilter = jest.fn(); const instance = shallow(); diff --git a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx index 35327fb91b678..1f3f5ba94e63b 100644 --- a/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx +++ b/x-pack/plugins/lens/public/datasources/form_based/operations/definitions/filters/filter_popover.tsx @@ -7,7 +7,7 @@ import './filter_popover.scss'; -import React from 'react'; +import React, { useState } from 'react'; import { EuiPopover, EuiSpacer } from '@elastic/eui'; import type { Query } from '@kbn/es-query'; // Need to keep it separate to make it work Jest mocks in dimension_panel tests @@ -36,9 +36,18 @@ export const FilterPopover = ({ triggerClose: () => void; }) => { const inputRef = React.useRef(); + const [localFilter, setLocalFilter] = useState(() => filter); - const setFilterLabel = (label: string) => setFilter({ ...filter, label }); - const setFilterQuery = (input: Query) => setFilter({ ...filter, input }); + const setFilterLabel = (label: string) => { + setLocalFilter({ ...localFilter, label }); + setFilter({ ...filter, label }); + }; + const setFilterQuery = (input: Query) => { + setLocalFilter({ ...localFilter, input }); + if (isQueryValid(input, indexPattern)) { + setFilter({ ...filter, input }); + } + }; const getPlaceholder = (query: Query['query']) => { if (query === '') { @@ -49,6 +58,10 @@ export const FilterPopover = ({ return String(query); } }; + const closePopover = () => { + setLocalFilter({ ...localFilter, input: filter.input }); + triggerClose(); + }; return ( diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts index ae7bd559d9d14..7ec70e687efe5 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/edit_action_helpers.ts @@ -66,6 +66,7 @@ const openInlineLensConfigEditor = ( 'data-test-subj': 'customizeLens', className: 'lnsConfigPanel__overlay', hideCloseButton: true, + isResizable: true, onClose: (overlayRef) => { overlayTracker?.clearOverlays(); overlayRef.close(); diff --git a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/helpers.scss b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/helpers.scss index ccb6556d650a5..6c83b43a60508 100644 --- a/x-pack/plugins/lens/public/trigger_actions/open_lens_config/helpers.scss +++ b/x-pack/plugins/lens/public/trigger_actions/open_lens_config/helpers.scss @@ -4,6 +4,8 @@ @include euiBreakpoint('xs', 's', 'm') { clip-path: none; } + max-inline-size: $euiSizeXXL * 20; + min-inline-size: $euiSizeXXL * 8; background: $euiColorLightestShade; .kbnOverlayMountWrapper { padding-left: $euiFormMaxWidth; diff --git a/x-pack/plugins/lens/tsconfig.json b/x-pack/plugins/lens/tsconfig.json index 90801e8687c61..f94cc7d3dfd1c 100644 --- a/x-pack/plugins/lens/tsconfig.json +++ b/x-pack/plugins/lens/tsconfig.json @@ -111,6 +111,8 @@ "@kbn/licensing-plugin", "@kbn/react-kibana-context-render", "@kbn/react-kibana-mount", + "@kbn/es-types", + "@kbn/esql-datagrid", ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx b/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx index eda1df772904c..ca3ffc38f816b 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/links_menu.tsx @@ -27,6 +27,7 @@ import { FormattedMessage } from '@kbn/i18n-react'; import { i18n } from '@kbn/i18n'; import { ES_FIELD_TYPES } from '@kbn/field-types'; import { MAPS_APP_LOCATOR } from '@kbn/maps-plugin/public'; +import type { MlJob } from '@elastic/elasticsearch/lib/api/types'; import { isCategorizationAnomaly, isRuleSupported, @@ -76,6 +77,7 @@ interface LinksMenuProps { showRuleEditorFlyout: (anomaly: MlAnomaliesTableRecord) => void; onItemClick: () => void; sourceIndicesWithGeoFields: SourceIndicesWithGeoFields; + selectedJob?: MlJob; } export const LinksMenuUI = (props: LinksMenuProps) => { @@ -104,11 +106,12 @@ export const LinksMenuUI = (props: LinksMenuProps) => { const { getDataViewById, getDataViewIdFromName } = useMlIndexUtils(); const job = useMemo(() => { + if (props.selectedJob !== undefined) return props.selectedJob; return mlJobService.getJob(props.anomaly.jobId); - }, [props.anomaly.jobId]); + }, [props.anomaly.jobId, props.selectedJob]); const categorizationFieldName = job.analysis_config.categorization_field_name; - const datafeedIndices = job.datafeed_config.indices; + const datafeedIndices = job.datafeed_config!.indices; const indexPattern = datafeedIndices.join(','); const autoGeneratedDiscoverLinkError = i18n.translate( 'xpack.ml.anomaliesTable.linksMenu.autoGeneratedDiscoverLinkErrorMessage', @@ -169,7 +172,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => { filters: dataViewId === null ? [] - : getFiltersForDSLQuery(job.datafeed_config.query, dataViewId, job.job_id), + : getFiltersForDSLQuery(job.datafeed_config!.query, dataViewId, job.job_id), }); return location; }; @@ -207,7 +210,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => { const filtersFromDatafeedQuery = dataViewId === null ? [] - : getFiltersForDSLQuery(job.datafeed_config.query, dataViewId, job.job_id); + : getFiltersForDSLQuery(job.datafeed_config!.query, dataViewId, job.job_id); const location = await locator?.getLocation({ initialLayers, timeRange, @@ -359,7 +362,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => { filters: indexPatternId === null ? [] - : getFiltersForDSLQuery(job.datafeed_config.query, indexPatternId, job.job_id), + : getFiltersForDSLQuery(job.datafeed_config!.query, indexPatternId, job.job_id), ...(withWindowParameters ? { wp: { bMin, bMax, dMin, dMax }, @@ -682,7 +685,7 @@ export const LinksMenuUI = (props: LinksMenuProps) => { const appStateProps = { index: dataViewId, - filters: getFiltersForDSLQuery(job.datafeed_config.query, dataViewId, job.job_id), + filters: getFiltersForDSLQuery(job.datafeed_config!.query, dataViewId, job.job_id), ...(query !== null ? { query, diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js index 96c3744a3212f..abed4bf9819d8 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/rule_editor_flyout.js @@ -60,6 +60,7 @@ class RuleEditorFlyoutUI extends Component { static propTypes = { setShowFunction: PropTypes.func.isRequired, unsetShowFunction: PropTypes.func.isRequired, + selectedJob: PropTypes.object, }; constructor(props) { @@ -100,7 +101,7 @@ class RuleEditorFlyoutUI extends Component { showFlyout = (anomaly) => { let ruleIndex = -1; - const job = mlJobService.getJob(anomaly.jobId); + const job = this.props.selectedJob ?? mlJobService.getJob(anomaly.jobId); if (job === undefined) { // No details found for this job, display an error and // don't open the Flyout as no edits can be made without the job. @@ -337,13 +338,13 @@ class RuleEditorFlyoutUI extends Component { updateRuleAtIndex = (ruleIndex, editedRule) => { const { toasts } = this.props.kibana.services.notifications; - const { mlApiServices, mlJobService } = this.props.kibana.services.mlServices; + const { mlApiServices } = this.props.kibana.services.mlServices; const { job, anomaly } = this.state; const jobId = job.job_id; const detectorIndex = anomaly.detectorIndex; - saveJobRule(job, detectorIndex, ruleIndex, editedRule, mlApiServices, mlJobService) + saveJobRule(job, detectorIndex, ruleIndex, editedRule, mlApiServices) .then((resp) => { if (resp.success) { toasts.add({ @@ -392,12 +393,12 @@ class RuleEditorFlyoutUI extends Component { deleteRuleAtIndex = (index) => { const { toasts } = this.props.kibana.services.notifications; - const { mlApiServices, mlJobService: jobService } = this.props.kibana.services.mlServices; + const { mlApiServices } = this.props.kibana.services.mlServices; const { job, anomaly } = this.state; const jobId = job.job_id; const detectorIndex = anomaly.detectorIndex; - deleteJobRule(job, detectorIndex, index, mlApiServices, jobService) + deleteJobRule(job, detectorIndex, index, mlApiServices) .then((resp) => { if (resp.success) { toasts.addSuccess( diff --git a/x-pack/plugins/ml/public/application/components/rule_editor/utils.js b/x-pack/plugins/ml/public/application/components/rule_editor/utils.js index 8d0e89ed6b58f..275f32b28bb51 100644 --- a/x-pack/plugins/ml/public/application/components/rule_editor/utils.js +++ b/x-pack/plugins/ml/public/application/components/rule_editor/utils.js @@ -15,7 +15,7 @@ import { ML_DETECTOR_RULE_OPERATOR, } from '@kbn/ml-anomaly-utils'; -import { mlJobService as importedMlJobService } from '../../services/job_service'; +import { mlJobService } from '../../services/job_service'; import { processCreatedBy } from '../../../../common/util/job_utils'; export function getNewConditionDefaults() { @@ -69,16 +69,8 @@ export function isValidRule(rule) { return isValid; } -export function saveJobRule( - job, - detectorIndex, - ruleIndex, - editedRule, - mlApiServices, - mlJobService -) { +export function saveJobRule(job, detectorIndex, ruleIndex, editedRule, mlApiServices) { const detector = job.analysis_config.detectors[detectorIndex]; - const jobService = mlJobService || importedMlJobService; // Filter out any scope expression where the UI=specific 'enabled' // property is set to false. @@ -110,17 +102,16 @@ export function saveJobRule( } } - return updateJobRules(job, detectorIndex, rules, mlApiServices, jobService); + return updateJobRules(job, detectorIndex, rules, mlApiServices); } -export function deleteJobRule(job, detectorIndex, ruleIndex, mlApiServices, mlJobService) { - const jobService = mlJobService || importedMlJobService; +export function deleteJobRule(job, detectorIndex, ruleIndex, mlApiServices) { const detector = job.analysis_config.detectors[detectorIndex]; let customRules = []; if (detector.custom_rules !== undefined && ruleIndex < detector.custom_rules.length) { customRules = cloneDeep(detector.custom_rules); customRules.splice(ruleIndex, 1); - return updateJobRules(job, detectorIndex, customRules, mlApiServices, jobService); + return updateJobRules(job, detectorIndex, customRules, mlApiServices); } else { return Promise.reject( new Error( @@ -136,7 +127,7 @@ export function deleteJobRule(job, detectorIndex, ruleIndex, mlApiServices, mlJo } } -export function updateJobRules(job, detectorIndex, rules, mlApiServices, mlJobService) { +export function updateJobRules(job, detectorIndex, rules, mlApiServices) { // Pass just the detector with the edited rule to the updateJob endpoint. const jobId = job.job_id; const jobData = { @@ -158,15 +149,17 @@ export function updateJobRules(job, detectorIndex, rules, mlApiServices, mlJobSe mlApiServices .updateJob({ jobId: jobId, job: jobData }) .then(() => { - // Refresh the job data in the job service before resolving. - mlJobService - .refreshJob(jobId) - .then(() => { - resolve({ success: true }); - }) - .catch((refreshResp) => { - reject(refreshResp); - }); + // If using mlJobService, refresh the job data in the job service before resolving. + if (mlJobService) { + mlJobService + .refreshJob(jobId) + .then(() => { + resolve({ success: true }); + }) + .catch((refreshResp) => { + reject(refreshResp); + }); + } }) .catch((resp) => { reject(resp); diff --git a/x-pack/plugins/ml/public/application/ml_nodes_check/check_ml_nodes.ts b/x-pack/plugins/ml/public/application/ml_nodes_check/check_ml_nodes.ts index 637c628c8dded..2d96721204654 100644 --- a/x-pack/plugins/ml/public/application/ml_nodes_check/check_ml_nodes.ts +++ b/x-pack/plugins/ml/public/application/ml_nodes_check/check_ml_nodes.ts @@ -6,15 +6,16 @@ */ import { ml } from '../services/ml_api_service'; +import type { MlApiServices } from '../services/ml_api_service'; import type { MlNodeCount } from '../../../common/types/ml_server_info'; let mlNodeCount: number = 0; let lazyMlNodeCount: number = 0; let userHasPermissionToViewMlNodeCount: boolean = false; -export async function getMlNodeCount(): Promise { +export async function getMlNodeCount(mlApiServices?: MlApiServices): Promise { try { - const nodes = await ml.mlNodeCount(); + const nodes = await (mlApiServices ?? ml).mlNodeCount(); mlNodeCount = nodes.count; lazyMlNodeCount = nodes.lazyNodeCount; userHasPermissionToViewMlNodeCount = true; diff --git a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer/state_manager.tsx b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer/state_manager.tsx index 38286b9b5ea5b..5b74ef608c110 100644 --- a/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer/state_manager.tsx +++ b/x-pack/plugins/ml/public/application/routing/routes/timeseriesexplorer/state_manager.tsx @@ -126,7 +126,9 @@ export const TimeSeriesExplorerUrlStateManager: FC void; + mode: 'full' | 'empty'; +} + +export const ForecastButton: FC = ({ isDisabled, onClick, mode = 'full' }) => { + const Button = mode === 'full' ? EuiButton : EuiButtonEmpty; + return ( + + ); +}; diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasting_modal.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasting_modal.js index d74d094cf03e9..8402f2cc1e410 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasting_modal.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/forecasting_modal.js @@ -14,10 +14,9 @@ import { get } from 'lodash'; import React, { Component } from 'react'; -import { EuiButton, EuiToolTip } from '@elastic/eui'; +import { EuiToolTip } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; import { context } from '@kbn/kibana-react-plugin/public'; import { extractErrorMessage } from '@kbn/ml-error-utils'; @@ -27,9 +26,8 @@ import { isJobVersionGte } from '../../../../../common/util/job_utils'; import { parseInterval } from '../../../../../common/util/parse_interval'; import { Modal } from './modal'; import { PROGRESS_STATES } from './progress_states'; -import { ml } from '../../../services/ml_api_service'; -import { mlJobService } from '../../../services/job_service'; import { forecastServiceFactory } from '../../../services/forecast_service'; +import { ForecastButton } from './forecast_button'; export const FORECAST_DURATION_MAX_DAYS = 3650; // Max forecast duration allowed by analytics. @@ -57,9 +55,13 @@ function getDefaultState() { export class ForecastingModal extends Component { static propTypes = { + buttonMode: PropTypes.string, isDisabled: PropTypes.bool, job: PropTypes.object, + jobState: PropTypes.string, detectorIndex: PropTypes.number, + earliestRecordTimestamp: PropTypes.number, + latestRecordTimestamp: PropTypes.number, entities: PropTypes.array, setForecastId: PropTypes.func, }; @@ -93,6 +95,12 @@ export class ForecastingModal extends Component { viewForecast = (forecastId) => { this.props.setForecastId(forecastId); + if (this.props.onForecastComplete !== undefined && this.state.previousForecasts.length > 0) { + const forecastToView = this.state.previousForecasts.find( + (forecast) => forecastId === forecast.forecast_id + ); + this.props.onForecastComplete(forecastToView.forecast_end_timestamp); + } this.closeModal(); }; @@ -149,7 +157,7 @@ export class ForecastingModal extends Component { // A forecast can only be run on an opened job, // so open job if it is closed. - if (this.props.job.state === JOB_STATE.CLOSED) { + if (this.props.jobState === JOB_STATE.CLOSED || this.props.job.state === JOB_STATE.CLOSED) { this.openJobAndRunForecast(); } else { this.runForecast(false); @@ -162,8 +170,8 @@ export class ForecastingModal extends Component { jobOpeningState: PROGRESS_STATES.WAITING, }); - mlJobService - .openJob(this.props.job.job_id) + this.context.services.mlServices.mlApiServices + .openJob({ jobId: this.props.job.job_id }) .then(() => { // If open was successful run the forecast, then close the job again. this.setState({ @@ -219,8 +227,8 @@ export class ForecastingModal extends Component { if (closeJob === true) { this.setState({ jobClosingState: PROGRESS_STATES.WAITING }); - mlJobService - .closeJob(this.props.job.job_id) + this.context.services.mlServices.mlApiServices + .closeJob({ jobId: this.props.job.job_id }) .then(() => { this.setState({ jobClosingState: PROGRESS_STATES.DONE }); }) @@ -294,10 +302,14 @@ export class ForecastingModal extends Component { if (status === FORECAST_REQUEST_STATE.FINISHED) { clearInterval(this.forecastChecker); + if (this.props.onForecastComplete !== undefined) { + this.props.onForecastComplete(resp.stats.forecast_end_timestamp); + } + if (closeJobAfterRunning === true) { this.setState({ jobClosingState: PROGRESS_STATES.WAITING }); - mlJobService - .closeJob(this.props.job.job_id) + this.context.services.mlServices.mlApiServices + .closeJob({ jobId: this.props.job.job_id }) .then(() => { this.setState({ jobClosingState: PROGRESS_STATES.DONE, @@ -387,7 +399,7 @@ export class ForecastingModal extends Component { }; openModal = () => { - const job = this.props.job; + const { job, entities, earliestRecordTimestamp, latestRecordTimestamp } = this.props; if (typeof job === 'object') { // Get the list of all the finished forecasts for this job with results at or later than the dashboard 'from' time. @@ -420,16 +432,17 @@ export class ForecastingModal extends Component { // Display a warning about running a forecast if there is high number // of partitioning fields. - const entityFieldNames = this.props.entities.map((entity) => entity.fieldName); + const entityFieldNames = entities.map((entity) => entity.fieldName); if (entityFieldNames.length > 0) { - ml.getCardinalityOfFields({ - index: job.datafeed_config.indices, - fieldNames: entityFieldNames, - query: job.datafeed_config.query, - timeFieldName: job.data_description.time_field, - earliestMs: job.data_counts.earliest_record_timestamp, - latestMs: job.data_counts.latest_record_timestamp, - }) + this.context.services.mlServices.mlApiServices + .getCardinalityOfFields({ + index: job.datafeed_config.indices, + fieldNames: entityFieldNames, + query: job.datafeed_config.query, + timeFieldName: job.data_description.time_field, + earliestMs: earliestRecordTimestamp, + latestMs: latestRecordTimestamp, + }) .then((results) => { let numPartitions = 1; Object.values(results).forEach((cardinality) => { @@ -510,18 +523,12 @@ export class ForecastingModal extends Component { ); } } - const forecastButton = ( - - - + mode={this.props.buttonMode} + /> ); return ( @@ -536,6 +543,7 @@ export class ForecastingModal extends Component { {this.state.isModalVisible && ( { + setMlNodesAvailable(count !== 0 || lazyNodeCount !== 0); + }) + .catch(console.error); + }, + [mlApiServices] + ); + return ( @@ -54,7 +74,7 @@ export function Modal(props) { )} - + diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/run_controls.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/run_controls.js index 2e86b21b41fd2..420ce2a0a7648 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/run_controls.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/components/forecasting_modal/run_controls.js @@ -27,7 +27,6 @@ import { import { JOB_STATE } from '../../../../../common/constants/states'; import { FORECAST_DURATION_MAX_DAYS } from './forecasting_modal'; import { ForecastProgress } from './forecast_progress'; -import { currentMlNodesAvailable } from '../../../ml_nodes_check/check_ml_nodes'; import { checkPermission, createPermissionFailureMessage, @@ -35,13 +34,13 @@ import { import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; -function getRunInputDisabledState(job, isForecastRequested) { +function getRunInputDisabledState(job, isForecastRequested, mlNodesAvailable, jobState) { // Disable the 'run forecast' text field and button if any of the conditions are met: // - No ML nodes are available // - No canForecastJob permission // - Job is not in an OPENED or CLOSED state // - A new forecast has been requested - if (currentMlNodesAvailable() === false) { + if (mlNodesAvailable === false) { return { isDisabled: true, isDisabledToolTipText: i18n.translate( @@ -61,14 +60,14 @@ function getRunInputDisabledState(job, isForecastRequested) { }; } - if (job.state !== JOB_STATE.OPENED && job.state !== JOB_STATE.CLOSED) { + if (jobState !== JOB_STATE.OPENED && jobState !== JOB_STATE.CLOSED) { return { isDisabled: true, isDisabledToolTipText: i18n.translate( 'xpack.ml.timeSeriesExplorer.runControls.forecastsCanNotBeRunOnJobsTooltip', { defaultMessage: 'Forecasts cannot be run on {jobState} jobs', - values: { jobState: job.state }, + values: { jobState: jobState }, } ), }; @@ -79,6 +78,7 @@ function getRunInputDisabledState(job, isForecastRequested) { export function RunControls({ job, + mlNodesAvailable, newForecastDuration, isNewForecastDurationValid, newForecastDurationErrors, @@ -88,8 +88,14 @@ export function RunControls({ forecastProgress, jobOpeningState, jobClosingState, + jobState, }) { - const disabledState = getRunInputDisabledState(job, isForecastRequested); + const disabledState = getRunInputDisabledState( + job, + isForecastRequested, + mlNodesAvailable, + jobState + ); const durationInput = ( @@ -2035,6 +2036,7 @@ class TimeseriesChartIntl extends Component { > = ({ + forecastId, selectedDetectorIndex, selectedEntities, selectedJobId, @@ -131,6 +133,7 @@ export const TimeSeriesExplorerControls: FC = ({ ), onClick: closePopoverOnAction(() => { openCasesModalCallback({ + forecastId, jobIds: [selectedJobId], selectedDetectorIndex, selectedEntities, @@ -149,6 +152,7 @@ export const TimeSeriesExplorerControls: FC = ({ id: config.id, title: newTitle, description: newDescription, + forecastId, jobIds: [selectedJobId], selectedDetectorIndex, selectedEntities, @@ -166,7 +170,7 @@ export const TimeSeriesExplorerControls: FC = ({ path, }); }, - [embeddable, selectedJobId, selectedDetectorIndex, selectedEntities] + [embeddable, selectedJobId, selectedDetectorIndex, selectedEntities, forecastId] ); return ( diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js index 8a53631cd7f22..0eb8182fa3e3c 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer.js @@ -1059,8 +1059,11 @@ export class TimeSeriesExplorer extends React.Component { @@ -1163,6 +1166,7 @@ export class TimeSeriesExplorer extends React.Component { = ({ id, label, checked, onChange }) => { - const checkboxId = useMemo(() => `id-${htmlIdGenerator()()}`, []); + const checkboxId = useMemo(() => `${id}-${htmlIdGenerator()()}`, [id]); return ( diff --git a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer_embeddable_chart/timeseriesexplorer_embeddable_chart.js b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer_embeddable_chart/timeseriesexplorer_embeddable_chart.js index 06ae1979c2557..5ff5b88060d70 100644 --- a/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer_embeddable_chart/timeseriesexplorer_embeddable_chart.js +++ b/x-pack/plugins/ml/public/application/timeseriesexplorer/timeseriesexplorer_embeddable_chart/timeseriesexplorer_embeddable_chart.js @@ -9,7 +9,7 @@ * React component for rendering Single Metric Viewer. */ -import { get, has, isEqual } from 'lodash'; +import { get, isEqual } from 'lodash'; import moment from 'moment-timezone'; import { Subject, @@ -28,10 +28,10 @@ import React, { Fragment } from 'react'; import { i18n } from '@kbn/i18n'; import { FormattedMessage } from '@kbn/i18n-react'; import { context } from '@kbn/kibana-react-plugin/public'; +import { ML_JOB_AGGREGATION, aggregationTypeTransform } from '@kbn/ml-anomaly-utils'; import { EuiCallOut, - EuiCheckbox, EuiFlexGroup, EuiFlexItem, EuiSpacer, @@ -45,9 +45,11 @@ import { isModelPlotEnabled, isModelPlotChartableForDetector, isSourceDataChartableForDetector, + mlFunctionToESAggregation, } from '../../../../common/util/job_utils'; import { LoadingIndicator } from '../../components/loading_indicator/loading_indicator'; +import { ForecastingModal } from '../components/forecasting_modal/forecasting_modal'; import { TimeseriesexplorerNoChartData } from '../components/timeseriesexplorer_no_chart_data'; import { @@ -57,13 +59,13 @@ import { } from '../timeseriesexplorer_constants'; import { getControlsForDetector } from '../get_controls_for_detector'; import { TimeSeriesChartWithTooltips } from '../components/timeseries_chart/timeseries_chart_with_tooltip'; -import { aggregationTypeTransform } from '@kbn/ml-anomaly-utils'; import { isMetricDetector } from '../get_function_description'; import { TimeseriesexplorerChartDataError } from '../components/timeseriesexplorer_chart_data_error'; import { TimeseriesExplorerCheckbox } from './timeseriesexplorer_checkbox'; import { timeBucketsServiceFactory } from '../../util/time_buckets_service'; import { timeSeriesExplorerServiceFactory } from '../../util/time_series_explorer_service'; import { getTimeseriesexplorerDefaultState } from '../timeseriesexplorer_utils'; +import { forecastServiceFactory } from '../../services/forecast_service'; // Used to indicate the chart is being plotted across // all partition field values, where the cardinality of the field cannot be @@ -82,6 +84,8 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { lastRefresh: PropTypes.number.isRequired, onRenderComplete: PropTypes.func, previousRefresh: PropTypes.number.isRequired, + selectedJob: PropTypes.object.isRequired, + selectedJobStats: PropTypes.object.isRequired, selectedJobId: PropTypes.string.isRequired, selectedDetectorIndex: PropTypes.number, selectedEntities: PropTypes.object, @@ -91,6 +95,7 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { zoom: PropTypes.object, toastNotificationService: PropTypes.object, dataViewsService: PropTypes.object, + onForecastComplete: PropTypes.func, }; state = getTimeseriesexplorerDefaultState(); @@ -111,6 +116,7 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { getBoundsRoundedToInterval; mlTimeSeriesExplorer; + mlForecastService; /** * Returns field names that don't have a selection yet. @@ -283,15 +289,13 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { ) .pipe( map((resp) => { - const { mlJobService } = this.context.services.mlServices; const anomalies = resp.anomalies; - const detectorsByJob = mlJobService.detectorsByJob; anomalies.forEach((anomaly) => { // Add a detector property to each anomaly. // Default to functionDescription if no description available. // TODO - when job_service is moved server_side, move this to server endpoint. - const jobId = anomaly.jobId; - const detector = get(detectorsByJob, [jobId, anomaly.detectorIndex]); + const jobDetectors = selectedJob.analysis_config.detectors; + const detector = jobDetectors[anomaly.detectorIndex]; anomaly.detector = get( detector, ['detector_description'], @@ -306,8 +310,8 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { // Add properties used for building the links menu. // TODO - when job_service is moved server_side, move this to server endpoint. - if (has(mlJobService.customUrlsByJob, jobId)) { - anomaly.customUrls = mlJobService.customUrlsByJob[jobId]; + if (selectedJob.custom_settings && selectedJob.custom_settings.custom_urls) { + anomaly.customUrls = selectedJob.custom_settings.custom_urls; } }); @@ -339,6 +343,7 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { autoZoomDuration, bounds, selectedDetectorIndex, + selectedForecastId, zoom, functionDescription, selectedJob, @@ -559,6 +564,46 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { }) ); }); + + // Plus query for forecast data if there is a forecastId stored in the appState. + if (selectedForecastId !== undefined) { + awaitingCount++; + const detector = selectedJob.analysis_config.detectors[detectorIndex]; + const esAgg = mlFunctionToESAggregation(detector.function); + const aggType = + modelPlotEnabled === false && + (esAgg === ML_JOB_AGGREGATION.SUM || esAgg === ML_JOB_AGGREGATION.COUNT) + ? { avg: 'sum', max: 'sum', min: 'sum' } + : undefined; + + this.mlForecastService + .getForecastData( + selectedJob, + detectorIndex, + selectedForecastId, + nonBlankEntities, + searchBounds.min.valueOf(), + searchBounds.max.valueOf(), + stateUpdate.contextAggregationInterval.asMilliseconds(), + aggType + ) + .toPromise() + .then((resp) => { + stateUpdate.contextForecastData = this.mlTimeSeriesExplorer.processForecastResults( + resp.results + ); + finish(counter); + }) + .catch((err) => { + this.displayErrorToastMessages( + err, + i18n.translate('xpack.ml.timeSeriesExplorer.forecastDataErrorMessage', { + defaultMessage: 'Error loading forecast data for forecast ID {forecastId}', + values: { forecastId: selectedForecastId }, + }) + ); + }); + } } ); }; @@ -604,6 +649,7 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { this.context.services.mlServices.mlApiServices, this.context.services.mlServices.mlResultsService ); + this.mlForecastService = forecastServiceFactory(this.context.services.mlServices.mlApiServices); // Listen for context chart updates. this.subscriptions.add( @@ -755,8 +801,12 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { chartWidth, chartHeight, lastRefresh, + onForecastComplete, + selectedEntities, selectedDetectorIndex, selectedJob, + selectedJobStats, + shouldShowForecastButton, } = this.props; const { @@ -851,6 +901,7 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { )} + {fullRefresh && loading === true && ( - + {showModelBoundsCheckbox && ( - @@ -982,6 +1033,27 @@ export class TimeSeriesExplorerEmbeddableChart extends React.Component { /> )} + + {arePartitioningFieldsProvided && + selectedJob && + shouldShowForecastButton === true && ( + + + + )} ; +export type SingleMetricViewerControlsState = Pick< + SingleMetricViewerEmbeddableState, + 'jobIds' | 'selectedDetectorIndex' | 'selectedEntities' | 'functionDescription' | 'forecastId' +>; + export const initializeSingleMetricViewerControls = ( rawState: SingleMetricViewerEmbeddableState, titlesApi: TitlesApi @@ -30,6 +35,7 @@ export const initializeSingleMetricViewerControls = ( const selectedEntities = new BehaviorSubject | undefined>( rawState.selectedEntities ); + const forecastId = new BehaviorSubject(rawState.forecastId); const updateUserInput = (update: SingleMetricViewerEmbeddableUserInput) => { jobIds.next(update.jobIds); @@ -39,17 +45,23 @@ export const initializeSingleMetricViewerControls = ( titlesApi.setPanelTitle(update.panelTitle); }; - const serializeSingleMetricViewerState = (): AnomalySwimLaneControlsState => { + const updateForecastId = (id: string | undefined) => { + forecastId.next(id); + }; + + const serializeSingleMetricViewerState = (): SingleMetricViewerControlsState => { return { - jobIds: jobIds.value, - selectedDetectorIndex: selectedDetectorIndex.value, - selectedEntities: selectedEntities.value, - functionDescription: functionDescription?.value, + jobIds: jobIds.getValue(), + forecastId: forecastId.getValue(), + selectedDetectorIndex: selectedDetectorIndex.getValue(), + selectedEntities: selectedEntities.getValue(), + functionDescription: functionDescription?.getValue(), }; }; - const singleMetricViewerComparators: StateComparators = { + const singleMetricViewerComparators: StateComparators = { jobIds: [jobIds, (ids) => jobIds.next(ids), fastIsEqual], + forecastId: [forecastId, (id) => forecastId.next(id)], selectedDetectorIndex: [selectedDetectorIndex, (index) => selectedDetectorIndex.next(index)], selectedEntities: [selectedEntities, (items) => selectedEntities.next(items), fastIsEqual], functionDescription: [ @@ -61,14 +73,17 @@ export const initializeSingleMetricViewerControls = ( return { singleMetricViewerControlsApi: { jobIds, + forecastId, selectedDetectorIndex, selectedEntities, functionDescription, + updateForecastId, updateUserInput, }, serializeSingleMetricViewerState, singleMetricViewerComparators, onSingleMetricViewerDestroy: () => { + forecastId.complete(); jobIds.complete(); selectedDetectorIndex.complete(); selectedEntities.complete(); diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts index c3b43fd5dda86..a1c2f63a3c261 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_data_fetcher.ts @@ -45,6 +45,7 @@ export const initializeSingleMetricViewerDataFetcher = ( jobIds: api.jobIds, selectedDetectorIndex: api.selectedDetectorIndex, selectedEntities: api.selectedEntities, + forecastId: api.forecastId, functionDescription: api.functionDescription, }); diff --git a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx index dcddb9f2d373e..2655e78222746 100644 --- a/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx +++ b/x-pack/plugins/ml/public/embeddables/single_metric_viewer/single_metric_viewer_embeddable_factory.tsx @@ -157,6 +157,7 @@ export const getSingleMetricViewerEmbeddableFactory = ( return ( { dataLoading.next(false); }} diff --git a/x-pack/plugins/ml/public/embeddables/types.ts b/x-pack/plugins/ml/public/embeddables/types.ts index 94389c69c20fc..3a3353c24b4dd 100644 --- a/x-pack/plugins/ml/public/embeddables/types.ts +++ b/x-pack/plugins/ml/public/embeddables/types.ts @@ -175,8 +175,9 @@ export interface AnomalyChartsEmbeddableState /** Manual input by the user */ export interface SingleMetricViewerEmbeddableUserInput { - jobIds: JobId[]; + forecastId?: string; functionDescription?: string; + jobIds: JobId[]; selectedDetectorIndex: number; selectedEntities?: MlEntity; panelTitle?: string; @@ -215,16 +216,18 @@ export type SingleMetricViewerEmbeddableApi = */ export type SingleMetricViewerRuntimeState = Omit< SingleMetricViewerEmbeddableState, - 'id' | 'filters' | 'query' | 'refreshConfig' + 'id' | 'filters' | 'query' | 'refreshConfig' | 'forecastId' >; export interface SingleMetricViewerComponentApi { + forecastId: PublishingSubject; functionDescription: PublishingSubject; jobIds: PublishingSubject; selectedDetectorIndex: PublishingSubject; selectedEntities: PublishingSubject; updateUserInput: (input: SingleMetricViewerEmbeddableUserInput) => void; + updateForecastId: (id: string | undefined) => void; } export interface AnomalyChartsServices { diff --git a/x-pack/plugins/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx b/x-pack/plugins/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx index 25cd21855912c..2cf5edfd0608d 100644 --- a/x-pack/plugins/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx +++ b/x-pack/plugins/ml/public/shared_components/single_metric_viewer/single_metric_viewer.tsx @@ -6,6 +6,7 @@ */ import { useCallback, useEffect, useMemo, useState } from 'react'; +import moment from 'moment'; import useMountedState from 'react-use/lib/useMountedState'; import type { FC } from 'react'; import React from 'react'; @@ -15,7 +16,7 @@ import type { CoreStart } from '@kbn/core-lifecycle-browser'; import { KibanaContextProvider } from '@kbn/kibana-react-plugin/public'; import { KibanaRenderContextProvider } from '@kbn/react-kibana-context-render'; import { UI_SETTINGS } from '@kbn/data-plugin/common'; -import type { MlJob } from '@elastic/elasticsearch/lib/api/types'; +import type { MlJob, MlJobStats } from '@elastic/elasticsearch/lib/api/types'; import { DatePickerContextProvider, type DatePickerDependencies } from '@kbn/ml-date-picker'; import type { TimeRangeBounds } from '@kbn/ml-time-buckets'; import usePrevious from 'react-use/lib/usePrevious'; @@ -27,7 +28,7 @@ import { APP_STATE_ACTION } from '../../application/timeseriesexplorer/timeserie import type { SingleMetricViewerServices, MlEntity } from '../../embeddables/types'; import './_index.scss'; -const containerPadding = 10; +const containerPadding = 20; const minElemAndChartDiff = 20; const RESIZE_THROTTLE_TIME_MS = 500; interface AppStateZoom { @@ -51,7 +52,9 @@ export type SingleMetricViewerPropsWithDeps = SingleMetricViewerProps & { }; export interface SingleMetricViewerProps { + shouldShowForecastButton?: boolean; bounds?: TimeRangeBounds; + forecastId?: string; selectedEntities?: MlEntity; selectedDetectorIndex?: number; functionDescription?: string; @@ -62,6 +65,7 @@ export interface SingleMetricViewerProps { lastRefresh?: number; onRenderComplete?: () => void; onError?: (error: Error) => void; + onForecastIdChange?: (forecastId: string | undefined) => void; uuid: string; } @@ -78,10 +82,13 @@ const SingleMetricViewerWrapper: FC = ({ functionDescription, lastRefresh, onError, + onForecastIdChange, onRenderComplete, + forecastId, selectedDetectorIndex, selectedEntities, selectedJobId, + shouldShowForecastButton, uuid, }) => { const [chartDimensions, setChartDimensions] = useState<{ width: number; height: number }>({ @@ -89,14 +96,13 @@ const SingleMetricViewerWrapper: FC = ({ height: 0, }); const [zoom, setZoom] = useState(); - const [selectedForecastId, setSelectedForecastId] = useState(); - const [selectedJob, setSelectedJob] = useState(); - const [jobsLoaded, setJobsLoaded] = useState(false); + const [selectedForecastId, setSelectedForecastId] = useState(forecastId); + const [selectedJobWrapper, setSelectedJobWrapper] = useState< + { job: MlJob; stats: MlJobStats } | undefined + >(); const isMounted = useMountedState(); - - const { mlApiServices, mlJobService, mlTimeSeriesExplorerService, toastNotificationService } = - mlServices; + const { mlApiServices, mlTimeSeriesExplorerService, toastNotificationService } = mlServices; const startServices = pick(coreStart, 'analytics', 'i18n', 'theme'); const datePickerDeps: DatePickerDependencies = { ...pick(coreStart, ['http', 'notifications', 'theme', 'uiSettings', 'i18n']), @@ -107,35 +113,16 @@ const SingleMetricViewerWrapper: FC = ({ const previousRefresh = usePrevious(lastRefresh ?? 0); - useEffect( - function setUpJobsLoaded() { - async function loadJobs() { - try { - await mlJobService.loadJobsWrapper(); - setJobsLoaded(true); - } catch (e) { - if (onError) { - onError(new Error(errorMessage)); - } - } - } - if (isMounted() === false) { - return; - } - loadJobs(); - }, - // eslint-disable-next-line react-hooks/exhaustive-deps - [isMounted] - ); - useEffect( function setUpSelectedJob() { async function fetchSelectedJob() { if (mlApiServices && selectedJobId !== undefined) { try { - const { jobs } = await mlApiServices.getJobs({ jobId: selectedJobId }); - const job = jobs[0]; - setSelectedJob(job); + const [{ jobs }, { jobs: jobStats }] = await Promise.all([ + mlApiServices.getJobs({ jobId: selectedJobId }), + mlApiServices.getJobStats({ jobId: selectedJobId }), + ]); + setSelectedJobWrapper({ job: jobs[0], stats: jobStats[0] }); } catch (e) { if (onError) { onError(new Error(errorMessage)); @@ -164,9 +151,11 @@ const SingleMetricViewerWrapper: FC = ({ ); const autoZoomDuration = useMemo(() => { - if (!selectedJob) return; - return mlTimeSeriesExplorerService?.getAutoZoomDuration(selectedJob); - }, [mlTimeSeriesExplorerService, selectedJob]); + if (!selectedJobWrapper) return; + return mlTimeSeriesExplorerService?.getAutoZoomDuration( + selectedJobWrapper.job.analysis_config?.bucket_span + ); + }, [mlTimeSeriesExplorerService, selectedJobWrapper]); const appStateHandler = useCallback( (action: string, payload?: Zoom | ForecastId) => { @@ -176,6 +165,9 @@ const SingleMetricViewerWrapper: FC = ({ */ switch (action) { case APP_STATE_ACTION.SET_FORECAST_ID: + if (onForecastIdChange) { + onForecastIdChange(payload as ForecastId); + } setSelectedForecastId(payload as ForecastId); setZoom(undefined); break; @@ -190,9 +182,28 @@ const SingleMetricViewerWrapper: FC = ({ } }, - [setZoom, setSelectedForecastId] + [setZoom, setSelectedForecastId, onForecastIdChange] ); + const onForecastComplete = (forecastEndTimestamp?: number) => { + const { timefilter } = pluginStart.data.query.timefilter; + const currentBounds = timefilter.getActiveBounds(); + + if ( + forecastEndTimestamp && + currentBounds?.max && + currentBounds?.min && + currentBounds.max.unix() * 1000 < forecastEndTimestamp + ) { + const to = moment(forecastEndTimestamp); + timefilter.setTime({ + from: currentBounds.min, + to, + mode: 'absolute', + }); + } + }; + return ( {(resizeRef) => ( @@ -223,8 +234,7 @@ const SingleMetricViewerWrapper: FC = ({ {selectedJobId !== undefined && autoZoomDuration !== undefined && - jobsLoaded && - selectedJobId === selectedJob?.job_id && ( + selectedJobId === selectedJobWrapper?.job.job_id && ( = ({ tableSeverity={0} zoom={zoom} functionDescription={functionDescription} - selectedJob={selectedJob} + selectedJob={selectedJobWrapper.job} + selectedJobStats={selectedJobWrapper.stats} onRenderComplete={onRenderComplete} + onForecastComplete={onForecastComplete} + shouldShowForecastButton={shouldShowForecastButton} /> )} diff --git a/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx b/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx index adb3e23132f76..90f0e07f49a91 100644 --- a/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx +++ b/x-pack/plugins/ml/public/ui_actions/open_in_single_metric_viewer_action.tsx @@ -55,7 +55,7 @@ export function createOpenInSingleMetricViewerAction( if (isSingleMetricViewerEmbeddableContext(context)) { const { embeddable } = context; - const { jobIds, selectedEntities, selectedDetectorIndex } = embeddable; + const { forecastId, jobIds, selectedEntities, selectedDetectorIndex } = embeddable; return locator.getUrl( { @@ -72,6 +72,7 @@ export function createOpenInSingleMetricViewerAction( query: {}, entities: selectedEntities?.getValue(), detectorIndex: selectedDetectorIndex?.getValue(), + forecastId: forecastId?.getValue(), }, }, { absolute: true } @@ -84,8 +85,8 @@ export function createOpenInSingleMetricViewerAction( } const [{ application }] = await getStartServices(); const singleMetricViewerUrl = await this.getHref!(context); - if (singleMetricViewerUrl) { - await application.navigateToUrl(singleMetricViewerUrl!); + if (singleMetricViewerUrl !== undefined) { + await application.navigateToUrl(singleMetricViewerUrl); } }, async isCompatible(context: EmbeddableApiContext) { diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts index 5e16aa47569dc..2ce584292dab9 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/header_filters/header_filters.cy.ts @@ -27,7 +27,6 @@ describe('Service inventory - header filters', () => { specialServiceName, }) ); - cy.dismissServiceGroupsTour(); }); after(() => { diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts index 777f6f55cca0d..584e3e420eb19 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_inventory/service_inventory.cy.ts @@ -103,7 +103,6 @@ describe('Service inventory', () => { it('when selecting a different time range and clicking the update button', () => { cy.wait(mainAliasNames); - cy.getByTestSubj('apmServiceGroupsTourDismissButton').click(); cy.selectAbsoluteTimeRange( moment(timeRange.rangeFrom).subtract(5, 'm').toISOString(), diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts index 746dd56678d06..a95b6ab7d7700 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/e2e/service_map/service_map.cy.ts @@ -55,7 +55,6 @@ describe('service map', () => { it.skip('shows nodes in service map', () => { cy.visitKibana(serviceMapHref); cy.wait('@serviceMap'); - cy.getByTestSubj('apmServiceGroupsTourDismissButton').click(); prepareCanvasForScreenshot(); @@ -90,7 +89,6 @@ describe('service map', () => { it('shows empty state', () => { cy.visitKibana(serviceMapHref); // we need to dismiss the service-group call out first - cy.getByTestSubj('apmServiceGroupsTourDismissButton').click(); cy.getByTestSubj('apmUnifiedSearchBar').type('_id : foo{enter}'); cy.contains('No services available'); // search bar is still visible diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/commands.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/commands.ts index 1cfb68cdcfd57..ba1d8659e916e 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/commands.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/commands.ts @@ -133,16 +133,6 @@ Cypress.Commands.add('updateAdvancedSettings', (settings: Record { - window.localStorage.setItem( - 'apm.serviceGroupsTour', - JSON.stringify({ - createGroup: false, - editGroup: false, - }) - ); -}); - Cypress.Commands.add('withHidden', (selector, callback) => { cy.get(selector).invoke('attr', 'style', 'display: none'); callback(); diff --git a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/types.d.ts b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/types.d.ts index f562d7c79f944..5b40ce38b2c3e 100644 --- a/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/types.d.ts +++ b/x-pack/plugins/observability_solution/apm/ftr_e2e/cypress/support/types.d.ts @@ -22,7 +22,6 @@ declare namespace Cypress { expectAPIsToHaveBeenCalledWith(params: { apisIntercepted: string[]; value: string }): void; updateAdvancedSettings(settings: Record): void; getByTestSubj(selector: string): Chainable>; - dismissServiceGroupsTour(): void; withHidden(selector: string, callback: () => void): void; } } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/edit_button.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/edit_button.tsx index 0d763436318a6..c3af3d1c51902 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/edit_button.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_group_save/edit_button.tsx @@ -7,39 +7,23 @@ import { EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; -import { ServiceGroupsTour } from '../service_groups_tour'; -import { useServiceGroupsTour } from '../use_service_groups_tour'; interface Props { onClick: () => void; } export function EditButton({ onClick }: Props) { - const { tourEnabled, dismissTour } = useServiceGroupsTour('editGroup'); return ( - { + onClick(); + }} > - { - dismissTour(); - onClick(); - }} - > - {i18n.translate('xpack.apm.serviceGroups.editGroupLabel', { - defaultMessage: 'Edit group', - })} - - + {i18n.translate('xpack.apm.serviceGroups.editGroupLabel', { + defaultMessage: 'Edit group', + })} + ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_button_group.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_button_group.tsx index e1b801d0eadcb..3f023c24b7581 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_button_group.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_button_group.tsx @@ -8,8 +8,6 @@ import { EuiButtonGroup } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; import { useHistory } from 'react-router-dom'; -import { ServiceGroupsTour } from './service_groups_tour'; -import { useServiceGroupsTour } from './use_service_groups_tour'; const buttonGroupOptions = { allServices: { @@ -40,32 +38,18 @@ export function ServiceGroupsButtonGroup({ selectedNavButton: SelectedNavButton; }) { const history = useHistory(); - const { tourEnabled, dismissTour } = useServiceGroupsTour('createGroup'); return ( - { + const { pathname } = buttonGroupOptions[id as SelectedNavButton]; + history.push({ pathname }); + }} + legend={i18n.translate('xpack.apm.servicesGroups.buttonGroup.legend', { + defaultMessage: 'View all services or service groups', })} - content={i18n.translate('xpack.apm.serviceGroups.tour.createGroups.content', { - defaultMessage: - 'Group services together to build curated inventory views that remove noise and simplify investigations across services. Groups are Kibana space-specific and available for any users with appropriate access.', - })} - > - { - const { pathname } = buttonGroupOptions[id as SelectedNavButton]; - history.push({ pathname }); - }} - legend={i18n.translate('xpack.apm.servicesGroups.buttonGroup.legend', { - defaultMessage: 'View all services or service groups', - })} - /> - + /> ); } diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_tour.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_tour.tsx deleted file mode 100644 index 26473f2fae608..0000000000000 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/service_groups_tour.tsx +++ /dev/null @@ -1,84 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - EuiButtonEmpty, - EuiSpacer, - EuiText, - EuiTourStep, - PopoverAnchorPosition, -} from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { FormattedMessage } from '@kbn/i18n-react'; -import React from 'react'; -import { ElasticDocsLink } from '../../shared/links/elastic_docs_link'; - -export type TourType = 'createGroup' | 'editGroup'; - -interface Props { - title: string; - content: string; - tourEnabled: boolean; - dismissTour: () => void; - anchorPosition?: PopoverAnchorPosition; - children: React.ReactElement; -} - -export function ServiceGroupsTour({ - tourEnabled, - dismissTour, - title, - content, - anchorPosition, - children, -}: Props) { - return ( - - {content} - - - {i18n.translate('xpack.apm.serviceGroups.tour.content.link.docs', { - defaultMessage: 'docs', - })} - - ), - }} - /> - - } - isStepOpen={tourEnabled} - onFinish={() => {}} - maxWidth={300} - minWidth={300} - step={1} - stepsTotal={1} - title={title} - anchorPosition={anchorPosition} - footerAction={ - - {i18n.translate('xpack.apm.serviceGroups.tour.dismiss', { - defaultMessage: 'Dismiss', - })} - - } - > - {children} - - ); -} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/use_service_groups_tour.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/use_service_groups_tour.tsx deleted file mode 100644 index 6a91d11d9325d..0000000000000 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_groups/use_service_groups_tour.tsx +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { useLocalStorage } from '../../../hooks/use_local_storage'; -import { TourType } from './service_groups_tour'; - -const INITIAL_STATE: Record = { - createGroup: true, - editGroup: true, -}; - -export function useServiceGroupsTour(type: TourType) { - const [tourEnabled, setTourEnabled] = useLocalStorage('apm.serviceGroupsTour', INITIAL_STATE); - - return { - tourEnabled: tourEnabled[type], - dismissTour: () => - setTourEnabled({ - ...tourEnabled, - [type]: false, - }), - }; -} diff --git a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/no_entities_empty_state.tsx b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/no_entities_empty_state.tsx index 6e7296aa2eba2..af97ea3093aaf 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/no_entities_empty_state.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/app/service_inventory/multi_signal_inventory/table/no_entities_empty_state.tsx @@ -18,10 +18,8 @@ import { } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; import React from 'react'; - import { dashboardsLight } from '@kbn/shared-svg'; import useEffectOnce from 'react-use/lib/useEffectOnce'; -import { useApmPluginContext } from '../../../../../context/apm_plugin/use_apm_plugin_context'; import { useKibana } from '../../../../../context/kibana_context/use_kibana'; import { useLocalStorage } from '../../../../../hooks/use_local_storage'; import { ApmPluginStartDeps, ApmServices } from '../../../../../plugin'; @@ -33,9 +31,7 @@ import { } from '../../../../shared/add_data_buttons/buttons'; export function NoEntitiesEmptyState() { - const { core } = useApmPluginContext(); const { services } = useKibana(); - const { basePath } = core.http; const [userHasDismissedCallout, setUserHasDismissedCallout] = useLocalStorage( 'apm.uiNewExperienceCallout', false @@ -104,7 +100,6 @@ export function NoEntitiesEmptyState() { }} /> { reportButtonClick('collect_new_service_logs'); }} diff --git a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx index 5d2bb3e09e657..edee8c419eb33 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/routing/app_root/apm_header_action_menu/add_data_context_menu.tsx @@ -76,7 +76,6 @@ export function AddDataContextMenu() { name: collectServiceLogs.name, href: basePath.prepend(collectServiceLogs.link), 'data-test-subj': 'apmAddDataCollectServiceLogs', - target: '_blank', onClick: () => { reportButtonClick('collect_new_service_logs'); }, diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/add_data_buttons/buttons.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/add_data_buttons/buttons.tsx index 9c57947bccdb9..b11e0d6e8e69d 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/add_data_buttons/buttons.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/add_data_buttons/buttons.tsx @@ -7,7 +7,6 @@ import React from 'react'; import { EuiButton } from '@elastic/eui'; import { i18n } from '@kbn/i18n'; -import { IBasePath } from '@kbn/core/public'; import { useKibana } from '../../../context/kibana_context/use_kibana'; import { useApmPluginContext } from '../../../context/apm_plugin/use_apm_plugin_context'; @@ -29,7 +28,7 @@ export const collectServiceLogs = { name: i18n.translate('xpack.apm.collect.service.logs.button', { defaultMessage: 'Collect new service logs', }), - link: '/app/observabilityOnboarding/?category=logs', + link: '/app/observabilityOnboarding/customLogs/?category=logs', }; export function AddApmData({ @@ -68,15 +67,15 @@ export function AssociateServiceLogs({ onClick }: { onClick?: () => void }) { ); } -export function CollectServiceLogs({ - basePath, - onClick, -}: { - basePath: IBasePath; - onClick?: () => void; -}) { +export function CollectServiceLogs({ onClick }: { onClick?: () => void }) { + const { core } = useApmPluginContext(); + const { basePath } = core.http; + const { + application: { navigateToUrl }, + } = useKibana().services; + function handleClick() { - window.open(basePath.prepend(collectServiceLogs.link), '_blank'); + navigateToUrl(basePath.prepend(collectServiceLogs.link)); onClick?.(); } return ( diff --git a/x-pack/plugins/observability_solution/apm/public/components/shared/entity_enablement/welcome_modal.tsx b/x-pack/plugins/observability_solution/apm/public/components/shared/entity_enablement/welcome_modal.tsx index 1bfab81231ea0..deba472b401c5 100644 --- a/x-pack/plugins/observability_solution/apm/public/components/shared/entity_enablement/welcome_modal.tsx +++ b/x-pack/plugins/observability_solution/apm/public/components/shared/entity_enablement/welcome_modal.tsx @@ -95,7 +95,7 @@ export function Welcome({

{i18n.translate('xpack.apm.welcome.body', { defaultMessage: - 'You can now see services detected from logs alongside services instrumented with APM our new service inventory so you can view all of your services in a single place.', + 'You can now see services detected from logs alongside your APM-instrumented services in a single inventory so you can view all of your services in one place.', })}

diff --git a/x-pack/plugins/observability_solution/entity_manager/server/lib/utils.ts b/x-pack/plugins/observability_solution/entity_manager/server/lib/utils.ts index d948ac28bda31..d1d76e147efb0 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/lib/utils.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/lib/utils.ts @@ -5,37 +5,21 @@ * 2.0. */ -import moment from 'moment'; +import { ElasticsearchClient } from '@kbn/core-elasticsearch-server'; +import { SavedObjectsClientContract } from '@kbn/core-saved-objects-api-server'; +import { getFakeKibanaRequest } from '@kbn/security-plugin/server/authentication/api_keys/fake_kibana_request'; +import { EntityManagerServerSetup } from '../types'; +import { EntityDiscoveryAPIKey } from './auth/api_key/api_key'; -export function toArray(maybeArray: T | T[] | undefined): T[] { - if (!maybeArray) { - return []; - } - if (Array.isArray(maybeArray)) { - return maybeArray; - } - return [maybeArray]; -} - -export const isValidRange = (from: string, to: string): boolean => { - if (moment(from).isAfter(to)) { - return false; - } - return true; +export const getClientsFromAPIKey = ({ + apiKey, + server, +}: { + apiKey: EntityDiscoveryAPIKey; + server: EntityManagerServerSetup; +}): { esClient: ElasticsearchClient; soClient: SavedObjectsClientContract } => { + const fakeRequest = getFakeKibanaRequest({ id: apiKey.id, api_key: apiKey.apiKey }); + const esClient = server.core.elasticsearch.client.asScoped(fakeRequest).asCurrentUser; + const soClient = server.core.savedObjects.getScopedClient(fakeRequest); + return { esClient, soClient }; }; - -export function isStringOrNonEmptyArray( - value: string | string[] | undefined -): value is string | string[] { - if (typeof value === 'undefined') { - return false; - } - if (Array.isArray(value) && value.length === 0) { - return false; - } - return true; -} - -export function extractFieldValue(maybeArray: T | T[] | undefined): T { - return toArray(maybeArray)[0]; -} diff --git a/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/check.ts b/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/check.ts index 8ee8de3751ab2..23343026e3332 100644 --- a/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/check.ts +++ b/x-pack/plugins/observability_solution/entity_manager/server/routes/enablement/check.ts @@ -16,6 +16,7 @@ import { } from '../../../common/errors'; import { findEntityDefinitions } from '../../lib/entities/find_entity_definition'; import { builtInDefinitions } from '../../lib/entities/built_in'; +import { getClientsFromAPIKey } from '../../lib/utils'; export function checkEntityDiscoveryEnabledRoute({ router, @@ -43,8 +44,7 @@ export function checkEntityDiscoveryEnabledRoute { diff --git a/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts b/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts index 24d27a2394570..03114642146ff 100644 --- a/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts +++ b/x-pack/plugins/observability_solution/infra/common/http_api/infra/get_infra_metrics.ts @@ -48,7 +48,6 @@ export const GetInfraMetricsRequestBodyPayloadRT = rt.intersection([ type: rt.literal('host'), limit: rt.union([inRangeRt(1, 500), createLiteralValueFromUndefinedRT(20)]), metrics: rt.array(rt.type({ type: InfraMetricTypeRT })), - sourceId: rt.string, range: RangeRT, }), ]); diff --git a/x-pack/plugins/observability_solution/infra/common/metrics_sources/get_has_data.ts b/x-pack/plugins/observability_solution/infra/common/metrics_sources/get_has_data.ts new file mode 100644 index 0000000000000..0ef9e5b3af20d --- /dev/null +++ b/x-pack/plugins/observability_solution/infra/common/metrics_sources/get_has_data.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import * as rt from 'io-ts'; + +export const getHasDataQueryParamsRT = rt.partial({ + // Integrations `event.module` value + modules: rt.union([rt.string, rt.array(rt.string)]), +}); + +export const getHasDataResponseRT = rt.partial({ + hasData: rt.boolean, +}); + +export type GetHasDataQueryParams = rt.TypeOf; +export type GetHasDataResponse = rt.TypeOf; diff --git a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts index 280cb463a5bce..700046a9f936c 100644 --- a/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts +++ b/x-pack/plugins/observability_solution/infra/public/pages/metrics/hosts/hooks/use_hosts_view.ts @@ -17,7 +17,6 @@ import createContainer from 'constate'; import { BoolQuery } from '@kbn/es-query'; import { isPending, useFetcher } from '../../../../hooks/use_fetcher'; import { useKibanaContextForPlugin } from '../../../../hooks/use_kibana'; -import { useSourceContext } from '../../../../containers/metrics_source'; import { useUnifiedSearchContext } from './use_unified_search'; import { GetInfraMetricsRequestBodyPayload, @@ -39,7 +38,6 @@ const HOST_TABLE_METRICS: Array<{ type: InfraAssetMetricType }> = [ const BASE_INFRA_METRICS_PATH = '/api/metrics/infra'; export const useHostsView = () => { - const { sourceId } = useSourceContext(); const { services: { telemetry }, } = useKibanaContextForPlugin(); @@ -50,10 +48,9 @@ export const useHostsView = () => { createInfraMetricsRequest({ dateRange: parsedDateRange, esQuery: buildQuery(), - sourceId, limit: searchCriteria.limit, }), - [buildQuery, parsedDateRange, sourceId, searchCriteria.limit] + [buildQuery, parsedDateRange, searchCriteria.limit] ); const { data, error, status } = useFetcher( @@ -94,12 +91,10 @@ export const [HostsViewProvider, useHostsViewContext] = HostsView; const createInfraMetricsRequest = ({ esQuery, - sourceId, dateRange, limit, }: { esQuery: { bool: BoolQuery }; - sourceId: string; dateRange: StringDateRange; limit: number; }): GetInfraMetricsRequestBodyPayload => ({ @@ -111,5 +106,4 @@ const createInfraMetricsRequest = ({ }, metrics: HOST_TABLE_METRICS, limit, - sourceId, }); diff --git a/x-pack/plugins/observability_solution/infra/server/features.ts b/x-pack/plugins/observability_solution/infra/server/features.ts index 68fe2503ace14..6d209833fcd77 100644 --- a/x-pack/plugins/observability_solution/infra/server/features.ts +++ b/x-pack/plugins/observability_solution/infra/server/features.ts @@ -33,7 +33,7 @@ const metricRuleTypes = [ export const METRICS_FEATURE = { id: METRICS_FEATURE_ID, name: i18n.translate('xpack.infra.featureRegistry.linkInfrastructureTitle', { - defaultMessage: 'Metrics', + defaultMessage: 'Infrastructure', }), order: 800, category: DEFAULT_APP_CATEGORIES.observability, diff --git a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts index 8e8934fb7b3f0..298cf44ec85b1 100644 --- a/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts +++ b/x-pack/plugins/observability_solution/infra/server/lib/helpers/get_infra_metrics_client.ts @@ -6,8 +6,8 @@ */ import type { ESSearchRequest, InferSearchResponseOf } from '@kbn/es-types'; import type { KibanaRequest } from '@kbn/core/server'; +import { MetricsDataClient } from '@kbn/metrics-data-access-plugin/server'; import type { InfraPluginRequestHandlerContext } from '../../types'; -import { InfraSources } from '../sources'; import { KibanaFramework } from '../adapters/framework/kibana_framework_adapter'; type RequiredParams = Omit & { @@ -20,20 +20,21 @@ type RequiredParams = Omit & { export type InfraMetricsClient = Awaited>; export async function getInfraMetricsClient({ - sourceId, framework, - infraSources, + metricsDataAccess, requestContext, request, }: { - sourceId: string; framework: KibanaFramework; - infraSources: InfraSources; + metricsDataAccess: MetricsDataClient; requestContext: InfraPluginRequestHandlerContext; request?: KibanaRequest; }) { - const soClient = (await requestContext.core).savedObjects.getClient(); - const source = await infraSources.getSourceConfiguration(soClient, sourceId); + const coreContext = await requestContext.core; + const savedObjectsClient = coreContext.savedObjects.client; + const indices = await metricsDataAccess.getMetricIndices({ + savedObjectsClient, + }); return { search( @@ -44,7 +45,7 @@ export async function getInfraMetricsClient({ 'search', { ...searchParams, - index: source.configuration.metricAlias, + index: indices, }, request ) as Promise; diff --git a/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts index d6b4ecf18c642..c9d7d5676aab4 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/infra/index.ts @@ -47,9 +47,8 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { const infraMetricsClient = await getInfraMetricsClient({ framework, request, - infraSources: libs.sources, + metricsDataAccess: libs.metricsClient, requestContext, - sourceId: params.sourceId, }); const alertsClient = await getInfraAlertsClient({ @@ -102,15 +101,14 @@ export const initInfraAssetRoutes = (libs: InfraBackendLibs) => { const body: GetInfraAssetCountRequestBodyPayload = request.body; const params: GetInfraAssetCountRequestParamsPayload = request.params; const { assetType } = params; - const { query, from, to, sourceId } = body; + const { query, from, to } = body; try { const infraMetricsClient = await getInfraMetricsClient({ framework, request, - infraSources: libs.sources, + metricsDataAccess: libs.metricsClient, requestContext, - sourceId, }); const assetCount = await getHostsCount({ diff --git a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts index f325b0c6b4560..8183611a7a058 100644 --- a/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts +++ b/x-pack/plugins/observability_solution/infra/server/routes/metrics_sources/index.ts @@ -8,6 +8,13 @@ import { schema } from '@kbn/config-schema'; import Boom from '@hapi/boom'; import { createRouteValidationFunction } from '@kbn/io-ts-utils'; +import { termsQuery } from '@kbn/observability-plugin/server'; +import { castArray } from 'lodash'; +import { EVENT_MODULE, METRICSET_MODULE } from '../../../common/constants'; +import { + getHasDataQueryParamsRT, + getHasDataResponseRT, +} from '../../../common/metrics_sources/get_has_data'; import { InfraBackendLibs } from '../../lib/infra_types'; import { hasData } from '../../lib/sources/has_data'; import { createSearchClient } from '../../lib/create_search_client'; @@ -19,6 +26,7 @@ import { } from '../../../common/metrics_sources'; import { InfraSource, InfraSourceIndexField } from '../../lib/sources'; import { InfraPluginRequestHandlerContext } from '../../types'; +import { getInfraMetricsClient } from '../../lib/helpers/get_infra_metrics_client'; const defaultStatus = { indexFields: [], @@ -26,6 +34,8 @@ const defaultStatus = { remoteClustersExist: false, }; +const MAX_MODULES = 5; + export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => { const { framework, logger } = libs; @@ -204,6 +214,75 @@ export const initMetricsSourceConfigurationRoutes = (libs: InfraBackendLibs) => }); } ); + + framework.registerRoute( + { + method: 'get', + path: '/api/metrics/source/hasData', + validate: { + query: createRouteValidationFunction(getHasDataQueryParamsRT), + }, + }, + async (requestContext, request, response) => { + try { + const modules = castArray(request.query.modules); + + if (modules.length > MAX_MODULES) { + throw Boom.badRequest( + `'modules' size is greater than maximum of ${MAX_MODULES} allowed.` + ); + } + + const infraMetricsClient = await getInfraMetricsClient({ + framework, + request, + metricsDataAccess: libs.metricsClient, + requestContext, + }); + + const results = await infraMetricsClient.search({ + allow_no_indices: true, + ignore_unavailable: true, + body: { + track_total_hits: true, + terminate_after: 1, + size: 0, + ...(modules.length > 0 + ? { + query: { + bool: { + should: [ + ...termsQuery(EVENT_MODULE, ...modules), + ...termsQuery(METRICSET_MODULE, ...modules), + ], + minimum_should_match: 1, + }, + }, + } + : {}), + }, + }); + + return response.ok({ + body: getHasDataResponseRT.encode({ hasData: results.hits.total.value !== 0 }), + }); + } catch (err) { + if (Boom.isBoom(err)) { + return response.customError({ + statusCode: err.output.statusCode, + body: { message: err.output.payload.message }, + }); + } + + return response.customError({ + statusCode: err.statusCode ?? 500, + body: { + message: err.message ?? 'An unexpected error occurred', + }, + }); + } + } + ); }; const isFulfilled = ( diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/add_note_ui/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/add_note_ui/index.tsx index 869724efa2690..62c7f91a25058 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/components/add_note_ui/index.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/components/add_note_ui/index.tsx @@ -4,7 +4,6 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import type { AuthenticatedUser } from '@kbn/core/public'; import type { GlobalWidgetParameters, OnWidgetAdd } from '@kbn/investigate-plugin/public'; import React from 'react'; @@ -16,11 +15,5 @@ type AddWidgetUIProps = { } & GlobalWidgetParameters; export function AddNoteUI({ user, onWidgetAdd }: AddWidgetUIProps) { - return ( - - - - - - ); + return ; } diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_page_template.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_page_template.tsx deleted file mode 100644 index 8e9d731366e43..0000000000000 --- a/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_page_template.tsx +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { css } from '@emotion/css'; -import React from 'react'; -import { useKibana } from '../hooks/use_kibana'; - -const pageSectionContentClassName = css` - width: 100%; - display: flex; - flex-grow: 1; - max-block-size: calc(100vh - 96px); -`; - -export function InvestigatePageTemplate({ children }: { children: React.ReactNode }) { - const { - dependencies: { - start: { observabilityShared }, - }, - } = useKibana(); - - const { PageTemplate } = observabilityShared.navigation; - - return ( - - ); -} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_search_bar/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_search_bar/index.tsx new file mode 100644 index 0000000000000..229c0aa40926d --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_search_bar/index.tsx @@ -0,0 +1,129 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import { css } from '@emotion/css'; +import type { TimeRange } from '@kbn/es-query'; +import { SearchBar } from '@kbn/unified-search-plugin/public'; +import React, { useEffect, useRef, useState } from 'react'; +import { useKibana } from '../../hooks/use_kibana'; + +const parentClassName = css` + width: 100%; +`; + +interface Props { + rangeFrom?: string; + rangeTo?: string; + onQuerySubmit: (payload: { dateRange: TimeRange }, isUpdate?: boolean) => void; + onRefresh?: Required>['onRefresh']; + onFocus?: () => void; + onBlur?: () => void; + showSubmitButton?: boolean; +} + +export function InvestigateSearchBar({ + rangeFrom, + rangeTo, + onQuerySubmit, + onRefresh, + onFocus, + onBlur, + showSubmitButton = true, +}: Props) { + const { + dependencies: { + start: { unifiedSearch }, + }, + } = useKibana(); + const [element, setElement] = useState(null); + + const onBlurRef = useRef(onBlur); + onBlurRef.current = onBlur; + + const onFocusRef = useRef(onFocus); + onFocusRef.current = onFocus; + + useEffect(() => { + if (!element) { + return; + } + + let inFocus = false; + + function updateFocus(activeElement: Element | null | undefined) { + const thisElementContainsActiveElement = activeElement && element?.contains(activeElement); + + let nextInFocus = Boolean(thisElementContainsActiveElement); + + if (!nextInFocus) { + const popoverContent = document.querySelector( + '[data-test-subj=superDatePickerQuickMenu], .euiDatePopoverContent, .kbnTypeahead' + ); + + nextInFocus = Boolean( + activeElement && + activeElement !== document.body && + (activeElement === popoverContent || + activeElement?.contains(popoverContent) || + popoverContent?.contains(activeElement)) + ); + } + + if (inFocus !== nextInFocus) { + inFocus = Boolean(nextInFocus); + + if (inFocus) { + onFocusRef.current?.(); + } else { + onBlurRef.current?.(); + } + } + } + + function captureFocus() { + updateFocus(document.activeElement); + } + + function captureBlur(event: FocusEvent) { + updateFocus(event.relatedTarget as Element | null); + } + + window.addEventListener('focus', captureFocus, true); + + window.addEventListener('blur', captureBlur, true); + + return () => { + window.removeEventListener('focus', captureFocus); + window.removeEventListener('blur', captureBlur); + }; + }, [element]); + + return ( +
{ + setElement(nextElement); + }} + > + { + onQuerySubmit({ dateRange }); + }} + showQueryInput={false} + showFilterBar={false} + showQueryMenu={false} + showDatePicker + showSubmitButton={showSubmitButton} + dateRangeFrom={rangeFrom} + dateRangeTo={rangeTo} + onRefresh={onRefresh} + displayStyle="inPage" + disableQueryLanguageSwitcher + /> +
+ ); +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_view/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_view/index.tsx index 910dcde7a6cee..a562c3647fcd4 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_view/index.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/components/investigate_view/index.tsx @@ -4,9 +4,8 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import datemath from '@elastic/datemath'; import { EuiFlexGroup, EuiFlexItem, EuiLoadingSpinner } from '@elastic/eui'; -import { css } from '@emotion/css'; -import { i18n } from '@kbn/i18n'; import type { InvestigateWidget, InvestigateWidgetCreate } from '@kbn/investigate-plugin/public'; import { DATE_FORMAT_ID } from '@kbn/management-settings-ids'; import { AuthenticatedUser } from '@kbn/security-plugin/common'; @@ -18,28 +17,9 @@ import { useKibana } from '../../hooks/use_kibana'; import { getOverridesFromGlobalParameters } from '../../utils/get_overrides_from_global_parameters'; import { AddNoteUI } from '../add_note_ui'; import { AddObservationUI } from '../add_observation_ui'; +import { InvestigateSearchBar } from '../investigate_search_bar'; import { InvestigateWidgetGrid } from '../investigate_widget_grid'; -const containerClassName = css` - overflow: auto; - padding: 24px 24px 24px 24px; -`; - -const scrollContainerClassName = css` - min-width: 1px; -`; - -const gridContainerClassName = css` - position: relative; -`; - -const sideBarClassName = css` - width: 240px; - position: sticky; - top: 0; - padding: 0px 12px 32px 12px; -`; - function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { const { core: { uiSettings }, @@ -47,10 +27,9 @@ function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { start: { investigate }, }, } = useKibana(); - const widgetDefinitions = useMemo(() => investigate.getWidgetDefinitions(), [investigate]); - const [range, setRange] = useDateRange(); + const [searchBarFocused, setSearchBarFocused] = useState(false); const { addItem, @@ -61,6 +40,7 @@ function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { investigation, lockItem, setItemParameters, + setGlobalParameters, unlockItem, revision, } = investigate.useInvestigation({ @@ -76,7 +56,6 @@ function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { }; const createWidgetRef = useRef(createWidget); - createWidgetRef.current = createWidget; useEffect(() => { @@ -138,18 +117,41 @@ function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { }); }, [revision, widgetDefinitions, uiSettings]); - const [searchBarFocused] = useState(false); - if (!investigation || !revision || !gridItems) { return ; } return ( - - - + + + - + + { + const nextDateRange = { + from: datemath.parse(dateRange.from)!.toISOString(), + to: datemath.parse(dateRange.to)!.toISOString(), + }; + await setGlobalParameters({ + ...revision.parameters, + timeRange: nextDateRange, + }); + + setRange(nextDateRange); + }} + onFocus={() => { + setSearchBarFocused(true); + }} + onBlur={() => { + setSearchBarFocused(false); + }} + /> + + + { @@ -189,17 +191,8 @@ function InvestigateViewWithUser({ user }: { user: AuthenticatedUser }) { }} /> - - { - return createWidgetRef.current(widget); - }} - /> - + - - {i18n.translate( - 'xpack.investigateApp.investigateViewWithUser.placeholderForRightSidebarFlexItemLabel', - { defaultMessage: 'placeholder for right sidebar' } - )} + + { + return createWidgetRef.current(widget); + }} + /> ); diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/note_widget_control/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/note_widget_control/index.tsx index 7739058ce3159..f94f43f335942 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/components/note_widget_control/index.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/components/note_widget_control/index.tsx @@ -5,13 +5,13 @@ * 2.0. */ -import React, { useState } from 'react'; -import { InvestigateWidgetCreate } from '@kbn/investigate-plugin/common'; -import { EuiButtonIcon, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; +import { EuiButton, EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; import type { AuthenticatedUser } from '@kbn/core/public'; -import { ResizableTextInput } from '../resizable_text_input'; +import { i18n } from '@kbn/i18n'; +import { InvestigateWidgetCreate } from '@kbn/investigate-plugin/common'; +import React, { useState } from 'react'; import { createNoteWidget } from '../../widgets/note_widget/create_note_widget'; +import { ResizableTextInput } from '../resizable_text_input'; interface NoteWidgetControlProps { user: Pick; @@ -46,8 +46,8 @@ export function NoteWidgetControl({ user, onWidgetAdd }: NoteWidgetControlProps) } return ( - - + + - { submit(); }} - /> + > + {i18n.translate('xpack.investigateApp.noteWidgetControl.addButtonLabel', { + defaultMessage: 'Add', + })} + ); diff --git a/x-pack/plugins/observability_solution/investigate_app/public/components/resizable_text_input/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/components/resizable_text_input/index.tsx index c0c4e7e3d1cfe..3d19ef214247c 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/components/resizable_text_input/index.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/components/resizable_text_input/index.tsx @@ -65,7 +65,7 @@ export function ResizableTextInput({ disabled, value, onChange, onSubmit, placeh inputRef={textAreaRef} placeholder={placeholder} resize="vertical" - rows={1} + rows={4} value={value} onChange={handleChange} onKeyDown={(event) => { diff --git a/x-pack/plugins/observability_solution/investigate_app/public/pages/details/index.tsx b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/index.tsx new file mode 100644 index 0000000000000..e749799749321 --- /dev/null +++ b/x-pack/plugins/observability_solution/investigate_app/public/pages/details/index.tsx @@ -0,0 +1,41 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButton } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { InvestigateView } from '../../components/investigate_view'; +import { useKibana } from '../../hooks/use_kibana'; + +export function InvestigateDetailsPage() { + const { + dependencies: { + start: { observabilityShared }, + }, + } = useKibana(); + + const ObservabilityPageTemplate = observabilityShared.navigation.PageTemplate; + + return ( + + {i18n.translate('xpack.investigateApp.investigateDetailsPage.escalateButtonLabel', { + defaultMessage: 'Escalate', + })} + , + ], + }} + > + + + ); +} diff --git a/x-pack/plugins/observability_solution/investigate_app/public/routes/config.tsx b/x-pack/plugins/observability_solution/investigate_app/public/routes/config.tsx index ca68dde72b0b8..fa1ee44052b1a 100644 --- a/x-pack/plugins/observability_solution/investigate_app/public/routes/config.tsx +++ b/x-pack/plugins/observability_solution/investigate_app/public/routes/config.tsx @@ -4,50 +4,40 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ +import { createRouter } from '@kbn/typed-react-router-config'; import * as t from 'io-ts'; -import { createRouter, Outlet } from '@kbn/typed-react-router-config'; import React from 'react'; import { Redirect } from 'react-router-dom'; -import { InvestigatePageTemplate } from '../components/investigate_page_template'; -import { InvestigateView } from '../components/investigate_view'; +import { InvestigateDetailsPage } from '../pages/details'; /** * The array of route definitions to be used when the application * creates the routes. */ const investigateRoutes = { - '/': { - element: ( - - - - ), - children: { - '/new': { - element: , - params: t.partial({ - query: t.partial({ - revision: t.string, - }), + '/new': { + element: , + params: t.partial({ + query: t.partial({ + revision: t.string, + }), + }), + }, + '/{id}': { + element: , + params: t.intersection([ + t.type({ + path: t.type({ id: t.string }), + }), + t.partial({ + query: t.partial({ + revision: t.string, }), - }, - '/{id}': { - element: , - params: t.intersection([ - t.type({ - path: t.type({ id: t.string }), - }), - t.partial({ - query: t.partial({ - revision: t.string, - }), - }), - ]), - }, - '/': { - element: , - }, - }, + }), + ]), + }, + '/': { + element: , }, }; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/kibana.jsonc b/x-pack/plugins/observability_solution/observability_onboarding/kibana.jsonc index f9db6258c3cda..fd4e955b9bd95 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/kibana.jsonc +++ b/x-pack/plugins/observability_solution/observability_onboarding/kibana.jsonc @@ -1,18 +1,12 @@ { "type": "plugin", "id": "@kbn/observability-onboarding-plugin", - "owner": [ - "@elastic/obs-ux-logs-team", - "@elastic/obs-ux-onboarding-team" - ], + "owner": ["@elastic/obs-ux-logs-team", "@elastic/obs-ux-onboarding-team"], "plugin": { "id": "observabilityOnboarding", "server": true, "browser": true, - "configPath": [ - "xpack", - "observability_onboarding" - ], + "configPath": ["xpack", "observability_onboarding"], "requiredPlugins": [ "data", "observability", @@ -20,19 +14,10 @@ "discover", "share", "fleet", - "security", - "customIntegrations", - ], - "optionalPlugins": [ - "cloud", - "cloudExperiments", - "usageCollection" - ], - "requiredBundles": [ - "kibanaReact" + "customIntegrations" ], - "extraPublicDirs": [ - "common" - ] + "optionalPlugins": ["cloud", "cloudExperiments", "usageCollection"], + "requiredBundles": ["kibanaReact"], + "extraPublicDirs": ["common"] } -} \ No newline at end of file +} diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh index 74d7e4266eac4..310c241b1e390 100755 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/assets/auto_detect.sh @@ -148,6 +148,7 @@ update_step_progress() { download_elastic_agent() { local download_url="https://artifacts.elastic.co/downloads/beats/elastic-agent/${elastic_agent_artifact_name}.tar.gz" + rm -rf "./${elastic_agent_artifact_name}" "./${elastic_agent_artifact_name}.tar.gz" curl -L -O $download_url --silent --fail if [ "$?" -eq 0 ]; then @@ -314,13 +315,18 @@ read_open_log_file_list() { # Filtering by the exclude patterns while IFS= read -r line; do - if ! grep -qE "$(IFS="|"; echo "${exclude_patterns[*]}")" <<< "$line"; then - unknown_log_file_path_list_string+="$line\n" - fi + if ! grep -qE "$(IFS="|"; echo "${exclude_patterns[*]}")" <<< "$line"; then + unknown_log_file_path_list_string+="$line\n" + fi done <<< "$list" } detect_known_integrations() { + # Always suggesting to install System integartion. + # Even when there is no system logs on the host, + # System integration will still be able to to collect metrics. + known_integrations_list_string+="system"$'\n' + local nginx_patterns=( "/var/log/nginx/access.log*" "/var/log/nginx/error.log*" @@ -353,22 +359,6 @@ detect_known_integrations() { elif compgen -G "/var/lib/docker/containers/*/*-json.log" > /dev/null; then known_integrations_list_string+="docker"$'\n' fi - - local system_patterns=( - "/var/log/messages*" - "/var/log/syslog*" - "/var/log/system*" - "/var/log/auth.log*" - "/var/log/secure*" - "/var/log/system.log*" - ) - - for pattern in "${system_patterns[@]}"; do - if compgen -G "$pattern" > /dev/null; then - known_integrations_list_string+="system"$'\n' - break - fi - done } known_integration_title() { @@ -384,7 +374,7 @@ known_integration_title() { echo "Docker Container Logs" ;; "system") - echo "System Logs" + echo "System Logs And Metrics" ;; *) echo "Unknown" @@ -394,6 +384,10 @@ known_integration_title() { build_unknown_log_file_patterns() { while IFS= read -r log_file_path; do + if [ -z "$log_file_path" ]; then + continue + fi + unknown_log_file_pattern_list_string+="$(dirname "$log_file_path")/*.log\n" done <<< "$(echo -e $unknown_log_file_path_list_string)" diff --git a/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts b/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts index 2e3dfb201b35e..abc3e5af26765 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/public/plugin.ts @@ -23,7 +23,6 @@ import { } from '@kbn/core/public'; import type { CloudExperimentsPluginStart } from '@kbn/cloud-experiments-plugin/common'; import { DataPublicPluginSetup, DataPublicPluginStart } from '@kbn/data-plugin/public'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/public'; import { SharePluginSetup, SharePluginStart } from '@kbn/share-plugin/public'; import { DiscoverSetup, DiscoverStart } from '@kbn/discover-plugin/public'; import { FleetSetup, FleetStart } from '@kbn/fleet-plugin/public'; @@ -46,7 +45,6 @@ export interface ObservabilityOnboardingPluginSetupDeps { discover: DiscoverSetup; share: SharePluginSetup; fleet: FleetSetup; - security: SecurityPluginSetup; cloud?: CloudSetup; usageCollection?: UsageCollectionSetup; } @@ -58,7 +56,6 @@ export interface ObservabilityOnboardingPluginStartDeps { discover: DiscoverStart; share: SharePluginStart; fleet: FleetStart; - security: SecurityPluginStart; cloud?: CloudStart; usageCollection?: UsageCollectionStart; cloudExperiments?: CloudExperimentsPluginStart; diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts index 80f0159f66594..d035a7fa02716 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/routes/flow/route.ts @@ -218,7 +218,6 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({ } const fleetPluginStart = await plugins.fleet.start(); - const securityPluginStart = await plugins.security.start(); const [onboardingFlow, ingestApiKey, installApiKey, elasticAgentVersion] = await Promise.all([ saveObservabilityOnboardingFlow({ @@ -230,10 +229,9 @@ const createFlowRoute = createObservabilityOnboardingServerRoute({ }, }), createShipperApiKey(client.asCurrentUser, `onboarding_ingest_${name}`), - securityPluginStart.authc.apiKeys.create( - request, - createInstallApiKey(`onboarding_install_${name}`) - ), + ( + await context.resolve(['core']) + ).core.security.authc.apiKeys.create(createInstallApiKey(`onboarding_install_${name}`)), getAgentVersion(fleetPluginStart, kibanaVersion), ]); diff --git a/x-pack/plugins/observability_solution/observability_onboarding/server/types.ts b/x-pack/plugins/observability_solution/observability_onboarding/server/types.ts index 0e603863e0a00..92f65cbe1b7d6 100644 --- a/x-pack/plugins/observability_solution/observability_onboarding/server/types.ts +++ b/x-pack/plugins/observability_solution/observability_onboarding/server/types.ts @@ -12,7 +12,6 @@ import { PluginStart as DataPluginStart, } from '@kbn/data-plugin/server'; import { FleetSetupContract, FleetStartContract } from '@kbn/fleet-plugin/server'; -import { SecurityPluginSetup, SecurityPluginStart } from '@kbn/security-plugin/server'; import { ObservabilityPluginSetup } from '@kbn/observability-plugin/server'; import { UsageCollectionSetup } from '@kbn/usage-collection-plugin/server'; import { @@ -26,7 +25,6 @@ export interface ObservabilityOnboardingPluginSetupDependencies { cloud: CloudSetup; usageCollection: UsageCollectionSetup; fleet: FleetSetupContract; - security: SecurityPluginSetup; customIntegrations: CustomIntegrationsPluginSetup; } @@ -36,7 +34,6 @@ export interface ObservabilityOnboardingPluginStartDependencies { cloud: CloudStart; usageCollection: undefined; fleet: FleetStartContract; - security: SecurityPluginStart; customIntegrations: CustomIntegrationsPluginStart; } diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts new file mode 100644 index 0000000000000..ff282745c8fc2 --- /dev/null +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/compatibility_check.ts @@ -0,0 +1,15 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { apiIsPresentationContainer, PresentationContainer } from '@kbn/presentation-containers'; +import { EmbeddableApiContext } from '@kbn/presentation-publishing'; + +export const compatibilityCheck = ( + api: EmbeddableApiContext['embeddable'] +): api is PresentationContainer => { + return apiIsPresentationContainer(api); +}; diff --git a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx index 202a09e1f3576..79c6a6c1195a9 100644 --- a/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx +++ b/x-pack/plugins/observability_solution/synthetics/public/apps/embeddables/ui_actions/create_overview_panel_action.tsx @@ -5,7 +5,6 @@ * 2.0. */ import { i18n } from '@kbn/i18n'; -import { apiIsPresentationContainer } from '@kbn/presentation-containers'; import { IncompatibleActionError, type UiActionsActionDefinition, @@ -34,10 +33,12 @@ export function createStatusOverviewPanelAction(): UiActionsActionDefinition 'online', isCompatible: async ({ embeddable }) => { - return apiIsPresentationContainer(embeddable); + const { compatibilityCheck } = await import('./compatibility_check'); + return compatibilityCheck(embeddable); }, execute: async ({ embeddable }) => { - if (!apiIsPresentationContainer(embeddable)) throw new IncompatibleActionError(); + const { compatibilityCheck } = await import('./compatibility_check'); + if (!compatibilityCheck(embeddable)) throw new IncompatibleActionError(); try { embeddable.addNewPanel({ panelType: SYNTHETICS_OVERVIEW_EMBEDDABLE, diff --git a/x-pack/plugins/search_inference_endpoints/common/constants.ts b/x-pack/plugins/search_inference_endpoints/common/constants.ts index cdba227626a55..186901659dd29 100644 --- a/x-pack/plugins/search_inference_endpoints/common/constants.ts +++ b/x-pack/plugins/search_inference_endpoints/common/constants.ts @@ -9,3 +9,4 @@ export const PLUGIN_ID = 'searchInferenceEndpoints'; export const PLUGIN_NAME = 'InferenceEndpoints'; export const INFERENCE_ENDPOINTS_QUERY_KEY = 'inferenceEndpointsQueryKey'; +export const TRAINED_MODEL_STATS_QUERY_KEY = 'trainedModelStats'; diff --git a/x-pack/plugins/search_inference_endpoints/common/translations.ts b/x-pack/plugins/search_inference_endpoints/common/translations.ts index bb04ec80fafdc..a61d185c406c0 100644 --- a/x-pack/plugins/search_inference_endpoints/common/translations.ts +++ b/x-pack/plugins/search_inference_endpoints/common/translations.ts @@ -119,20 +119,6 @@ export const FORBIDDEN_TO_ACCESS_TRAINED_MODELS = i18n.translate( } ); -export const COPY_ID_ACTION_LABEL = i18n.translate( - 'xpack.searchInferenceEndpoints.actions.copyID', - { - defaultMessage: 'Copy endpoint ID', - } -); - -export const COPY_ID_ACTION_SUCCESS = i18n.translate( - 'xpack.searchInferenceEndpoints.actions.copyIDSuccess', - { - defaultMessage: 'Inference endpoint ID copied!', - } -); - export const ENDPOINT_ADDED_SUCCESS = i18n.translate( 'xpack.searchInferenceEndpoints.actions.endpointAddedSuccess', { @@ -153,13 +139,6 @@ export const ENDPOINT_ADDED_SUCCESS_DESCRIPTION = (endpointId: string) => values: { endpointId }, }); -export const DELETE_ACTION_LABEL = i18n.translate( - 'xpack.searchInferenceEndpoints.actions.deleteSingleEndpoint', - { - defaultMessage: 'Delete endpoint', - } -); - export const ENDPOINT = i18n.translate('xpack.searchInferenceEndpoints.endpoint', { defaultMessage: 'Endpoint', }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx similarity index 80% rename from x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx rename to x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx index 1445e0c41c574..288ba5089d367 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.test.tsx @@ -8,7 +8,7 @@ import { renderReactTestingLibraryWithI18n as render } from '@kbn/test-jest-helpers'; import React from 'react'; import { useKibana } from '../../../../../../hooks/use_kibana'; -import { useCopyIDAction } from './use_copy_id_action'; +import { CopyIDAction } from './copy_id_action'; const mockInferenceEndpoint = { deployment: 'not_applicable', @@ -35,8 +35,6 @@ Object.defineProperty(navigator, 'clipboard', { configurable: true, }); -const mockOnActionSuccess = jest.fn(); - jest.mock('../../../../../../hooks/use_kibana', () => ({ useKibana: jest.fn(), })); @@ -53,21 +51,19 @@ const addSuccess = jest.fn(); }, })); -describe('useCopyIDAction hook', () => { +describe('CopyIDAction', () => { beforeEach(() => { jest.clearAllMocks(); }); it('renders the label with correct text', () => { const TestComponent = () => { - const { getAction } = useCopyIDAction({ onActionSuccess: mockOnActionSuccess }); - const action = getAction(mockInferenceEndpoint); - return
{action}
; + return ; }; const { getByTestId } = render(); const labelElement = getByTestId('inference-endpoints-action-copy-id-label'); - expect(labelElement).toHaveTextContent('Copy endpoint ID'); + expect(labelElement).toBeVisible(); }); }); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx new file mode 100644 index 0000000000000..4641899b59720 --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/copy_id_action.tsx @@ -0,0 +1,47 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonIcon, EuiCopy } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React from 'react'; +import { useKibana } from '../../../../../../hooks/use_kibana'; + +interface CopyIDActionProps { + modelId: string; +} + +export const CopyIDAction = ({ modelId }: CopyIDActionProps) => { + const { + services: { notifications }, + } = useKibana(); + const toasts = notifications?.toasts; + + return ( + + {(copy) => ( + { + copy(); + toasts?.addSuccess({ + title: i18n.translate('xpack.searchInferenceEndpoints.actions.copyIDSuccess', { + defaultMessage: 'Inference endpoint ID {modelId} copied', + values: { modelId }, + }), + }); + }} + size="s" + /> + )} + + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx deleted file mode 100644 index b43b308af068a..0000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/copy_id/use_copy_id_action.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiContextMenuItem, EuiCopy, EuiIcon } from '@elastic/eui'; -import React from 'react'; -import * as i18n from '../../../../../../../common/translations'; -import { useKibana } from '../../../../../../hooks/use_kibana'; -import { InferenceEndpointUI } from '../../../../types'; -import { UseCopyIDActionProps } from '../types'; - -export const useCopyIDAction = ({ onActionSuccess }: UseCopyIDActionProps) => { - const { - services: { notifications }, - } = useKibana(); - const toasts = notifications?.toasts; - - const getAction = (inferenceEndpoint: InferenceEndpointUI) => { - return ( - - {(copy) => ( - } - onClick={() => { - copy(); - onActionSuccess(); - toasts?.addSuccess({ title: i18n.COPY_ID_ACTION_SUCCESS }); - }} - size="s" - > - {i18n.COPY_ID_ACTION_LABEL} - - )} - - ); - }; - - return { getAction }; -}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx index e6f4594e2d0cd..8fe5c0e94b058 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/index.test.tsx @@ -18,7 +18,7 @@ describe('ConfirmDeleteEndpointModal', () => { render(); }); - it('renders the modal with correct texts', () => { + it('renders the modal with correct elements', () => { expect(screen.getByText(i18n.DELETE_TITLE)).toBeInTheDocument(); expect(screen.getByText(i18n.CONFIRM_DELETE_WARNING)).toBeInTheDocument(); expect(screen.getByText(i18n.CANCEL)).toBeInTheDocument(); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts index 6b2dff7d8b8f1..4e306afcc3ac8 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/confirm_delete_endpoint/translations.ts @@ -22,3 +22,10 @@ export const CONFIRM_DELETE_WARNING = i18n.translate( 'Deleting an active endpoint will cause operations targeting associated semantic_text fields and inference pipelines to fail.', } ); + +export const DELETE_ACTION_LABEL = i18n.translate( + 'xpack.searchInferenceEndpoints.actions.deleteSingleEndpoint', + { + defaultMessage: 'Delete endpoint', + } +); diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx new file mode 100644 index 0000000000000..88a982fd0b76e --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/delete_action.tsx @@ -0,0 +1,55 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { EuiButtonIcon } from '@elastic/eui'; +import { i18n } from '@kbn/i18n'; +import React, { useState } from 'react'; +import { useDeleteEndpoint } from '../../../../../../hooks/use_delete_endpoint'; +import { InferenceEndpointUI } from '../../../../types'; +import { ConfirmDeleteEndpointModal } from './confirm_delete_endpoint'; + +interface DeleteActionProps { + selectedEndpoint?: InferenceEndpointUI; +} + +export const DeleteAction: React.FC = ({ selectedEndpoint }) => { + const [isModalVisible, setIsModalVisible] = useState(false); + + const { mutate: deleteEndpoint } = useDeleteEndpoint(() => setIsModalVisible(false)); + + const onConfirmDeletion = () => { + if (!selectedEndpoint) { + return; + } + + deleteEndpoint({ + type: selectedEndpoint.type, + id: selectedEndpoint.endpoint.model_id, + }); + }; + + return ( + <> + setIsModalVisible(true)} + /> + {isModalVisible && ( + setIsModalVisible(false)} + onConfirm={onConfirmDeletion} + /> + )} + + ); +}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx deleted file mode 100644 index 1a2e5cdb5b51f..0000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/actions/delete/use_delete_action.tsx +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { EuiContextMenuItem, EuiIcon } from '@elastic/eui'; -import React, { useCallback, useState } from 'react'; -import * as i18n from '../../../../../../../common/translations'; -import { useDeleteEndpoint } from '../../../../../../hooks/use_delete_endpoint'; -import { InferenceEndpointUI } from '../../../../types'; -import type { UseActionProps } from '../types'; - -export const useDeleteAction = ({ onActionSuccess }: UseActionProps) => { - const [isModalVisible, setIsModalVisible] = useState(false); - const [endpointToBeDeleted, setEndpointToBeDeleted] = useState(null); - const onCloseModal = useCallback(() => setIsModalVisible(false), []); - const openModal = useCallback( - (selectedEndpoint: InferenceEndpointUI) => { - onActionSuccess(); - setIsModalVisible(true); - setEndpointToBeDeleted(selectedEndpoint); - }, - [onActionSuccess] - ); - - const { mutate: deleteEndpoint } = useDeleteEndpoint(); - - const onConfirmDeletion = useCallback(() => { - onCloseModal(); - if (!endpointToBeDeleted) { - return; - } - - deleteEndpoint({ - type: endpointToBeDeleted.type, - id: endpointToBeDeleted.endpoint.model_id, - }); - }, [deleteEndpoint, onCloseModal, endpointToBeDeleted]); - - const getAction = (selectedEndpoint: InferenceEndpointUI) => { - return ( - } - onClick={() => openModal(selectedEndpoint)} - > - {i18n.DELETE_ACTION_LABEL} - - ); - }; - - return { getAction, isModalVisible, onConfirmDeletion, onCloseModal }; -}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx deleted file mode 100644 index f76d147c68646..0000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_actions/use_actions.tsx +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import type { EuiTableComputedColumnType } from '@elastic/eui'; -import { EuiButtonIcon, EuiContextMenuPanel, EuiPopover } from '@elastic/eui'; -import React, { useCallback, useState } from 'react'; -import { InferenceEndpointUI } from '../../types'; -import { useCopyIDAction } from './actions/copy_id/use_copy_id_action'; -import { ConfirmDeleteEndpointModal } from './actions/delete/confirm_delete_endpoint'; -import { useDeleteAction } from './actions/delete/use_delete_action'; - -export const ActionColumn: React.FC<{ interfaceEndpoint: InferenceEndpointUI }> = ({ - interfaceEndpoint, -}) => { - const [isPopoverOpen, setIsPopoverOpen] = useState(false); - const tooglePopover = useCallback(() => setIsPopoverOpen(!isPopoverOpen), [isPopoverOpen]); - const closePopover = useCallback(() => setIsPopoverOpen(false), []); - - const copyIDAction = useCopyIDAction({ - onActionSuccess: closePopover, - }); - - const deleteAction = useDeleteAction({ - onActionSuccess: closePopover, - }); - - const items = [ - copyIDAction.getAction(interfaceEndpoint), - deleteAction.getAction(interfaceEndpoint), - ]; - - return ( - <> - - } - isOpen={isPopoverOpen} - closePopover={closePopover} - panelPaddingSize="none" - anchorPosition="downLeft" - > - - - {deleteAction.isModalVisible ? ( - - ) : null} - - ); -}; - -interface UseBulkActionsReturnValue { - actions: EuiTableComputedColumnType; -} - -export const useActions = (): UseBulkActionsReturnValue => { - return { - actions: { - align: 'right', - render: (interfaceEndpoint: InferenceEndpointUI) => { - return ; - }, - width: '165px', - }, - }; -}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx index 61e6e620d2485..cd2466e483ac2 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_deployment_status/deployment_status.tsx @@ -15,7 +15,7 @@ interface DeploymentStatusProps { } export const DeploymentStatus: React.FC = ({ status }) => { - if (status === DeploymentStatusEnum.notApplicable) { + if (status === DeploymentStatusEnum.notApplicable || !status) { return null; } diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx index 25892236d61f7..1cb34a06ff997 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/render_endpoint/endpoint_info.tsx @@ -21,18 +21,18 @@ export interface EndpointInfoProps { export const EndpointInfo: React.FC = ({ endpoint }) => { return ( - - + + {endpoint.model_id} - + ); }; -export const EndpointModelInfo: React.FC = ({ endpoint }) => { +const EndpointModelInfo: React.FC = ({ endpoint }) => { const serviceSettings = endpoint.service_settings; const modelId = 'model_id' in serviceSettings @@ -44,15 +44,10 @@ export const EndpointModelInfo: React.FC = ({ endpoint }) => const isEligibleForMITBadge = modelId && ELASTIC_MODEL_DEFINITIONS[modelId]?.license === 'MIT'; return ( - - {modelId && ( - - - - )} - - {isEligibleForMITBadge && ( - + <> + + {modelId && } + {isEligibleForMITBadge ? ( = ({ endpoint }) => > {i18n.MIT_LICENSE} - - )} - - - - {endpointModelAtrributes(endpoint)} - - - + ) : null}{' '} + {endpointModelAtrributes(endpoint)} + + ); }; @@ -141,7 +131,7 @@ function openAIAttributes(endpoint: InferenceAPIConfigResponse) { function azureOpenAIStudioAttributes(endpoint: InferenceAPIConfigResponse) { const serviceSettings = endpoint.service_settings; - const provider = 'provider' in serviceSettings ? serviceSettings.provider : undefined; + const provider = 'provider' in serviceSettings ? serviceSettings?.provider : undefined; const endpointType = 'endpoint_type' in serviceSettings ? serviceSettings.endpoint_type : undefined; const target = 'target' in serviceSettings ? serviceSettings.target : undefined; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx deleted file mode 100644 index 1b53aeb6ada99..0000000000000 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/render_table_columns/table_columns.tsx +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; -import React from 'react'; -import type { HorizontalAlignment } from '@elastic/eui'; -import { TaskTypes } from '../../../../common/types'; -import * as i18n from '../../../../common/translations'; -import { useActions } from './render_actions/use_actions'; -import { EndpointInfo } from './render_endpoint/endpoint_info'; -import { ServiceProvider } from './render_service_provider/service_provider'; -import { TaskType } from './render_task_type/task_type'; -import { DeploymentStatus } from './render_deployment_status/deployment_status'; -import { DeploymentStatusEnum, ServiceProviderKeys } from '../types'; - -export const useTableColumns = () => { - const { actions } = useActions(); - const deploymentAlignment: HorizontalAlignment = 'center'; - - const TABLE_COLUMNS = [ - { - field: 'deployment', - name: '', - render: (deployment: DeploymentStatusEnum) => { - if (deployment != null) { - return ; - } - - return null; - }, - width: '64px', - align: deploymentAlignment, - }, - { - field: 'endpoint', - name: i18n.ENDPOINT, - render: (endpoint: InferenceAPIConfigResponse) => { - if (endpoint != null) { - return ; - } - - return null; - }, - sortable: true, - }, - { - field: 'provider', - name: i18n.SERVICE_PROVIDER, - render: (provider: ServiceProviderKeys) => { - if (provider != null) { - return ; - } - - return null; - }, - sortable: false, - width: '185px', - }, - { - field: 'type', - name: i18n.TASK_TYPE, - render: (type: TaskTypes) => { - if (type != null) { - return ; - } - - return null; - }, - sortable: false, - width: '185px', - }, - actions, - ]; - - return TABLE_COLUMNS; -}; diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx index 91a2ea959fdec..70791287d9ae1 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.test.tsx @@ -10,6 +10,8 @@ import { screen } from '@testing-library/react'; import { render } from '@testing-library/react'; import { TabularPage } from './tabular_page'; import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; +import { TRAINED_MODEL_STATS_QUERY_KEY } from '../../../common/constants'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; const inferenceEndpoints = [ { @@ -43,8 +45,15 @@ jest.mock('../../hooks/use_delete_endpoint', () => ({ })); describe('When the tabular page is loaded', () => { + const queryClient = new QueryClient(); + queryClient.setQueryData([TRAINED_MODEL_STATS_QUERY_KEY], { + trained_model_stats: [{ model_id: '.elser_model_2', deployment_stats: { state: 'started' } }], + }); + const wrapper = ({ children }: { children: React.ReactNode }) => { + return {children}; + }; beforeEach(() => { - render(); + render(wrapper({ children: })); }); it('should display all model_ids in the table', () => { diff --git a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx index ec19ad49ad477..cb3b885659417 100644 --- a/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/components/all_inference_endpoints/tabular_page.tsx @@ -5,25 +5,34 @@ * 2.0. */ -import React, { useCallback, useEffect } from 'react'; +import React, { useCallback } from 'react'; -import { EuiFlexGroup, EuiFlexItem } from '@elastic/eui'; +import { + EuiBasicTable, + EuiBasicTableColumn, + EuiFlexGroup, + EuiFlexItem, + HorizontalAlignment, +} from '@elastic/eui'; import { InferenceAPIConfigResponse } from '@kbn/ml-trained-models-utils'; -import { extractErrorProperties } from '@kbn/ml-error-utils'; +import { TaskTypes } from '../../../common/types'; import * as i18n from '../../../common/translations'; import { useTableData } from '../../hooks/use_table_data'; -import { FilterOptions } from './types'; +import { FilterOptions, InferenceEndpointUI, ServiceProviderKeys } from './types'; import { DeploymentStatusEnum } from './types'; import { useAllInferenceEndpointsState } from '../../hooks/use_all_inference_endpoints_state'; -import { EndpointsTable } from './endpoints_table'; import { ServiceProviderFilter } from './filter/service_provider_filter'; import { TaskTypeFilter } from './filter/task_type_filter'; import { TableSearch } from './search/table_search'; -import { useTableColumns } from './render_table_columns/table_columns'; -import { useKibana } from '../../hooks/use_kibana'; +import { DeploymentStatus } from './render_table_columns/render_deployment_status/deployment_status'; +import { EndpointInfo } from './render_table_columns/render_endpoint/endpoint_info'; +import { ServiceProvider } from './render_table_columns/render_service_provider/service_provider'; +import { TaskType } from './render_table_columns/render_task_type/task_type'; +import { DeleteAction } from './render_table_columns/render_actions/actions/delete/delete_action'; +import { CopyIDAction } from './render_table_columns/render_actions/actions/copy_id/copy_id_action'; interface TabularPageProps { inferenceEndpoints: InferenceAPIConfigResponse[]; @@ -31,16 +40,9 @@ interface TabularPageProps { export const TabularPage: React.FC = ({ inferenceEndpoints }) => { const [searchKey, setSearchKey] = React.useState(''); - const [deploymentStatus, setDeploymentStatus] = React.useState< - Record - >({}); const { queryParams, setQueryParams, filterOptions, setFilterOptions } = useAllInferenceEndpointsState(); - const { - services: { ml, notifications }, - } = useKibana(); - const onFilterChangedCallback = useCallback( (newFilterOptions: Partial) => { setFilterOptions(newFilterOptions); @@ -48,43 +50,76 @@ export const TabularPage: React.FC = ({ inferenceEndpoints }) [setFilterOptions] ); - useEffect(() => { - const fetchDeploymentStatus = async () => { - const trainedModelStats = await ml?.mlApi?.trainedModels.getTrainedModelStats(); - if (trainedModelStats) { - const newDeploymentStatus = trainedModelStats?.trained_model_stats.reduce( - (acc, modelStat) => { - if (modelStat.model_id) { - acc[modelStat.model_id] = - modelStat?.deployment_stats?.state === 'started' - ? DeploymentStatusEnum.deployed - : DeploymentStatusEnum.notDeployed; - } - return acc; - }, - {} as Record - ); - setDeploymentStatus(newDeploymentStatus); - } - }; - - fetchDeploymentStatus().catch((error) => { - const errorObj = extractErrorProperties(error); - notifications?.toasts?.addError(errorObj.message ? new Error(error.message) : error, { - title: i18n.TRAINED_MODELS_STAT_GATHER_FAILED, - }); - }); - }, [ml, notifications]); - const { paginatedSortedTableData, pagination, sorting } = useTableData( inferenceEndpoints, queryParams, filterOptions, - searchKey, - deploymentStatus + searchKey ); - const tableColumns = useTableColumns(); + const tableColumns: Array> = [ + { + field: 'deployment', + name: '', + render: (deployment: DeploymentStatusEnum) => , + align: 'center' as HorizontalAlignment, + width: '64px', + }, + { + field: 'endpoint', + name: i18n.ENDPOINT, + render: (endpoint: InferenceAPIConfigResponse) => { + if (endpoint) { + return ; + } + + return null; + }, + sortable: true, + truncateText: true, + }, + { + field: 'provider', + name: i18n.SERVICE_PROVIDER, + render: (provider: ServiceProviderKeys) => { + if (provider) { + return ; + } + + return null; + }, + sortable: false, + width: '185px', + }, + { + field: 'type', + name: i18n.TASK_TYPE, + render: (type: TaskTypes) => { + if (type) { + return ; + } + + return null; + }, + sortable: false, + width: '185px', + }, + { + actions: [ + { + render: (inferenceEndpoint: InferenceEndpointUI) => ( + + ), + }, + { + render: (inferenceEndpoint: InferenceEndpointUI) => ( + + ), + }, + ], + width: '165px', + }, + ]; const handleTableChange = useCallback( ({ page, sort }) => { @@ -123,9 +158,10 @@ export const TabularPage: React.FC = ({ inferenceEndpoints })
- { - const { inferenceEndpoints } = useQueryInferenceEndpoints(); + const { data } = useQueryInferenceEndpoints(); + + const inferenceEndpoints = data || []; return ( <> diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx index aee9fa1dc55ca..b8a12d8238f9c 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_delete_endpoint.tsx @@ -17,7 +17,7 @@ interface MutationArgs { id: string; } -export const useDeleteEndpoint = () => { +export const useDeleteEndpoint = (onSuccess?: () => void) => { const queryClient = useQueryClient(); const { services } = useKibana(); const toasts = services.notifications?.toasts; @@ -32,6 +32,9 @@ export const useDeleteEndpoint = () => { toasts?.addSuccess({ title: i18n.DELETE_SUCCESS, }); + if (onSuccess) { + onSuccess(); + } }, onError: (error: { body: KibanaServerError }) => { toasts?.addError(new Error(error.body.message), { diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_inference_endpoints.ts b/x-pack/plugins/search_inference_endpoints/public/hooks/use_inference_endpoints.ts index f400429bec250..1a6435cd25153 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_inference_endpoints.ts +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_inference_endpoints.ts @@ -11,13 +11,10 @@ import { APIRoutes } from '../types'; import { useKibana } from './use_kibana'; import { INFERENCE_ENDPOINTS_QUERY_KEY } from '../../common/constants'; -export const useQueryInferenceEndpoints = (): { - inferenceEndpoints: InferenceAPIConfigResponse[]; - isLoading: boolean; -} => { +export const useQueryInferenceEndpoints = () => { const { services } = useKibana(); - const { data, isLoading } = useQuery({ + return useQuery({ queryKey: [INFERENCE_ENDPOINTS_QUERY_KEY], queryFn: async () => { const response = await services.http.get<{ @@ -27,6 +24,4 @@ export const useQueryInferenceEndpoints = (): { return response.inference_endpoints; }, }); - - return { inferenceEndpoints: data || [], isLoading }; }; diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx index a8d0326a4c36f..df058df72fb42 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.test.tsx @@ -10,6 +10,9 @@ import { renderHook } from '@testing-library/react-hooks'; import { QueryParams } from '../components/all_inference_endpoints/types'; import { useTableData } from './use_table_data'; import { INFERENCE_ENDPOINTS_TABLE_PER_PAGE_VALUES } from '../components/all_inference_endpoints/types'; +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import React from 'react'; +import { TRAINED_MODEL_STATS_QUERY_KEY } from '../../common/constants'; const inferenceEndpoints = [ { @@ -59,17 +62,23 @@ const filterOptions = { type: ['sparse_embedding', 'text_embedding'], } as any; -const deploymentStatus = { - '.elser_model_2': 'deployed', - lang_ident_model_1: 'not_deployed', -} as any; - const searchKey = 'my'; describe('useTableData', () => { + const queryClient = new QueryClient(); + const wrapper = ({ children }: { children: React.ReactNode }) => { + return {children}; + }; + + beforeEach(() => { + queryClient.setQueryData([TRAINED_MODEL_STATS_QUERY_KEY], { + trained_model_stats: [{ model_id: '.elser_model_2', deployment_stats: { state: 'started' } }], + }); + }); it('should return correct pagination', () => { - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey), + { wrapper } ); expect(result.current.pagination).toEqual({ @@ -81,8 +90,9 @@ describe('useTableData', () => { }); it('should return correct sorting', () => { - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey), + { wrapper } ); expect(result.current.sorting).toEqual({ @@ -94,8 +104,9 @@ describe('useTableData', () => { }); it('should return correctly sorted data', () => { - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey), + { wrapper } ); const expectedSortedData = [...inferenceEndpoints].sort((a, b) => @@ -113,8 +124,9 @@ describe('useTableData', () => { provider: ['elser'], type: ['text_embedding'], } as any; - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions2, searchKey, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions2, searchKey), + { wrapper } ); const filteredData = result.current.sortedTableData; @@ -129,16 +141,18 @@ describe('useTableData', () => { it('should filter data based on searchKey', () => { const searchKey2 = 'model-05'; - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey2, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey2), + { wrapper } ); const filteredData = result.current.sortedTableData; expect(filteredData.every((item) => item.endpoint.model_id.includes(searchKey))).toBeTruthy(); }); it('should update deployment status based on deploymentStatus object', () => { - const { result } = renderHook(() => - useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey, deploymentStatus) + const { result } = renderHook( + () => useTableData(inferenceEndpoints, queryParams, filterOptions, searchKey), + { wrapper } ); const updatedData = result.current.sortedTableData; diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx index 663df5547c600..1b3ce7814891f 100644 --- a/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_table_data.tsx @@ -20,6 +20,7 @@ import { ServiceProviderKeys, } from '../components/all_inference_endpoints/types'; import { DeploymentStatusEnum } from '../components/all_inference_endpoints/types'; +import { useTrainedModelStats } from './use_trained_model_stats'; interface UseTableDataReturn { tableData: InferenceEndpointUI[]; @@ -33,9 +34,20 @@ export const useTableData = ( inferenceEndpoints: InferenceAPIConfigResponse[], queryParams: QueryParams, filterOptions: FilterOptions, - searchKey: string, - deploymentStatus: Record + searchKey: string ): UseTableDataReturn => { + const { data: trainedModelStats } = useTrainedModelStats(); + + const deploymentStatus = trainedModelStats?.trained_model_stats.reduce((acc, modelStat) => { + if (modelStat.model_id) { + acc[modelStat.model_id] = + modelStat?.deployment_stats?.state === 'started' + ? DeploymentStatusEnum.deployed + : DeploymentStatusEnum.notDeployed; + } + return acc; + }, {} as Record); + const tableData: InferenceEndpointUI[] = useMemo(() => { let filteredEndpoints = inferenceEndpoints; @@ -62,7 +74,7 @@ export const useTableData = ( if (isElasticService) { const modelId = endpoint.service_settings?.model_id; deploymentStatusValue = - modelId && deploymentStatus[modelId] !== undefined + modelId && deploymentStatus?.[modelId] ? deploymentStatus[modelId] : DeploymentStatusEnum.notDeployable; } diff --git a/x-pack/plugins/search_inference_endpoints/public/hooks/use_trained_model_stats.ts b/x-pack/plugins/search_inference_endpoints/public/hooks/use_trained_model_stats.ts new file mode 100644 index 0000000000000..57b643b78dc3a --- /dev/null +++ b/x-pack/plugins/search_inference_endpoints/public/hooks/use_trained_model_stats.ts @@ -0,0 +1,24 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { useQuery } from '@tanstack/react-query'; +import { InferenceStatsResponse } from '@kbn/ml-plugin/public/application/services/ml_api_service/trained_models'; +import { useKibana } from './use_kibana'; +import { TRAINED_MODEL_STATS_QUERY_KEY } from '../../common/constants'; + +export const useTrainedModelStats = () => { + const { services } = useKibana(); + + return useQuery({ + queryKey: [TRAINED_MODEL_STATS_QUERY_KEY], + queryFn: async () => { + const response = await services.ml?.mlApi?.trainedModels.getTrainedModelStats(); + + return response || ({ count: 0, trained_model_stats: [] } as InferenceStatsResponse); + }, + }); +}; diff --git a/x-pack/plugins/search_inference_endpoints/tsconfig.json b/x-pack/plugins/search_inference_endpoints/tsconfig.json index 6094924306e54..e915df9529b6b 100644 --- a/x-pack/plugins/search_inference_endpoints/tsconfig.json +++ b/x-pack/plugins/search_inference_endpoints/tsconfig.json @@ -4,9 +4,9 @@ "outDir": "target/types", }, "include": [ - "__mocks__/**/*", - "common/**/*", - "public/**/*", + "__mocks__/**/*", + "common/**/*", + "public/**/*", "server/**/*" ], "kbn_references": [ @@ -29,7 +29,6 @@ "@kbn/doc-links", "@kbn/console-plugin", "@kbn/test-jest-helpers", - "@kbn/ml-error-utils", "@kbn/kibana-utils-plugin" ], "exclude": [ diff --git a/x-pack/plugins/search_playground/public/components/chat.tsx b/x-pack/plugins/search_playground/public/components/chat.tsx index cc4c0b1ccdff2..b27955c326d23 100644 --- a/x-pack/plugins/search_playground/public/components/chat.tsx +++ b/x-pack/plugins/search_playground/public/components/chat.tsx @@ -56,7 +56,7 @@ export const Chat = () => { handleSubmit, getValues, } = useFormContext(); - const { messages, append, stop: stopRequest, setMessages, reload, error } = useChat(); + const { messages, append, stop: stopRequest, setMessages, reload } = useChat(); const messagesRef = useAutoBottomScroll(); const [isRegenerating, setIsRegenerating] = useState(false); const usageTracker = useUsageTracker(); @@ -88,8 +88,8 @@ export const Chat = () => { ); const isToolBarActionsDisabled = useMemo( - () => chatMessages.length <= 1 || !!error || isRegenerating || isSubmitting, - [chatMessages, error, isSubmitting, isRegenerating] + () => chatMessages.length <= 1 || isRegenerating || isSubmitting, + [chatMessages, isSubmitting, isRegenerating] ); const regenerateMessages = async () => { diff --git a/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts index 88a6052a0bbf7..13959e4455c29 100644 --- a/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.test.ts @@ -305,6 +305,45 @@ describe('conversational chain', () => { }); }, 10000); + it('should omit the system messages in chat', async () => { + await createTestChain({ + responses: ['the final answer'], + chat: [ + { + id: '1', + role: MessageRole.user, + content: 'what is the work from home policy?', + }, + { + id: '2', + role: MessageRole.system, + content: 'Error occurred. Please try again.', + }, + ], + expectedFinalAnswer: 'the final answer', + expectedDocs: [ + { + documents: [ + { metadata: { _id: '1', _index: 'index' }, pageContent: 'value' }, + { metadata: { _id: '1', _index: 'website' }, pageContent: 'value2' }, + ], + type: 'retrieved_docs', + }, + ], + expectedTokens: [ + { type: 'context_token_count', count: 15 }, + { type: 'prompt_token_count', count: 28 }, + ], + expectedSearchRequest: [ + { + method: 'POST', + path: '/index,website/_search', + body: { query: { match: { field: 'what is the work from home policy?' } }, size: 3 }, + }, + ], + }); + }, 10000); + it('should cope with quotes in the query', async () => { await createTestChain({ responses: ['rewrite "the" question', 'the final answer'], diff --git a/x-pack/plugins/search_playground/server/lib/conversational_chain.ts b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts index f7b1634dd27b1..c63481e93c98f 100644 --- a/x-pack/plugins/search_playground/server/lib/conversational_chain.ts +++ b/x-pack/plugins/search_playground/server/lib/conversational_chain.ts @@ -18,7 +18,7 @@ import { createStreamDataTransformer, experimental_StreamData } from 'ai'; import { BaseLanguageModel } from '@langchain/core/language_models/base'; import { BaseMessage } from '@langchain/core/messages'; import { HumanMessage, AIMessage } from '@langchain/core/messages'; -import { ChatMessage, MessageRole } from '../types'; +import { ChatMessage } from '../types'; import { ElasticsearchRetriever } from './elasticsearch_retriever'; import { renderTemplate } from '../utils/render_template'; @@ -49,25 +49,28 @@ interface ContextInputs { question: string; } -const getSerialisedMessages = (chatHistory: ChatMessage[]) => { +const getSerialisedMessages = (chatHistory: BaseMessage[]) => { const formattedDialogueTurns = chatHistory.map((message) => { - if (message.role === MessageRole.user) { + if (message instanceof HumanMessage) { return `Human: ${message.content}`; - } else if (message.role === MessageRole.assistant) { + } else if (message instanceof AIMessage) { return `Assistant: ${message.content}`; } }); return formattedDialogueTurns.join('\n'); }; -const getMessages = (chatHistory: ChatMessage[]) => { - return chatHistory.map((message) => { - if (message.role === 'human') { - return new HumanMessage(message.content); - } else { - return new AIMessage(message.content); - } - }); +export const getMessages = (chatHistory: ChatMessage[]) => { + return chatHistory + .map((message) => { + if (message.role === 'human') { + return new HumanMessage(message.content); + } else if (message.role === 'assistant') { + return new AIMessage(message.content); + } + return null; + }) + .filter((message): message is BaseMessage => message !== null); }; const buildContext = (docs: Document[]) => { @@ -141,8 +144,9 @@ class ConversationalChainFn { const data = new experimental_StreamData(); const messages = msgs ?? []; - const previousMessages = messages.slice(0, -1); - const question = messages[messages.length - 1]!.content; + const lcMessages = getMessages(messages); + const previousMessages = lcMessages.slice(0, -1); + const question = lcMessages[lcMessages.length - 1]!.content; const retrievedDocs: Document[] = []; let retrievalChain: Runnable = RunnableLambda.from(() => ''); @@ -165,7 +169,7 @@ class ConversationalChainFn { return input.question; }); - if (previousMessages.length > 0) { + if (lcMessages.length > 1) { const questionRewritePromptTemplate = PromptTemplate.fromTemplate( this.options.questionRewritePrompt ); @@ -184,7 +188,6 @@ class ConversationalChainFn { }); } - const lcMessages = getMessages(messages); const prompt = ChatPromptTemplate.fromMessages([ SystemMessagePromptTemplate.fromTemplate(this.options.prompt), ...lcMessages, diff --git a/x-pack/plugins/search_playground/server/routes.ts b/x-pack/plugins/search_playground/server/routes.ts index de26776816f33..a71e650a8dae8 100644 --- a/x-pack/plugins/search_playground/server/routes.ts +++ b/x-pack/plugins/search_playground/server/routes.ts @@ -31,7 +31,7 @@ export function createRetriever(esQuery: string) { const query = JSON.parse(replacedQuery); return query; } catch (e) { - throw Error(e); + throw Error("Failed to parse the Elasticsearch Query. Check Query to make sure it's valid."); } }; } diff --git a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts index 87a3aee66a884..91de8579426ea 100644 --- a/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts +++ b/x-pack/plugins/security_solution/common/endpoint/data_generators/endpoint_action_generator.ts @@ -8,8 +8,10 @@ import type { DeepPartial } from 'utility-types'; import { merge } from 'lodash'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; +import { isProcessesAction } from '../service/response_actions/type_guards'; import { ENDPOINT_ACTION_RESPONSES_DS, ENDPOINT_ACTIONS_DS } from '../constants'; import { BaseDataGenerator } from './base_data_generator'; +import type { GetProcessesActionOutputContent } from '../types'; import { type ActionDetails, type ActionResponseOutput, @@ -211,16 +213,27 @@ export class EndpointActionGenerator extends BaseDataGenerator { generateActionDetails< TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput, TParameters extends EndpointActionDataParameterTypes = EndpointActionDataParameterTypes - >( - overrides: DeepPartial> = {} - ): ActionDetails { + >({ + agents: overrideAgents, + command: overrideCommand, + ...overrides + }: DeepPartial> = {}): ActionDetails< + TOutputContent, + TParameters + > { + const agents = overrideAgents ? [...(overrideAgents as string[])] : ['agent-a']; + const command = overrideCommand ?? 'isolate'; + const details: WithAllKeys = { action: '123', - agents: ['agent-a'], + agents, agentType: 'endpoint', - command: 'isolate', + command, completedAt: '2022-04-30T16:08:47.449Z', - hosts: { 'agent-a': { name: 'Host-agent-a' } }, + hosts: agents.reduce((acc, agentId) => { + acc[agentId] = { name: `Host-${agentId}` }; + return acc; + }, {} as ActionDetails['hosts']), id: '123', isCompleted: true, isExpired: false, @@ -232,21 +245,20 @@ export class EndpointActionGenerator extends BaseDataGenerator { createdBy: 'auserid', parameters: undefined, outputs: undefined, - agentState: { - 'agent-a': { + agentState: agents.reduce((acc, agentId) => { + acc[agentId] = { errors: undefined, isCompleted: true, completedAt: '2022-04-30T16:08:47.449Z', wasSuccessful: true, - }, - }, + }; + return acc; + }, {} as ActionDetails['agentState']), alertIds: undefined, ruleId: undefined, ruleName: undefined, }; - const command = overrides.command ?? details.command; - if (command === 'get-file') { if (!details.parameters) { ( @@ -391,6 +403,20 @@ export class EndpointActionGenerator extends BaseDataGenerator { }, {}); } + if (isProcessesAction(details)) { + details.outputs = agents.reduce((acc, agentId) => { + acc[agentId] = { + type: 'json', + content: { + code: 'success', + entries: this.randomResponseActionProcesses(), + }, + }; + + return acc; + }, {} as Required>['outputs']); + } + return merge(details, overrides as ActionDetails) as unknown as ActionDetails< TOutputContent, TParameters diff --git a/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts b/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts index b8f5e5cb3ef4d..cf9cc8ef94629 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/authz/mocks.ts @@ -8,6 +8,10 @@ import type { EndpointAuthz } from '../../types/authz'; import { getEndpointAuthzInitialState } from './authz'; +/** + * Returns the Endpoint Authz values all set to `true` (authorized) + * @param overrides + */ export const getEndpointAuthzInitialStateMock = ( overrides: Partial = {} ): EndpointAuthz => { diff --git a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts index e147e726e2190..707be0a4d1e65 100644 --- a/x-pack/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts +++ b/x-pack/plugins/security_solution/common/endpoint/service/response_actions/type_guards.ts @@ -14,6 +14,7 @@ import type { ResponseActionsExecuteParameters, ResponseActionUploadOutputContent, ResponseActionUploadParameters, + GetProcessesActionOutputContent, } from '../../types'; import { RESPONSE_ACTION_AGENT_TYPE, RESPONSE_ACTION_TYPE } from './constants'; @@ -40,6 +41,12 @@ export const isGetFileAction = ( return action.command === 'get-file'; }; +export const isProcessesAction = ( + action: MaybeImmutable +): action is ActionDetails => { + return action.command === 'running-processes'; +}; + // type guards to ensure only the matching string values are attached to the types filter type export const isAgentType = (type: string): type is (typeof RESPONSE_ACTION_AGENT_TYPE)[number] => RESPONSE_ACTION_AGENT_TYPE.includes(type as (typeof RESPONSE_ACTION_AGENT_TYPE)[number]); diff --git a/x-pack/plugins/security_solution/public/assistant/provider.test.tsx b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx index 3667e077a50c1..0534df76aaf6e 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.test.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.test.tsx @@ -5,13 +5,38 @@ * 2.0. */ +import React from 'react'; import { act, renderHook } from '@testing-library/react-hooks'; import { httpServiceMock, type HttpSetupMock } from '@kbn/core-http-browser-mocks'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; -import { createConversations } from './provider'; +import { AssistantProvider, createConversations } from './provider'; import { coreMock } from '@kbn/core/public/mocks'; +import { useKibana as mockUseKibana } from '../common/lib/kibana/__mocks__'; import { loadAllActions as loadConnectors } from '@kbn/triggers-actions-ui-plugin/public/common/constants'; +import { useKibana } from '../common/lib/kibana'; +import { render, waitFor } from '@testing-library/react'; +import { TestProviders } from '../common/mock'; +import { useAssistantAvailability } from './use_assistant_availability'; +import { + bulkUpdatePrompts, + getPrompts, + getUserConversations, +} from '@kbn/elastic-assistant/impl/assistant/api'; +import { BASE_SECURITY_SYSTEM_PROMPTS } from './content/prompts/system'; +const mockedUseKibana = mockUseKibana(); +jest.mock('./use_assistant_availability'); +jest.mock('../common/lib/kibana'); + +jest.mock('@kbn/elastic-assistant/impl/assistant/api'); +jest.mock('../common/hooks/use_license', () => ({ + useLicense: () => ({ + isEnterprise: () => true, + }), + licenseService: { + isEnterprise: () => true, + }, +})); jest.mock('@kbn/triggers-actions-ui-plugin/public/common/constants'); let http: HttpSetupMock = coreMock.createSetup().http; export const mockConnectors = [ @@ -199,3 +224,85 @@ describe('createConversations', () => { }); }); }); +describe('AssistantProvider', () => { + beforeEach(() => { + jest.clearAllMocks(); + (useKibana as jest.Mock).mockReturnValue({ + ...mockedUseKibana, + services: { + ...mockedUseKibana.services, + }, + }); + jest.mocked(useAssistantAvailability).mockReturnValue({ + hasAssistantPrivilege: true, + hasConnectorsAllPrivilege: true, + hasConnectorsReadPrivilege: true, + hasUpdateAIAssistantAnonymization: true, + isAssistantEnabled: true, + }); + + (getUserConversations as jest.Mock).mockResolvedValue({ + page: 1, + perPage: 5, + total: 5, + data: [], + }); + (getPrompts as jest.Mock).mockResolvedValue({ + page: 1, + perPage: 5, + total: 0, + data: [], + }); + }); + it('should not render the assistant when no prompts have been returned', async () => { + const { queryByTestId } = render( + + + , + { + wrapper: TestProviders, + } + ); + expect(queryByTestId('ourAssistant')).toBeNull(); + }); + it('should render the assistant when prompts are returned', async () => { + (getPrompts as jest.Mock).mockResolvedValue({ + page: 1, + perPage: 5, + total: 2, + data: BASE_SECURITY_SYSTEM_PROMPTS, + }); + const { getByTestId } = render( + + + , + { + wrapper: TestProviders, + } + ); + await waitFor(() => { + expect(getByTestId('ourAssistant')).not.toBeNull(); + }); + }); + it('should render the assistant once prompts have been created', async () => { + (bulkUpdatePrompts as jest.Mock).mockResolvedValue({ + success: true, + attributes: { + results: { + created: BASE_SECURITY_SYSTEM_PROMPTS, + }, + }, + }); + const { getByTestId } = render( + + + , + { + wrapper: TestProviders, + } + ); + await waitFor(() => { + expect(getByTestId('ourAssistant')).not.toBeNull(); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/public/assistant/provider.tsx b/x-pack/plugins/security_solution/public/assistant/provider.tsx index 134bfb25c15ac..dbfbb026ab2d3 100644 --- a/x-pack/plugins/security_solution/public/assistant/provider.tsx +++ b/x-pack/plugins/security_solution/public/assistant/provider.tsx @@ -5,7 +5,7 @@ * 2.0. */ import type { FC, PropsWithChildren } from 'react'; -import React, { useEffect } from 'react'; +import React, { useEffect, useState } from 'react'; import { parse } from '@kbn/datemath'; import type { Storage } from '@kbn/kibana-utils-plugin/public'; import { i18n } from '@kbn/i18n'; @@ -128,7 +128,7 @@ export const createBasePrompts = async (notifications: NotificationsStart, http: notifications.toasts ); if (bulkResult && bulkResult.success) { - return true; + return bulkResult.attributes.results.created; } }; @@ -176,6 +176,8 @@ export const AssistantProvider: FC> = ({ children }) storage, ]); + const [basePromptsLoaded, setBasePromptsLoaded] = useState(false); + useEffect(() => { const createSecurityPrompts = once(async () => { if ( @@ -183,15 +185,20 @@ export const AssistantProvider: FC> = ({ children }) assistantAvailability.isAssistantEnabled && assistantAvailability.hasAssistantPrivilege ) { - const res = await getPrompts({ - http, - toasts: notifications.toasts, - }); + try { + const res = await getPrompts({ + http, + toasts: notifications.toasts, + }); - if (res.total === 0) { - await createBasePrompts(notifications, http); - } + if (res.total === 0) { + await createBasePrompts(notifications, http); + } + // eslint-disable-next-line no-empty + } catch (e) {} } + + setBasePromptsLoaded(true); }); createSecurityPrompts(); }, [ @@ -205,6 +212,9 @@ export const AssistantProvider: FC> = ({ children }) const { signalIndexName } = useSignalIndex(); const alertsIndexPattern = signalIndexName ?? undefined; const toasts = useAppToasts() as unknown as IToasts; // useAppToasts is the current, non-deprecated method of getting the toasts service in the Security Solution, but it doesn't return the IToasts interface (defined by core) + // Because our conversations need an assigned system prompt at create time, + // we want to make sure the prompts are there before creating the first conversation + // however if there is an error fetching the prompts, we don't want to block the app return ( > = ({ children }) toasts={toasts} currentAppId={currentAppId ?? 'securitySolutionUI'} > - {children} + {basePromptsLoaded ? children : null} ); }; diff --git a/x-pack/plugins/security_solution/public/common/components/local_storage/helpers.test.ts b/x-pack/plugins/security_solution/public/common/components/local_storage/helpers.test.ts index 908dc0caf4ec9..bc174343b5bb2 100644 --- a/x-pack/plugins/security_solution/public/common/components/local_storage/helpers.test.ts +++ b/x-pack/plugins/security_solution/public/common/components/local_storage/helpers.test.ts @@ -9,7 +9,7 @@ import { TREEMAP_CATEGORY, ALERTS_PAGE, STACK_BY_SETTING_NAME, -} from '../../../detections/pages/detection_engine/chart_panels/alerts_local_storage/constants'; +} from '../../../detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants'; import { getSettingKey, isDefaultWhenEmptyString } from './helpers'; describe('helpers', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/local_storage/index.test.tsx b/x-pack/plugins/security_solution/public/common/components/local_storage/index.test.tsx index e13d48354cc3e..a7e37b50f88a7 100644 --- a/x-pack/plugins/security_solution/public/common/components/local_storage/index.test.tsx +++ b/x-pack/plugins/security_solution/public/common/components/local_storage/index.test.tsx @@ -14,7 +14,7 @@ import { EXPAND_SETTING_NAME, STACK_BY_SETTING_NAME, TREEMAP_CATEGORY, -} from '../../../detections/pages/detection_engine/chart_panels/alerts_local_storage/constants'; +} from '../../../detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants'; import { getSettingKey, isDefaultWhenEmptyString } from './helpers'; import { useKibana as mockUseKibana } from '../../lib/kibana/__mocks__'; import { useLocalStorage } from '.'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx index 84fba825b5965..c83650b8e15d8 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/alerts_count.tsx @@ -17,12 +17,9 @@ import type { AlertSearchResponse } from '../../../containers/detection_engine/a import { getMaxRiskSubAggregations, getUpToMaxBuckets, -} from '../../../../common/components/alerts_treemap/lib/helpers'; -import { getFlattenedBuckets } from '../../../../common/components/alerts_treemap/lib/flatten/get_flattened_buckets'; -import type { - FlattenedBucket, - RawBucket, -} from '../../../../common/components/alerts_treemap/types'; +} from '../alerts_treemap_panel/alerts_treemap/lib/helpers'; +import { getFlattenedBuckets } from '../alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets'; +import type { FlattenedBucket, RawBucket } from '../alerts_treemap_panel/alerts_treemap/types'; import { getMultiGroupAlertsCountTableColumns, getSingleGroupByAlertsCountTableColumns, diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/columns.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/columns.tsx index 938afdbd97afb..9b9e3081d2fe5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/columns.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/columns.tsx @@ -10,7 +10,7 @@ import type { EuiBasicTableColumn } from '@elastic/eui'; import numeral from '@elastic/numeral'; import { TableId } from '@kbn/securitysolution-data-table'; -import type { FlattenedBucket } from '../../../../common/components/alerts_treemap/types'; +import type { FlattenedBucket } from '../alerts_treemap_panel/alerts_treemap/types'; import { DefaultDraggable } from '../../../../common/components/draggables'; import type { GenericBuckets } from '../../../../../common/search_strategy/common'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx index d052af0ae0b9e..1537d1f1fd212 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/helpers.tsx @@ -6,7 +6,7 @@ */ import type { MappingRuntimeFields } from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { getOptionalSubAggregation } from '../../../../common/components/alerts_treemap/query'; +import { getOptionalSubAggregation } from '../alerts_treemap_panel/alerts_treemap/query'; export const DEFAULT_STACK_BY_FIELD0_SIZE = 1000; export const DEFAULT_STACK_BY_FIELD1_SIZE = 1000; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx index 9451ce6ca3b27..18d44abca441a 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/index.test.tsx @@ -15,8 +15,8 @@ import type { Status } from '../../../../../common/api/detection_engine'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config'; import { TestProviders } from '../../../../common/mock'; -import { ChartContextMenu } from '../../../pages/detection_engine/chart_panels/chart_context_menu'; -import { TABLE } from '../../../pages/detection_engine/chart_panels/chart_select/translations'; +import { ChartContextMenu } from '../chart_panels/chart_context_menu'; +import { TABLE } from '../chart_panels/chart_select/translations'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { VisualizationEmbeddable } from '../../../../common/components/visualization_actions/visualization_embeddable'; import type { ExperimentalFeatures } from '../../../../../common/experimental_features'; diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts index a26024b80dba7..737ff5f854775 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_count_panel/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { RawBucket } from '../../../../common/components/alerts_treemap/types'; +import type { RawBucket } from '../alerts_treemap_panel/alerts_treemap/types'; export interface AlertsCountAggregation { stackByField0: { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx index 03f8571aa8bc0..7e530ba26011f 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/helpers.tsx @@ -20,7 +20,7 @@ import { import { parseChartCollapseData, getIsChartCollapseAgg, -} from '../../../pages/detection_engine/chart_panels/chart_collapse/helpers'; +} from '../chart_panels/chart_collapse/helpers'; export const parseData = (data: AlertSearchResponse<{}, SummaryChartsAgg>) => { if (getIsAlertsBySeverityAgg(data)) { diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts index b54518140cb0e..9ed251fc5f713 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_summary_charts_panel/types.ts @@ -17,10 +17,7 @@ import type { AlertsByGroupingAgg, AlertsProgressBarData, } from '../alerts_progress_bar_panel/types'; -import type { - ChartCollapseAgg, - ChartCollapseData, -} from '../../../pages/detection_engine/chart_panels/chart_collapse/types'; +import type { ChartCollapseAgg, ChartCollapseData } from '../chart_panels/chart_collapse/types'; export type SummaryChartsAgg = Partial< AlertsBySeverityAgg | AlertsByTypeAgg | AlertsByGroupingAgg | ChartCollapseAgg | AlertsByRuleAgg diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.test.tsx similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.test.tsx index 75f641501dc52..ea0c7a3f2d0dd 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.test.tsx @@ -9,7 +9,7 @@ import { render, screen } from '@testing-library/react'; import { Settings } from '@elastic/charts'; import React from 'react'; -import { TestProviders } from '../../mock'; +import { TestProviders } from '../../../../../common/mock'; import { mockAlertSearchResponse, mockNoDataAlertSearchResponse, diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.tsx index f91cc487a1b55..ef7000f5037b3 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/index.tsx @@ -13,10 +13,10 @@ import React, { useCallback, useMemo } from 'react'; import styled from 'styled-components'; import { i18n } from '@kbn/i18n'; -import { useThemes } from '../charts/common'; -import { DraggableLegend } from '../charts/draggable_legend'; -import type { LegendItem } from '../charts/draggable_legend_item'; -import type { AlertSearchResponse } from '../../../detections/containers/detection_engine/alerts/types'; +import { useThemes } from '../../../../../common/components/charts/common'; +import { DraggableLegend } from '../../../../../common/components/charts/draggable_legend'; +import type { LegendItem } from '../../../../../common/components/charts/draggable_legend_item'; +import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types'; import { getRiskScorePalette, RISK_SCORE_STEPS } from './lib/chart_palette'; import { getFlattenedBuckets } from './lib/flatten/get_flattened_buckets'; import { getFlattenedLegendItems } from './lib/legend/get_flattened_legend_items'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts index 5af6071afd925..64bd8911ddcd6 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.test.ts @@ -14,7 +14,7 @@ import { RISK_SCORE_MEDIUM, RISK_SCORE_HIGH, RISK_SCORE_CRITICAL, -} from '../../../../constants'; +} from '../../../../../../../common/constants'; import { getFillColor, getRiskScorePalette, RISK_SCORE_STEPS } from '.'; describe('getFillColor', () => { diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.ts similarity index 97% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.ts index c4f044e04c100..7cc31c76b112e 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/chart_palette/index.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/chart_palette/index.ts @@ -15,7 +15,7 @@ import { RISK_SCORE_MEDIUM, RISK_SCORE_HIGH, RISK_SCORE_CRITICAL, -} from '../../../../constants'; +} from '../../../../../../../common/constants'; /** * The detection engine creates risk scores in the range 1 - 100. diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/flatten_bucket.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/flatten_bucket.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/flatten_bucket.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/flatten_bucket.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/flatten_bucket.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/flatten_bucket.ts similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/flatten_bucket.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/flatten_bucket.ts index c0780b4e7bd66..2f0f2358416ef 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/flatten_bucket.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/flatten_bucket.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers'; +import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers'; import type { RawBucket, FlattenedBucket } from '../../types'; export const flattenBucket = ({ diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/get_flattened_buckets.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/get_flattened_buckets.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/get_flattened_buckets.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/get_flattened_buckets.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/get_flattened_buckets.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/mocks/mock_buckets.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/mocks/mock_buckets.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/mocks/mock_buckets.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/mocks/mock_buckets.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/mocks/mock_flattened_buckets.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/mocks/mock_flattened_buckets.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/flatten/mocks/mock_flattened_buckets.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/flatten/mocks/mock_flattened_buckets.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/helpers.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/helpers.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers.ts similarity index 94% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/helpers.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers.ts index e41d2ddeacaca..c2f49187d9a50 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/helpers.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers.ts @@ -13,7 +13,7 @@ import type { WordCloudElementEvent, XYChartElementEvent, } from '@elastic/charts'; -import { firstNonNullValue } from '../../../../../common/endpoint/models/ecs_safety_helpers'; +import { firstNonNullValue } from '../../../../../../../common/endpoint/models/ecs_safety_helpers'; import type { RawBucket } from '../types'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/labels/index.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/labels/index.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/labels/index.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/labels/index.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/labels/index.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/labels/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/labels/index.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/labels/index.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/layers/index.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/layers/index.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/layers/index.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/layers/index.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/layers/index.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts similarity index 97% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts index 16599810b6a81..c0fb3383a2556 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.test.ts @@ -7,7 +7,7 @@ import { omit } from 'lodash/fp'; -import type { LegendItem } from '../../../charts/draggable_legend_item'; +import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item'; import { getRiskScorePalette, RISK_SCORE_STEPS } from '../chart_palette'; import { getFlattenedLegendItems } from './get_flattened_legend_items'; import { bucketsWithStackByField1, maxRiskSubAggregations } from '../flatten/mocks/mock_buckets'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.ts similarity index 89% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.ts index 5b8ba7230485a..0799707df9eab 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/get_flattened_legend_items.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/get_flattened_legend_items.ts @@ -5,8 +5,8 @@ * 2.0. */ -import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers'; -import type { LegendItem } from '../../../charts/draggable_legend_item'; +import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers'; +import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item'; import { getLegendMap, getLegendItemFromFlattenedBucket } from '.'; import type { FlattenedBucket, RawBucket } from '../../types'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts index 229dcafb0012a..fe136924576a8 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.test.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.test.ts @@ -7,7 +7,7 @@ import { omit } from 'lodash/fp'; -import type { LegendItem } from '../../../charts/draggable_legend_item'; +import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item'; import { getRiskScorePalette, RISK_SCORE_STEPS } from '../chart_palette'; import { bucketsWithStackByField1, maxRiskSubAggregations } from '../flatten/mocks/mock_buckets'; import { diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.ts similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.ts index 9409d4f174730..b35fb012a7eb1 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/legend/index.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/legend/index.ts @@ -8,10 +8,10 @@ import { v4 as uuidv4 } from 'uuid'; import { TableId } from '@kbn/securitysolution-data-table'; -import { firstNonNullValue } from '../../../../../../common/endpoint/models/ecs_safety_helpers'; -import type { LegendItem } from '../../../charts/draggable_legend_item'; +import { firstNonNullValue } from '../../../../../../../../common/endpoint/models/ecs_safety_helpers'; +import type { LegendItem } from '../../../../../../../common/components/charts/draggable_legend_item'; import { getFillColor } from '../chart_palette'; -import { escapeDataProviderId } from '../../../drag_and_drop/helpers'; +import { escapeDataProviderId } from '../../../../../../../common/components/drag_and_drop/helpers'; import { getLabel } from '../labels'; import type { FlattenedBucket, RawBucket } from '../../types'; diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/mocks/mock_alert_search_response.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/mocks/mock_alert_search_response.ts similarity index 98% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/mocks/mock_alert_search_response.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/mocks/mock_alert_search_response.ts index 59f0de746dd50..00417ff0008b5 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/lib/mocks/mock_alert_search_response.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/mocks/mock_alert_search_response.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { AlertSearchResponse } from '../../../../../detections/containers/detection_engine/alerts/types'; +import type { AlertSearchResponse } from '../../../../../../containers/detection_engine/alerts/types'; import type { AlertsTreeMapAggregation } from '../../types'; export const mockAlertSearchResponse: AlertSearchResponse = { diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/no_data/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/no_data/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/no_data/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/no_data/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/no_data/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/no_data/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/no_data/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/no_data/index.tsx diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/query/index.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/query/index.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/query/index.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/query/index.test.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/query/index.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/query/index.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/query/index.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/query/index.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/translations.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/translations.ts diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/types.ts similarity index 91% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap/types.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/types.ts index 62c832fd457bc..74e30a7d6e6fa 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/types.ts @@ -5,7 +5,7 @@ * 2.0. */ -import type { GenericBuckets } from '../../../../common/search_strategy/common'; +import type { GenericBuckets } from '../../../../../../common/search_strategy/common'; export type RawBucket = GenericBuckets & { maxRiskSubAggregation?: { diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.test.tsx similarity index 86% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.test.tsx index 07342c4f60691..6ad6ae488ce5e 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.test.tsx @@ -9,24 +9,21 @@ import { render, screen, waitFor } from '@testing-library/react'; import React from 'react'; import { useLocation } from 'react-router-dom'; -import { SecurityPageName } from '../../../../common/constants'; -import { - DEFAULT_STACK_BY_FIELD, - DEFAULT_STACK_BY_FIELD1, -} from '../../../detections/components/alerts_kpis/common/config'; -import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query'; -import { ChartContextMenu } from '../../../detections/pages/detection_engine/chart_panels/chart_context_menu'; -import { ChartSelect } from '../../../detections/pages/detection_engine/chart_panels/chart_select'; -import { TREEMAP } from '../../../detections/pages/detection_engine/chart_panels/chart_select/translations'; -import { TestProviders } from '../../mock/test_providers'; +import { SecurityPageName } from '../../../../../common/constants'; +import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config'; +import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query'; +import { ChartContextMenu } from '../chart_panels/chart_context_menu'; +import { ChartSelect } from '../chart_panels/chart_select'; +import { TREEMAP } from '../chart_panels/chart_select/translations'; +import { TestProviders } from '../../../../common/mock/test_providers'; import type { Props } from '.'; import { AlertsTreemapPanel } from '.'; -import { mockAlertSearchResponse } from '../alerts_treemap/lib/mocks/mock_alert_search_response'; +import { mockAlertSearchResponse } from './alerts_treemap/lib/mocks/mock_alert_search_response'; const from = '2022-07-28T08:20:18.966Z'; const to = '2022-07-28T08:20:18.966Z'; -jest.mock('../../containers/use_global_time', () => { - const actual = jest.requireActual('../../containers/use_global_time'); +jest.mock('../../../../common/containers/use_global_time', () => { + const actual = jest.requireActual('../../../../common/containers/use_global_time'); return { ...actual, useGlobalTime: jest @@ -40,15 +37,15 @@ jest.mock('react-router-dom', () => { return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -jest.mock('../../lib/kibana', () => { - const originalModule = jest.requireActual('../../lib/kibana'); +jest.mock('../../../../common/lib/kibana', () => { + const originalModule = jest.requireActual('../../../../common/lib/kibana'); return { ...originalModule, useUiSetting$: () => ['0,0.[000]'], }; }); -jest.mock('../../../detections/containers/detection_engine/alerts/use_query', () => ({ +jest.mock('../../../containers/detection_engine/alerts/use_query', () => ({ useQueryAlerts: jest.fn(), })); @@ -275,7 +272,7 @@ describe('AlertsTreemapPanel', () => { }); it('renders the treemap when data is available and `isPanelExpanded` is true', async () => { - jest.mock('../../../detections/containers/detection_engine/alerts/use_query', () => { + jest.mock('../../../containers/detection_engine/alerts/use_query', () => { return { useQueryAlerts: () => ({ loading: true, diff --git a/x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.tsx index 176671fa33667..daff3097acb4d 100644 --- a/x-pack/plugins/security_solution/public/common/components/alerts_treemap_panel/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/alerts_treemap_panel/index.tsx @@ -14,18 +14,18 @@ import { getEsQueryConfig } from '@kbn/data-plugin/common'; import React, { useEffect, useMemo } from 'react'; import { v4 as uuidv4 } from 'uuid'; -import { useGlobalTime } from '../../containers/use_global_time'; -import { AlertsTreemap, DEFAULT_MIN_CHART_HEIGHT } from '../alerts_treemap'; -import { KpiPanel } from '../../../detections/components/alerts_kpis/common/components'; -import { useInspectButton } from '../../../detections/components/alerts_kpis/common/hooks'; -import { useQueryAlerts } from '../../../detections/containers/detection_engine/alerts/use_query'; -import { ALERTS_QUERY_NAMES } from '../../../detections/containers/detection_engine/alerts/constants'; -import { FieldSelection } from '../field_selection'; -import { HeaderSection } from '../header_section'; -import { InspectButtonContainer } from '../inspect'; -import { DEFAULT_STACK_BY_FIELD0_SIZE, getAlertsRiskQuery } from '../alerts_treemap/query'; -import type { AlertsTreeMapAggregation } from '../alerts_treemap/types'; -import { useKibana } from '../../lib/kibana'; +import { useGlobalTime } from '../../../../common/containers/use_global_time'; +import { AlertsTreemap, DEFAULT_MIN_CHART_HEIGHT } from './alerts_treemap'; +import { KpiPanel } from '../common/components'; +import { useInspectButton } from '../common/hooks'; +import { useQueryAlerts } from '../../../containers/detection_engine/alerts/use_query'; +import { ALERTS_QUERY_NAMES } from '../../../containers/detection_engine/alerts/constants'; +import { FieldSelection } from '../../../../common/components/field_selection'; +import { HeaderSection } from '../../../../common/components/header_section'; +import { InspectButtonContainer } from '../../../../common/components/inspect'; +import { DEFAULT_STACK_BY_FIELD0_SIZE, getAlertsRiskQuery } from './alerts_treemap/query'; +import type { AlertsTreeMapAggregation } from './alerts_treemap/types'; +import { useKibana } from '../../../../common/lib/kibana'; const DEFAULT_HEIGHT = DEFAULT_MIN_CHART_HEIGHT + 134; // px diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/constants.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/constants.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/constants.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx similarity index 94% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx index 468edd14575c2..a7c795037df86 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/index.tsx @@ -24,14 +24,11 @@ import { VIEW_CATEGORY, GROUP_BY_SETTING_NAME, } from './constants'; -import { - DEFAULT_STACK_BY_FIELD, - DEFAULT_STACK_BY_FIELD1, -} from '../../../../components/alerts_kpis/common/config'; +import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../../common/config'; import type { AlertsSettings } from './types'; import type { AlertViewSelection } from '../chart_select/helpers'; import { CHARTS_ID, TREND_ID } from '../chart_select/helpers'; -import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types'; +import type { GroupBySelection } from '../../alerts_progress_bar_panel/types'; import { useIsExperimentalFeatureEnabled } from '../../../../../common/hooks/use_experimental_features'; export const useAlertsLocalStorage = (): AlertsSettings => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/types.ts similarity index 91% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/types.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/types.ts index 88a73579c764f..57266a92fc743 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/alerts_local_storage/types.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/alerts_local_storage/types.ts @@ -6,7 +6,7 @@ */ import type { AlertViewSelection } from '../chart_select/helpers'; -import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types'; +import type { GroupBySelection } from '../../alerts_progress_bar_panel/types'; export interface AlertsSettings { alertViewSelection: AlertViewSelection; countTableStackBy0: string; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.test.tsx similarity index 87% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.test.tsx index ff03ddb279b72..79491ddda7520 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.test.tsx @@ -8,8 +8,8 @@ import { parseChartCollapseData } from './helpers'; import * as mock from './mock_data'; import type { ChartCollapseAgg } from './types'; import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types'; -import { getGroupByLabel } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/helpers'; -import * as i18n from '../../../../components/alerts_kpis/alerts_progress_bar_panel/translations'; +import { getGroupByLabel } from '../../alerts_progress_bar_panel/helpers'; +import * as i18n from '../../alerts_progress_bar_panel/translations'; describe('parse chart collapse data', () => { test('parse alerts with data', () => { diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.tsx similarity index 88% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.tsx index c6ba7ce42836f..b7100832280ba 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/helpers.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/helpers.tsx @@ -8,12 +8,9 @@ import { has } from 'lodash'; import type { ChartCollapseAgg, ChartCollapseData } from './types'; import type { AlertSearchResponse } from '../../../../containers/detection_engine/alerts/types'; -import type { - SummaryChartsData, - SummaryChartsAgg, -} from '../../../../components/alerts_kpis/alerts_summary_charts_panel/types'; +import type { SummaryChartsData, SummaryChartsAgg } from '../../alerts_summary_charts_panel/types'; import { severityLabels } from '../../../../../overview/components/detection_response/alerts_by_status/use_alerts_by_status'; -import { UNKNOWN_SEVERITY } from '../../../../components/alerts_kpis/severity_level_panel/translations'; +import { UNKNOWN_SEVERITY } from '../../severity_level_panel/translations'; export const parseChartCollapseData = ( response: AlertSearchResponse<{}, ChartCollapseAgg> diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.test.tsx similarity index 91% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.test.tsx index 26aadc1783432..aea700c44a235 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.test.tsx @@ -7,10 +7,10 @@ import { render } from '@testing-library/react'; import React from 'react'; -import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types'; +import type { GroupBySelection } from '../../alerts_progress_bar_panel/types'; import { TestProviders } from '../../../../../common/mock'; import { ChartCollapse } from '.'; -import { useSummaryChartData } from '../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data'; +import { useSummaryChartData } from '../../alerts_summary_charts_panel/use_summary_chart_data'; import * as mock from './mock_data'; jest.mock('../../../../../common/lib/kibana'); @@ -19,7 +19,7 @@ jest.mock('react-router-dom', () => { const actual = jest.requireActual('react-router-dom'); return { ...actual, useLocation: jest.fn().mockReturnValue({ pathname: '' }) }; }); -jest.mock('../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data'); +jest.mock('../../alerts_summary_charts_panel/use_summary_chart_data'); const defaultProps = { groupBySelection: 'host.name' as GroupBySelection, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.tsx similarity index 92% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.tsx index c35d6d57456d8..dbeea09315331 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/index.tsx @@ -12,11 +12,11 @@ import { v4 as uuid } from 'uuid'; import { capitalize } from 'lodash'; import React, { useMemo } from 'react'; import styled from 'styled-components'; -import type { GroupBySelection } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/types'; -import { getGroupByLabel } from '../../../../components/alerts_kpis/alerts_progress_bar_panel/helpers'; +import type { GroupBySelection } from '../../alerts_progress_bar_panel/types'; +import { getGroupByLabel } from '../../alerts_progress_bar_panel/helpers'; import { InspectButton, InspectButtonContainer } from '../../../../../common/components/inspect'; -import { useSummaryChartData } from '../../../../components/alerts_kpis/alerts_summary_charts_panel/use_summary_chart_data'; -import { getSeverityColor } from '../../../../components/alerts_kpis/severity_level_panel/helpers'; +import { useSummaryChartData } from '../../alerts_summary_charts_panel/use_summary_chart_data'; +import { getSeverityColor } from '../../severity_level_panel/helpers'; import { FormattedCount } from '../../../../../common/components/formatted_number'; import { getIsChartCollapseData } from './helpers'; import * as i18n from './translations'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/mock_data.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/mock_data.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/mock_data.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/mock_data.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/translations.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/types.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/types.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_collapse/types.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_collapse/types.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_context_menu/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_context_menu/index.test.tsx similarity index 96% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_context_menu/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_context_menu/index.test.tsx index b36ab4a99b371..f405244eff60d 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_context_menu/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_context_menu/index.test.tsx @@ -12,10 +12,7 @@ import React from 'react'; import { RESET_GROUP_BY_FIELDS } from '../../../../../common/components/chart_settings_popover/configurations/default/translations'; import { CHART_SETTINGS_POPOVER_ARIA_LABEL } from '../../../../../common/components/chart_settings_popover/translations'; import { INSPECT } from '../../../../../common/components/inspect/translations'; -import { - DEFAULT_STACK_BY_FIELD, - DEFAULT_STACK_BY_FIELD1, -} from '../../../../components/alerts_kpis/common/config'; +import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../../common/config'; import { TestProviders } from '../../../../../common/mock'; import { ChartContextMenu } from '.'; diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_context_menu/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_context_menu/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_context_menu/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_context_menu/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/helpers.test.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/helpers.test.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.test.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/helpers.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/helpers.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/helpers.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.test.tsx diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/index.tsx diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/translations.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts similarity index 100% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/chart_select/translations.ts rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/chart_select/translations.ts diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx similarity index 99% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx index 4fde4b870693b..dea6278dc5db9 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.test.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.test.tsx @@ -19,7 +19,7 @@ import { ChartPanels } from '.'; import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; import { LensEmbeddable } from '../../../../common/components/visualization_actions/lens_embeddable'; -import { createResetGroupByFieldAction } from '../../../components/alerts_kpis/alerts_histogram_panel/helpers'; +import { createResetGroupByFieldAction } from '../alerts_histogram_panel/helpers'; jest.mock('./alerts_local_storage'); jest.mock('../../../../sourcerer/containers'); diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx similarity index 93% rename from x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx rename to x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx index aaae411319a58..edbfe756acfd6 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/chart_panels/index.tsx +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_kpis/chart_panels/index.tsx @@ -17,21 +17,18 @@ import { ChartContextMenu } from './chart_context_menu'; import { ChartSelect } from './chart_select'; import { ChartCollapse } from './chart_collapse'; import * as i18n from './chart_select/translations'; -import { AlertsTreemapPanel } from '../../../../common/components/alerts_treemap_panel'; +import { AlertsTreemapPanel } from '../alerts_treemap_panel'; import type { RunTimeMappings } from '../../../../sourcerer/store/model'; import type { UpdateDateRange } from '../../../../common/components/charts/common'; import { useEuiComboBoxReset } from '../../../../common/components/use_combo_box_reset'; -import { AlertsHistogramPanel } from '../../../components/alerts_kpis/alerts_histogram_panel'; -import { AlertsSummaryChartsPanel } from '../../../components/alerts_kpis/alerts_summary_charts_panel'; -import { - DEFAULT_STACK_BY_FIELD, - DEFAULT_STACK_BY_FIELD1, -} from '../../../components/alerts_kpis/common/config'; -import { AlertsCountPanel } from '../../../components/alerts_kpis/alerts_count_panel'; -import { GROUP_BY_LABEL } from '../../../components/alerts_kpis/common/translations'; +import { AlertsHistogramPanel } from '../alerts_histogram_panel'; +import { AlertsSummaryChartsPanel } from '../alerts_summary_charts_panel'; +import { DEFAULT_STACK_BY_FIELD, DEFAULT_STACK_BY_FIELD1 } from '../common/config'; +import { AlertsCountPanel } from '../alerts_count_panel'; +import { GROUP_BY_LABEL } from '../common/translations'; import { useQueryToggle } from '../../../../common/containers/query_toggle'; -import type { AddFilterProps } from '../../../components/alerts_kpis/common/types'; -import { createResetGroupByFieldAction } from '../../../components/alerts_kpis/alerts_histogram_panel/helpers'; +import type { AddFilterProps } from '../common/types'; +import { createResetGroupByFieldAction } from '../alerts_histogram_panel/helpers'; const TREND_CHART_HEIGHT = 240; // px const CHART_PANEL_HEIGHT = 375; // px diff --git a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/mock.ts b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/mock.ts index d9c0d7aa8f8eb..93fbb90ede9e5 100644 --- a/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/mock.ts +++ b/x-pack/plugins/security_solution/public/detections/components/alerts_table/grouping_settings/mock.ts @@ -5,7 +5,7 @@ * 2.0. */ -import { mockAlertSearchResponse } from '../../../../common/components/alerts_treemap/lib/mocks/mock_alert_search_response'; +import { mockAlertSearchResponse } from '../../alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/mocks/mock_alert_search_response'; export const getQuery = ( selectedGroup: string, diff --git a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx index 284c9451c3e85..e43af8d02dcb0 100644 --- a/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx +++ b/x-pack/plugins/security_solution/public/detections/pages/detection_engine/detection_engine.tsx @@ -70,7 +70,7 @@ import { buildShowBuildingBlockFilter, buildThreatMatchFilter, } from '../../components/alerts_table/default_config'; -import { ChartPanels } from './chart_panels'; +import { ChartPanels } from '../../components/alerts_kpis/chart_panels'; import { useSourcererDataView } from '../../../sourcerer/containers'; import { useSignalHelpers } from '../../../sourcerer/containers/use_signal_helpers'; diff --git a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap index 22a13d29278da..a14cc0ab81115 100644 --- a/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap +++ b/x-pack/plugins/security_solution/public/explore/components/authentication/__snapshots__/authentications_host_table.test.tsx.snap @@ -352,10 +352,10 @@ exports[`Authentication Host Table Component rendering it renders the host authe
- - + + = ({ onChange={onChange} sorting={tableSorting} /> - - + + {itemsPerRow && itemsPerRow.length > 0 && totalCount >= itemsPerRow[0].numberOfRow && ( diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx index bc11fc4653ad0..54dce8a6e4add 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/get_processes_action.tsx @@ -6,47 +6,15 @@ */ import React, { memo, useMemo } from 'react'; -import styled from 'styled-components'; -import { EuiBasicTable, EuiSpacer } from '@elastic/eui'; -import { i18n } from '@kbn/i18n'; -import { ResponseActionFileDownloadLink } from '../../response_action_file_download_link'; -import { KeyValueDisplay } from '../../key_value_display'; +import { RunningProcessesActionResults } from '../../running_processes_action_results'; import { useConsoleActionSubmitter } from '../hooks/use_console_action_submitter'; import type { - ActionDetails, GetProcessesActionOutputContent, - MaybeImmutable, ProcessesRequestBody, } from '../../../../../common/endpoint/types'; import { useSendGetEndpointProcessesRequest } from '../../../hooks/response_actions/use_send_get_endpoint_processes_request'; import type { ActionRequestComponentProps } from '../types'; -// @ts-expect-error TS2769 -const StyledEuiBasicTable = styled(EuiBasicTable)` - table { - background-color: transparent; - } - - .euiTableHeaderCell { - border-bottom: ${(props) => props.theme.eui.euiBorderThin}; - - .euiTableCellContent__text { - font-weight: ${(props) => props.theme.eui.euiFontWeightRegular}; - } - } - - .euiTableRow { - &:hover { - background-color: ${({ theme: { eui } }) => eui.euiColorEmptyShade} !important; - } - - .euiTableRowCell { - border-top: none !important; - border-bottom: none !important; - } - } -`; - export const GetProcessesActionResult = memo( ({ command, setStore, store, status, setStatus, ResultComponent }) => { const { endpointId, agentType } = command.commandDefinition?.meta ?? {}; @@ -84,141 +52,12 @@ export const GetProcessesActionResult = memo( // Show results return ( - {agentType === 'sentinel_one' ? ( - - ) : ( - - )} + ); } ); GetProcessesActionResult.displayName = 'GetProcessesActionResult'; - -interface EndpointRunningProcessesResultsProps { - action: MaybeImmutable>; - /** If defined, only the results for the given agent id will be displayed. Else, all agents output will be displayed */ - agentId?: string; -} - -const EndpointRunningProcessesResults = memo( - ({ action, agentId }) => { - const agentIds: string[] = agentId ? [agentId] : [...action.agents]; - const columns = useMemo( - () => [ - { - field: 'user', - 'data-test-subj': 'process_list_user', - name: i18n.translate( - 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.user', - { defaultMessage: 'USER' } - ), - width: '10%', - }, - { - field: 'pid', - 'data-test-subj': 'process_list_pid', - name: i18n.translate( - 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.pid', - { defaultMessage: 'PID' } - ), - width: '5%', - }, - { - field: 'entity_id', - 'data-test-subj': 'process_list_entity_id', - name: i18n.translate( - 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.enityId', - { defaultMessage: 'ENTITY ID' } - ), - width: '30%', - }, - - { - field: 'command', - 'data-test-subj': 'process_list_command', - name: i18n.translate( - 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.command', - { defaultMessage: 'COMMAND' } - ), - width: '55%', - }, - ], - [] - ); - - return ( - <> - {agentIds.length > 1 ? ( - agentIds.map((id) => { - const hostName = action.hosts[id].name; - - return ( -
- - } - /> - -
- ); - }) - ) : ( - - )} - - ); - } -); -EndpointRunningProcessesResults.displayName = 'EndpointRunningProcessesResults'; - -interface SentinelOneRunningProcessesResultsProps { - action: MaybeImmutable>; - /** - * If defined, the results will only be displayed for the given agent id. - * If undefined, then responses for all agents are displayed - */ - agentId?: string; -} - -const SentinelOneRunningProcessesResults = memo( - ({ action, agentId }) => { - const agentIds = agentId ? [agentId] : action.agents; - - return ( - <> - {agentIds.length === 1 ? ( - - ) : ( - agentIds.map((id) => { - return ( -
- - } - /> -
- ); - }) - )} - - ); - } -); -SentinelOneRunningProcessesResults.displayName = 'SentinelOneRunningProcessesResults'; diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx index bf19e565bac9c..9897319a24900 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_responder/command_render_components/integration_tests/get_processes_action.test.tsx @@ -24,6 +24,11 @@ import type { import { ENDPOINT_CAPABILITIES } from '../../../../../../common/endpoint/service/response_actions/constants'; import { UPGRADE_AGENT_FOR_RESPONDER } from '../../../../../common/translations'; import type { CommandDefinition } from '../../../console'; +import { useUserPrivileges as _useUserPrivileges } from '../../../../../common/components/user_privileges'; + +jest.mock('../../../../../common/components/user_privileges'); + +const useUserPrivilegesMock = _useUserPrivileges as jest.Mock; describe('When using processes action from response actions console', () => { let mockedContext: AppContextTestRender; @@ -35,6 +40,7 @@ describe('When using processes action from response actions console', () => { >; let consoleSelectors: ReturnType; let consoleCommands: CommandDefinition[]; + let userAuthzMock: ReturnType; const setConsoleCommands = ( capabilities: EndpointCapabilities[] = [...ENDPOINT_CAPABILITIES], @@ -56,6 +62,7 @@ describe('When using processes action from response actions console', () => { beforeEach(() => { mockedContext = createAppRootMockRenderer(); + userAuthzMock = mockedContext.getUserPrivilegesMockSetter(useUserPrivilegesMock); apiMocks = responseActionsHttpMocks(mockedContext.coreStart.http); setConsoleCommands(); @@ -245,6 +252,20 @@ describe('When using processes action from response actions console', () => { beforeEach(() => { mockedContext.setExperimentalFlag({ responseActionsSentinelOneProcessesEnabled: true }); setConsoleCommands([], 'sentinel_one'); + + const processesResponse = apiMocks.responseProvider.processes(); + processesResponse.data.agentType = 'sentinel_one'; + apiMocks.responseProvider.processes.mockReturnValue(processesResponse); + apiMocks.responseProvider.processes.mockClear(); + + const actionDetails = apiMocks.responseProvider.actionDetails({ + path: '/api/endpoint/action/1.2.3', + }); + actionDetails.data.agentType = 'sentinel_one'; + apiMocks.responseProvider.actionDetails.mockReturnValue(actionDetails); + apiMocks.responseProvider.actionDetails.mockClear(); + + userAuthzMock.set({ canGetRunningProcesses: true }); }); it('should display processes command --help', async () => { @@ -293,7 +314,7 @@ describe('When using processes action from response actions console', () => { await waitFor(() => { expect(renderResult.getByTestId('getProcessesSuccessCallout').textContent).toEqual( - 'Click here to download(ZIP file passcode: elastic).' + + 'Click here to download(ZIP file passcode: Elastic@123).' + 'Files are periodically deleted to clear storage space. Download and save file locally if needed.' ); }); diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx index 6d1a20a5d28f1..cba1d0aee41b4 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/components/action_log_expanded_tray.tsx @@ -16,12 +16,13 @@ import { import { css, euiStyled } from '@kbn/kibana-react-plugin/common'; import { reduce } from 'lodash'; import { i18n } from '@kbn/i18n'; -import { useIsExperimentalFeatureEnabled } from '../../../../common/hooks/use_experimental_features'; +import { RunningProcessesActionResults } from '../../running_processes_action_results'; import { getAgentTypeName } from '../../../../common/translations'; import { RESPONSE_ACTION_API_COMMAND_TO_CONSOLE_COMMAND_MAP } from '../../../../../common/endpoint/service/response_actions/constants'; import { isExecuteAction, isGetFileAction, + isProcessesAction, isUploadAction, } from '../../../../../common/endpoint/service/response_actions/type_guards'; import { EndpointUploadActionResult } from '../../endpoint_upload_action_result'; @@ -86,7 +87,8 @@ const StyledEuiFlexGroup = euiStyled(EuiFlexGroup).attrs({ className: 'eui-yScrollWithShadows', gutterSize: 's', })` - max-height: 270px; + max-height: 40vh; + min-height: 270px; overflow-y: auto; `; @@ -193,9 +195,24 @@ const OutputContent = memo<{ ); } + if (isProcessesAction(action)) { + return ( + +

{OUTPUT_MESSAGES.wasSuccessful(command)}

+ + +
+ ); + } + if (action.agentType === 'crowdstrike') { return <>{OUTPUT_MESSAGES.submittedSuccessfully(command)}; } + return <>{OUTPUT_MESSAGES.wasSuccessful(command)}; }); @@ -209,10 +226,6 @@ export const ActionsLogExpandedTray = memo<{ }>(({ action, fromAlertWorkaround = false, 'data-test-subj': dataTestSubj }) => { const getTestId = useTestIdGenerator(dataTestSubj); - const isSentinelOneV1Enabled = useIsExperimentalFeatureEnabled( - 'responseActionsSentinelOneV1Enabled' - ); - const { hosts, startedAt, @@ -277,14 +290,11 @@ export const ActionsLogExpandedTray = memo<{ [] as string[] ).join(', ') || emptyValue, }, - ]; - - if (isSentinelOneV1Enabled) { - list.push({ + { title: OUTPUT_MESSAGES.expandSection.agentType, description: getAgentTypeName(agentType) || emptyValue, - }); - } + }, + ]; return list.map(({ title, description }) => { return { @@ -296,17 +306,7 @@ export const ActionsLogExpandedTray = memo<{ ), }; }); - }, [ - agentType, - command, - comment, - completedAt, - getTestId, - hosts, - isSentinelOneV1Enabled, - parametersList, - startedAt, - ]); + }, [agentType, command, comment, completedAt, getTestId, hosts, parametersList, startedAt]); const outputList = useMemo( () => [ diff --git a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx index 48cc21f4f5a55..b764880257b08 100644 --- a/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx +++ b/x-pack/plugins/security_solution/public/management/components/endpoint_response_actions_list/integration_tests/response_actions_log.test.tsx @@ -353,16 +353,15 @@ describe('Response actions history', () => { }); it('should show multiple hostnames correctly', async () => { - const data = await getActionListMock({ actionCount: 1 }); - data.data[0] = { - ...data.data[0], + const data = await getActionListMock({ + actionCount: 1, hosts: { - ...data.data[0].hosts, 'agent-b': { name: 'Host-agent-b' }, 'agent-c': { name: '' }, 'agent-d': { name: 'Host-agent-d' }, }, - }; + agentIds: ['agent-a', 'agent-b', 'agent-c', 'agent-d'], + }); useGetEndpointActionListMock.mockReturnValue({ ...getBaseMockedActionList(), @@ -376,14 +375,11 @@ describe('Response actions history', () => { }); it('should show display host is unenrolled for a single agent action when metadata host name is empty', async () => { - const data = await getActionListMock({ actionCount: 1 }); - data.data[0] = { - ...data.data[0], - hosts: { - ...data.data[0].hosts, - 'agent-a': { name: '' }, - }, - }; + const data = await getActionListMock({ + actionCount: 1, + agentIds: ['agent-a'], + hosts: { 'agent-a': { name: '' } }, + }); useGetEndpointActionListMock.mockReturnValue({ ...getBaseMockedActionList(), @@ -397,16 +393,15 @@ describe('Response actions history', () => { }); it('should show display host is unenrolled for a single agent action when metadata host names are empty', async () => { - const data = await getActionListMock({ actionCount: 1 }); - data.data[0] = { - ...data.data[0], + const data = await getActionListMock({ + actionCount: 1, + agentIds: ['agent-a', 'agent-b', 'agent-c'], hosts: { - ...data.data[0].hosts, 'agent-a': { name: '' }, 'agent-b': { name: '' }, 'agent-c': { name: '' }, }, - }; + }); useGetEndpointActionListMock.mockReturnValue({ ...getBaseMockedActionList(), diff --git a/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/index.ts b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/index.ts new file mode 100644 index 0000000000000..b741431299ea3 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export * from './running_processes_action_results'; diff --git a/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.test.tsx b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.test.tsx new file mode 100644 index 0000000000000..2f4a25ec0cf4a --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.test.tsx @@ -0,0 +1,99 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; +import type { AppContextTestRender } from '../../../common/mock/endpoint'; +import { createAppRootMockRenderer } from '../../../common/mock/endpoint'; +import type { + ActionDetails, + GetProcessesActionOutputContent, +} from '../../../../common/endpoint/types'; +import { RunningProcessesActionResults } from './running_processes_action_results'; +import { useUserPrivileges as _useUserPrivileges } from '../../../common/components/user_privileges'; +import { responseActionsHttpMocks } from '../../mocks/response_actions_http_mocks'; +import { waitFor } from '@testing-library/react'; + +jest.mock('../../../common/components/user_privileges'); + +const useUserPrivilegesMock = _useUserPrivileges as jest.Mock; + +describe('Running Processes Action Results component', () => { + let appTestContext: AppContextTestRender; + let renderResult: ReturnType; + let render: () => ReturnType; + let setUserPrivileges: ReturnType; + let action: ActionDetails; + let agentId: string | undefined; + + beforeEach(() => { + action = new EndpointActionGenerator('seed').generateActionDetails({ + agents: ['agent-a', 'agent-b'], + command: 'running-processes', + }); + + agentId = 'agent-b'; + appTestContext = createAppRootMockRenderer(); + setUserPrivileges = appTestContext.getUserPrivilegesMockSetter(useUserPrivilegesMock); + setUserPrivileges.set({ canGetRunningProcesses: true }); + + responseActionsHttpMocks(appTestContext.coreStart.http); + + render = () => { + renderResult = appTestContext.render( + + ); + + return renderResult; + }; + }); + + afterEach(() => { + setUserPrivileges.reset(); + }); + + it('should display output content for endpoint agent', () => { + render(); + + expect( + Array.from(renderResult.getByTestId('test-processListTable').querySelectorAll('th')).map( + ($th) => $th.textContent + ) + ).toEqual(['USER', 'PID', 'ENTITY ID', 'COMMAND']); + }); + + it('should display output content sentinelone agent type', async () => { + action.agentType = 'sentinel_one'; + render(); + + await waitFor(() => { + expect(renderResult.getByTestId('test-download')); + }); + }); + + it('should display nothing if agent type does not support processes', () => { + action.agentType = 'crowdstrike'; + render(); + + expect(renderResult.queryByTestId('test')).toBeNull(); + }); + + it('should display output for actions sent to multiple agents', () => { + agentId = undefined; + render(); + + expect(renderResult.queryAllByTestId('test-processListTable')).toHaveLength(2); + }); + + it('should display nothing for SentinelOne when user has no authz', () => { + setUserPrivileges.set({ canGetRunningProcesses: false }); + action.agentType = 'sentinel_one'; + render(); + + expect(renderResult.queryByTestId('test')).toBeNull(); + }); +}); diff --git a/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.tsx b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.tsx new file mode 100644 index 0000000000000..e35fe1fff1a08 --- /dev/null +++ b/x-pack/plugins/security_solution/public/management/components/running_processes_action_results/running_processes_action_results.tsx @@ -0,0 +1,285 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { memo, useMemo } from 'react'; +import { i18n } from '@kbn/i18n'; +import type { EuiAccordionProps, EuiTextProps } from '@elastic/eui'; +import { EuiAccordion, EuiBasicTable, EuiSpacer, EuiText, useGeneratedHtmlId } from '@elastic/eui'; +import styled from 'styled-components'; +import { FormattedMessage } from '@kbn/i18n-react'; +import { css } from '@emotion/css'; +import { useUserPrivileges } from '../../../common/components/user_privileges'; +import { useTestIdGenerator } from '../../hooks/use_test_id_generator'; +import { ResponseActionFileDownloadLink } from '../response_action_file_download_link'; +import type { + ActionDetails, + GetProcessesActionOutputContent, + MaybeImmutable, +} from '../../../../common/endpoint/types'; + +export interface RunningProcessesActionResultsProps { + action: MaybeImmutable>; + /** + * If defined, the results will only be displayed for the given agent id. + * If undefined, then responses for all agents are displayed + */ + agentId?: string; + textSize?: EuiTextProps['size']; + 'data-test-subj'?: string; +} + +export const RunningProcessesActionResults = memo( + ({ action, agentId, textSize = 's', 'data-test-subj': dataTestSubj }) => { + return ( + + {action.agentType === 'endpoint' ? ( + + ) : action.agentType === 'sentinel_one' ? ( + + ) : null} + + ); + } +); +RunningProcessesActionResults.displayName = 'RunningProcessesActionResults'; + +// @ts-expect-error TS2769 +const StyledEuiBasicTable = styled(EuiBasicTable)` + table { + background-color: transparent; + font-size: inherit; + } + + .euiTableHeaderCell { + border-bottom: ${(props) => props.theme.eui.euiBorderThin}; + + .euiTableCellContent__text { + font-weight: ${(props) => props.theme.eui.euiFontWeightRegular}; + } + } + + .euiTableRow { + &:hover { + background-color: ${({ theme: { eui } }) => eui.euiColorEmptyShade} !important; + } + + .euiTableRowCell { + border-top: none !important; + border-bottom: none !important; + } + } +`; + +interface EndpointRunningProcessesResultsProps { + action: MaybeImmutable>; + /** If defined, only the results for the given agent id will be displayed. Else, all agents output will be displayed */ + agentId?: string; + 'data-test-subj'?: string; +} + +/** @private */ +const EndpointRunningProcessesResults = memo( + ({ action, agentId, 'data-test-subj': dataTestSubj }) => { + const testId = useTestIdGenerator(dataTestSubj); + const agentIds: string[] = agentId ? [agentId] : [...action.agents]; + const columns = useMemo( + () => [ + { + field: 'user', + 'data-test-subj': testId('user'), + name: i18n.translate( + 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.user', + { defaultMessage: 'USER' } + ), + width: '10%', + }, + { + field: 'pid', + 'data-test-subj': testId('pid'), + name: i18n.translate( + 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.pid', + { defaultMessage: 'PID' } + ), + width: '5%', + }, + { + field: 'entity_id', + 'data-test-subj': testId('entity_id'), + name: i18n.translate( + 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.enityId', + { defaultMessage: 'ENTITY ID' } + ), + width: '30%', + }, + + { + field: 'command', + 'data-test-subj': testId('command'), + name: i18n.translate( + 'xpack.securitySolution.endpointResponseActions.getProcesses.table.header.command', + { defaultMessage: 'COMMAND' } + ), + width: '55%', + }, + ], + [testId] + ); + + const wrappingClassname = useMemo(() => { + return css({ + '.accordion-host-name-button-content': { + 'font-size': 'inherit', + }, + }); + }, []); + + return ( +
+ {agentIds.length > 1 ? ( + agentIds.map((id) => { + const hostName = action.hosts[id].name; + + return ( +
+ } + data-test-subj={testId('hostOutput')} + > + + + + +
+ ); + }) + ) : ( + + )} +
+ ); + } +); +EndpointRunningProcessesResults.displayName = 'EndpointRunningProcessesResults'; + +interface SentinelOneRunningProcessesResultsProps { + action: MaybeImmutable>; + /** + * If defined, the results will only be displayed for the given agent id. + * If undefined, then responses for all agents are displayed + */ + agentId?: string; + 'data-test-subj'?: string; +} + +/** @private */ +const SentinelOneRunningProcessesResults = memo( + ({ action, agentId, 'data-test-subj': dataTestSubj }) => { + const testId = useTestIdGenerator(dataTestSubj); + const agentIds = agentId ? [agentId] : action.agents; + const { canGetRunningProcesses } = useUserPrivileges().endpointPrivileges; + + // If user is not allowed to execute the running processes response action (but may still have + // access to the Response Actions history log), then we don't show any results because user + // does not have access to the file download apis. + if (!canGetRunningProcesses) { + return null; + } + + return ( +
+ {agentIds.length === 1 ? ( + + ) : ( + agentIds.map((id) => { + const hostName = action.hosts[id].name; + + return ( +
+ } + data-test-subj={testId('hostOutput')} + > + + + + +
+ ); + }) + )} +
+ ); + } +); +SentinelOneRunningProcessesResults.displayName = 'SentinelOneRunningProcessesResults'; + +interface HostNameHeaderProps { + hostName: string; +} + +const HostNameHeader = memo(({ hostName }) => { + return ( + + ); +}); +HostNameHeader.displayName = 'HostNameHeader'; + +interface HostProcessesAccordionProps { + buttonContent: EuiAccordionProps['buttonContent']; + children: React.ReactNode; + 'data-test-subj'?: string; +} + +const HostProcessesAccordion = memo( + ({ buttonContent, 'data-test-subj': dataTestSubj, children }) => { + const htmlId = useGeneratedHtmlId(); + + // FYI: Class name used below is defined at the top-level - under component `RunningProcessesActionResults` + return ( + + {children} + + ); + } +); +HostProcessesAccordion.displayName = 'HostProcessesAccordion'; diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts index 66c6bf2af7554..e09aa8dc9fc85 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/response_actions/response_console/process_operations.cy.ts @@ -76,7 +76,7 @@ describe('Response console', { tags: ['@ess', '@serverless', '@skipInServerlessM cy.contains('Action pending.').should('exist'); // on success - cy.getByTestSubj('getProcessListTable', { timeout: 120000 }).within(() => { + cy.getByTestSubj('processesOutput-processListTable', { timeout: 120000 }).within(() => { ['USER', 'PID', 'ENTITY ID', 'COMMAND'].forEach((header) => { cy.contains(header); }); diff --git a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/metering.cy.ts b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/metering.cy.ts index 8cc4cadda44f2..e4ee27faed26e 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/metering.cy.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/e2e/serverless/metering.cy.ts @@ -17,7 +17,8 @@ import type { ReturnTypeFromChainable } from '../../types'; import { indexEndpointHeartbeats } from '../../tasks/index_endpoint_heartbeats'; import { login, ROLE } from '../../tasks/login'; -describe( +// Failing: See https://github.com/elastic/kibana/issues/187083 +describe.skip( 'Metering', { tags: ['@serverless', '@skipInServerlessMKI'], diff --git a/x-pack/plugins/security_solution/public/management/cypress/tasks/response_actions.ts b/x-pack/plugins/security_solution/public/management/cypress/tasks/response_actions.ts index a55e385b4b1d0..0e46b99c40d72 100644 --- a/x-pack/plugins/security_solution/public/management/cypress/tasks/response_actions.ts +++ b/x-pack/plugins/security_solution/public/management/cypress/tasks/response_actions.ts @@ -85,8 +85,8 @@ export const getRunningProcesses = (command: string): Cypress.Chainable // find pid of process // traverse back from last column to the second column that has pid return cy - .getByTestSubj('getProcessListTable', { timeout: 120000 }) - .findByTestSubj('process_list_command') + .getByTestSubj('processesOutput-processListTable', { timeout: 120000 }) + .findByTestSubj('processesOutput-command') .contains(command) .parents('td') .siblings('td') diff --git a/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx b/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx index f12846ef3b987..50593a0569fcc 100644 --- a/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx +++ b/x-pack/plugins/security_solution/public/overview/pages/data_quality.tsx @@ -32,7 +32,7 @@ import styled from 'styled-components'; import { useAssistantAvailability } from '../../assistant/use_assistant_availability'; import { SecurityPageName } from '../../app/types'; -import { getGroupByFieldsOnClick } from '../../common/components/alerts_treemap/lib/helpers'; +import { getGroupByFieldsOnClick } from '../../detections/components/alerts_kpis/alerts_treemap_panel/alerts_treemap/lib/helpers'; import { useThemes } from '../../common/components/charts/common'; import { HeaderPage } from '../../common/components/header_page'; import { EmptyPrompt } from '../../common/components/empty_prompt'; diff --git a/x-pack/plugins/security_solution/scripts/endpoint/common/response_actions.ts b/x-pack/plugins/security_solution/scripts/endpoint/common/response_actions.ts index 528078ca5d417..dc9290e5a4b9a 100644 --- a/x-pack/plugins/security_solution/scripts/endpoint/common/response_actions.ts +++ b/x-pack/plugins/security_solution/scripts/endpoint/common/response_actions.ts @@ -48,34 +48,35 @@ export const sendFleetActionResponse = async ( action: ActionDetails, { state }: { state?: 'success' | 'failure' } = {} ): Promise => { - const fleetResponse = fleetActionGenerator.generateResponse({ - action_id: action.id, - agent_id: action.agents[0], - action_response: { - endpoint: { - ack: true, - }, - }, - }); + let fleetResponse: EndpointActionResponse; - // 20% of the time we generate an error - if (state === 'failure' || (!state && fleetActionGenerator.randomFloat() < 0.2)) { - fleetResponse.action_response = {}; - fleetResponse.error = 'Agent failed to deliver message to endpoint due to unknown error'; - } else { - // show it as success (generator currently always generates a `error`, so delete it) - delete fleetResponse.error; - } + for (const agentId of action.agents) { + fleetResponse = fleetActionGenerator.generateResponse({ + action_id: action.id, + agent_id: agentId, + action_response: { endpoint: { ack: true } }, + }); - await esClient.index( - { - index: AGENT_ACTIONS_RESULTS_INDEX, - body: fleetResponse, - refresh: 'wait_for', - }, - ES_INDEX_OPTIONS - ); + // 20% of the time we generate an error + if (state === 'failure' || (!state && fleetActionGenerator.randomFloat() < 0.2)) { + fleetResponse.action_response = {}; + fleetResponse.error = 'Agent failed to deliver message to endpoint due to unknown error'; + } else { + // show it as success (generator currently always generates a `error`, so delete it) + delete fleetResponse.error; + } + await esClient.index( + { + index: AGENT_ACTIONS_RESULTS_INDEX, + body: fleetResponse, + refresh: 'wait_for', + }, + ES_INDEX_OPTIONS + ); + } + + // @ts-expect-error return fleetResponse; }; export const sendEndpointActionResponse = async ( @@ -83,9 +84,11 @@ export const sendEndpointActionResponse = async ( action: ActionDetails, { state }: { state?: 'success' | 'failure' } = {} ): Promise => { - const endpointResponse = - endpointActionGenerator.generateResponse({ - agent: { id: action.agents[0] }, + let endpointResponse: LogsEndpointActionResponse; + + for (const actionAgentId of action.agents) { + endpointResponse = endpointActionGenerator.generateResponse({ + agent: { id: actionAgentId }, EndpointActions: { action_id: action.id, data: { @@ -97,175 +100,173 @@ export const sendEndpointActionResponse = async ( }, }); - // 20% of the time we generate an error - if (state === 'failure' || (state !== 'success' && endpointActionGenerator.randomFloat() < 0.2)) { - endpointResponse.error = { - message: 'Endpoint encountered an error and was unable to apply action to host', - }; - + // 20% of the time we generate an error if ( - endpointResponse.EndpointActions.data.command === 'get-file' && - endpointResponse.EndpointActions.data.output + state === 'failure' || + (state !== 'success' && endpointActionGenerator.randomFloat() < 0.2) ) { - ( + endpointResponse.error = { + message: 'Endpoint encountered an error and was unable to apply action to host', + }; + + if ( + endpointResponse.EndpointActions.data.command === 'get-file' && endpointResponse.EndpointActions.data.output - .content as unknown as ResponseActionGetFileOutputContent - ).code = endpointActionGenerator.randomGetFileFailureCode(); - } + ) { + ( + endpointResponse.EndpointActions.data.output + .content as unknown as ResponseActionGetFileOutputContent + ).code = endpointActionGenerator.randomGetFileFailureCode(); + } - if ( - endpointResponse.EndpointActions.data.command === 'scan' && - endpointResponse.EndpointActions.data.output - ) { - ( + if ( + endpointResponse.EndpointActions.data.command === 'scan' && endpointResponse.EndpointActions.data.output - .content as unknown as ResponseActionScanOutputContent - ).code = endpointActionGenerator.randomScanFailureCode(); - } + ) { + ( + endpointResponse.EndpointActions.data.output + .content as unknown as ResponseActionScanOutputContent + ).code = endpointActionGenerator.randomScanFailureCode(); + } - if ( - endpointResponse.EndpointActions.data.command === 'execute' && - endpointResponse.EndpointActions.data.output - ) { - ( + if ( + endpointResponse.EndpointActions.data.command === 'execute' && endpointResponse.EndpointActions.data.output - .content as unknown as ResponseActionExecuteOutputContent - ).stderr = 'execute command timed out'; + ) { + ( + endpointResponse.EndpointActions.data.output + .content as unknown as ResponseActionExecuteOutputContent + ).stderr = 'execute command timed out'; + } } - } - await esClient.index({ - index: ENDPOINT_ACTION_RESPONSES_INDEX, - body: endpointResponse, - refresh: 'wait_for', - }); + await esClient.index({ + index: ENDPOINT_ACTION_RESPONSES_INDEX, + body: endpointResponse, + refresh: 'wait_for', + }); - // ------------------------------------------ - // Post Action Response tasks - // ------------------------------------------ + // ------------------------------------------ + // Post Action Response tasks + // ------------------------------------------ - // For isolate, If the response is not an error, then also send a metadata update - if (action.command === 'isolate' && !endpointResponse.error) { - for (const agentId of action.agents) { + // For isolate, If the response is not an error, then also send a metadata update + if (action.command === 'isolate' && !endpointResponse.error) { await Promise.all([ - sendEndpointMetadataUpdate(esClient, agentId, { - Endpoint: { - state: { - isolation: true, - }, - }, + sendEndpointMetadataUpdate(esClient, actionAgentId, { + Endpoint: { state: { isolation: true } }, }), - checkInFleetAgent(esClient, agentId), + checkInFleetAgent(esClient, actionAgentId), ]); } - } - // For UnIsolate, if response is not an Error, then also send metadata update - if (action.command === 'unisolate' && !endpointResponse.error) { - for (const agentId of action.agents) { + // For UnIsolate, if response is not an Error, then also send metadata update + if (action.command === 'unisolate' && !endpointResponse.error) { await Promise.all([ - sendEndpointMetadataUpdate(esClient, agentId, { - Endpoint: { - state: { - isolation: false, - }, - }, + sendEndpointMetadataUpdate(esClient, actionAgentId, { + Endpoint: { state: { isolation: false } }, }), - checkInFleetAgent(esClient, agentId), + checkInFleetAgent(esClient, actionAgentId), ]); } - } - // For `get-file`, upload a file to ES - if ((action.command === 'execute' || action.command === 'get-file') && !endpointResponse.error) { - const filePath = - action.command === 'execute' - ? '/execute/file/path' - : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - ( - action as unknown as ActionDetails< - ResponseActionGetFileOutputContent, - ResponseActionGetFileParameters - > - )?.parameters?.path!; - - const fileName = basename(filePath.replace(/\\/g, '/')); - const fileMetaDoc: FileUploadMetadata = generateFileMetadataDocumentMock({ - action_id: action.id, - agent_id: action.agents[0], - upload_start: Date.now(), - contents: [ - { - sha256: '8d61673c9d782297b3c774ded4e3d88f31a8869a8f25cf5cdd402ba6822d1d28', - file_name: fileName ?? 'bad_file.txt', - path: filePath, - size: 4, + // For `get-file`, upload a file to ES + if ( + (action.command === 'execute' || action.command === 'get-file') && + !endpointResponse.error + ) { + const filePath = + action.command === 'execute' + ? '/execute/file/path' + : // eslint-disable-next-line @typescript-eslint/no-non-null-assertion + ( + action as unknown as ActionDetails< + ResponseActionGetFileOutputContent, + ResponseActionGetFileParameters + > + )?.parameters?.path!; + + const fileName = basename(filePath.replace(/\\/g, '/')); + const fileMetaDoc: FileUploadMetadata = generateFileMetadataDocumentMock({ + action_id: action.id, + agent_id: actionAgentId, + upload_start: Date.now(), + contents: [ + { + sha256: '8d61673c9d782297b3c774ded4e3d88f31a8869a8f25cf5cdd402ba6822d1d28', + file_name: fileName ?? 'bad_file.txt', + path: filePath, + size: 4, + type: 'file', + }, + ], + file: { + attributes: ['archive', 'compressed'], + ChunkSize: 4194304, + compression: 'deflate', + hash: { + sha256: '8d61673c9d782297b3c774ded4e3d88f31a8869a8f25cf5cdd402ba6822d1d28', + }, + mime_type: 'application/zip', + name: action.command === 'execute' ? 'full-output.zip' : 'upload.zip', + extension: 'zip', + size: 125, + Status: 'READY', type: 'file', }, - ], - file: { - attributes: ['archive', 'compressed'], - ChunkSize: 4194304, - compression: 'deflate', - hash: { - sha256: '8d61673c9d782297b3c774ded4e3d88f31a8869a8f25cf5cdd402ba6822d1d28', - }, - mime_type: 'application/zip', - name: action.command === 'execute' ? 'full-output.zip' : 'upload.zip', - extension: 'zip', - size: 125, - Status: 'READY', - type: 'file', - }, - src: 'endpoint', - }); - - // Index the file's metadata - const fileMeta = await esClient.index({ - index: FILE_STORAGE_METADATA_INDEX, - id: getFileDownloadId(action, action.agents[0]), - op_type: 'create', - refresh: 'wait_for', - body: fileMetaDoc, - }); - - // Index the file content (just one chunk) - // call to `.index()` copied from File plugin here: - // https://github.com/elastic/kibana/blob/main/src/plugins/files/server/blob_storage_service/adapters/es/content_stream/content_stream.ts#L195 - await esClient - .index( - { - index: FILE_STORAGE_DATA_INDEX, - id: `${fileMeta._id}.0`, - document: cborx.encode({ - bid: fileMeta._id, - last: true, - '@timestamp': new Date().toISOString(), - data: Buffer.from( - 'UEsDBAoACQAAAFZeRFWpAsDLHwAAABMAAAAMABwAYmFkX2ZpbGUudHh0VVQJAANTVjxjU1Y8Y3V4CwABBPUBAAAEFAAAAMOcoyEq/Q4VyG02U9O0LRbGlwP/y5SOCfRKqLz1rsBQSwcIqQLAyx8AAAATAAAAUEsBAh4DCgAJAAAAVl5EVakCwMsfAAAAEwAAAAwAGAAAAAAAAQAAAKSBAAAAAGJhZF9maWxlLnR4dFVUBQADU1Y8Y3V4CwABBPUBAAAEFAAAAFBLBQYAAAAAAQABAFIAAAB1AAAAAAA=', - 'base64' - ), - }), - refresh: 'wait_for', - op_type: 'create', - }, - { - headers: { - 'content-type': 'application/cbor', - accept: 'application/json', + src: 'endpoint', + }); + + // Index the file's metadata + const fileMeta = await esClient.index({ + index: FILE_STORAGE_METADATA_INDEX, + id: getFileDownloadId(action, actionAgentId), + op_type: 'create', + refresh: 'wait_for', + body: fileMetaDoc, + }); + + // Index the file content (just one chunk) + // call to `.index()` copied from File plugin here: + // https://github.com/elastic/kibana/blob/main/src/plugins/files/server/blob_storage_service/adapters/es/content_stream/content_stream.ts#L195 + await esClient + .index( + { + index: FILE_STORAGE_DATA_INDEX, + id: `${fileMeta._id}.0`, + document: cborx.encode({ + bid: fileMeta._id, + last: true, + '@timestamp': new Date().toISOString(), + data: Buffer.from( + 'UEsDBAoACQAAAFZeRFWpAsDLHwAAABMAAAAMABwAYmFkX2ZpbGUudHh0VVQJAANTVjxjU1Y8Y3V4CwABBPUBAAAEFAAAAMOcoyEq/Q4VyG02U9O0LRbGlwP/y5SOCfRKqLz1rsBQSwcIqQLAyx8AAAATAAAAUEsBAh4DCgAJAAAAVl5EVakCwMsfAAAAEwAAAAwAGAAAAAAAAQAAAKSBAAAAAGJhZF9maWxlLnR4dFVUBQADU1Y8Y3V4CwABBPUBAAAEFAAAAFBLBQYAAAAAAQABAFIAAAB1AAAAAAA=', + 'base64' + ), + }), + refresh: 'wait_for', + op_type: 'create', }, - } - ) - .then(() => sleep(2000)); + { + headers: { + 'content-type': 'application/cbor', + accept: 'application/json', + }, + } + ) + .then(() => sleep(2000)); + } } + // @ts-expect-error return endpointResponse as unknown as LogsEndpointActionResponse; }; + type ResponseOutput< TOutputContent extends EndpointActionResponseDataOutput = EndpointActionResponseDataOutput > = Pick['EndpointActions']['data'], 'output'>; + const getOutputDataIfNeeded = (action: ActionDetails): ResponseOutput => { const commentUppercase = (action?.comment ?? '').toUpperCase(); diff --git a/x-pack/plugins/security_solution/scripts/openapi/bundle_detections.js b/x-pack/plugins/security_solution/scripts/openapi/bundle_detections.js index e2df0d47f5b47..f79437c33222c 100644 --- a/x-pack/plugins/security_solution/scripts/openapi/bundle_detections.js +++ b/x-pack/plugins/security_solution/scripts/openapi/bundle_detections.js @@ -11,34 +11,36 @@ const { join, resolve } = require('path'); const ROOT = resolve(__dirname, '../..'); -bundle({ - sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'), - outputFilePath: join( - ROOT, - 'docs/openapi/serverless/security_solution_detections_api_{version}.bundled.schema.yaml' - ), - options: { - includeLabels: ['serverless'], - specInfo: { - title: 'Security Solution Detections API (Elastic Cloud Serverless)', - description: - 'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.', +(async () => { + await bundle({ + sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'), + outputFilePath: join( + ROOT, + 'docs/openapi/serverless/security_solution_detections_api_{version}.bundled.schema.yaml' + ), + options: { + includeLabels: ['serverless'], + specInfo: { + title: 'Security Solution Detections API (Elastic Cloud Serverless)', + description: + 'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.', + }, }, - }, -}); + }); -bundle({ - sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'), - outputFilePath: join( - ROOT, - 'docs/openapi/ess/security_solution_detections_api_{version}.bundled.schema.yaml' - ), - options: { - includeLabels: ['ess'], - specInfo: { - title: 'Security Solution Detections API (Elastic Cloud and self-hosted)', - description: - 'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.', + await bundle({ + sourceGlob: join(ROOT, 'common/api/detection_engine/**/*.schema.yaml'), + outputFilePath: join( + ROOT, + 'docs/openapi/ess/security_solution_detections_api_{version}.bundled.schema.yaml' + ), + options: { + includeLabels: ['ess'], + specInfo: { + title: 'Security Solution Detections API (Elastic Cloud and self-hosted)', + description: + 'You can create rules that automatically turn events and external alerts sent to Elastic Security into detection alerts. These alerts are displayed on the Detections page.', + }, }, - }, -}); + }); +})(); diff --git a/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts b/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts index 9b6f001934910..141a5ebb440f6 100644 --- a/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts +++ b/x-pack/plugins/security_solution/server/endpoint/mocks/mocks.ts @@ -267,6 +267,8 @@ export interface HttpApiTestSetupMock

{ getRegisteredRouteHandler: (method: RouterMethod, path: string) => RequestHandler; /** Retrieves the route handler configuration that was registered with the router */ getRegisteredRouteConfig: (method: RouterMethod, path: string) => RouteConfig; + /** Sets endpoint authz overrides on the data returned by `EndpointAppContext.services.getEndpointAuthz()` */ + setEndpointAuthz: (overrides: Partial) => void; /** Get a registered versioned route */ getRegisteredVersionedRoute: ( method: RouterMethod, @@ -287,8 +289,9 @@ export const createHttpApiTestSetupMock =

(): HttpApi const endpointAppContextMock = createMockEndpointAppContext(); const scopedEsClusterClientMock = elasticsearchServiceMock.createScopedClusterClient(); const savedObjectClientMock = savedObjectsClientMock.create(); + const endpointAuthz = getEndpointAuthzInitialStateMock(); const httpHandlerContextMock = requestContextMock.convertContext( - createRouteHandlerContext(scopedEsClusterClientMock, savedObjectClientMock) + createRouteHandlerContext(scopedEsClusterClientMock, savedObjectClientMock, { endpointAuthz }) ); const httpResponseMock = httpServerMock.createResponseFactory(); const getRegisteredRouteHandler: HttpApiTestSetupMock['getRegisteredRouteHandler'] = ( @@ -321,6 +324,11 @@ export const createHttpApiTestSetupMock =

(): HttpApi return handler[0]; }; + const setEndpointAuthz = (overrides: Partial) => { + Object.assign(endpointAuthz, overrides); + }; + + (endpointAppContextMock.service.getEndpointAuthz as jest.Mock).mockResolvedValue(endpointAuthz); return { routerMock, @@ -348,6 +356,7 @@ export const createHttpApiTestSetupMock =

(): HttpApi getRegisteredRouteHandler, getRegisteredRouteConfig, + setEndpointAuthz, getRegisteredVersionedRoute: getRegisteredVersionedRouteMock.bind(null, routerMock), }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.test.ts index 2cc6d8efd199e..050de9019f21e 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.test.ts @@ -46,6 +46,7 @@ describe('Response Actions file download API', () => { const actionRequestEsSearchResponse = createActionRequestsEsSearchResultsMock(); actionRequestEsSearchResponse.hits.hits[0]._source!.EndpointActions.action_id = '321-654'; + actionRequestEsSearchResponse.hits.hits[0]._source!.EndpointActions.data.command = 'get-file'; applyEsClientSearchMock({ esClientMock, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts index 7095b7d87a50c..2e16c57886f7d 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_download_handler.ts @@ -6,6 +6,7 @@ */ import type { RequestHandler } from '@kbn/core/server'; +import { ensureUserHasAuthzToFilesForAction } from './utils'; import type { EndpointActionFileDownloadParams } from '../../../../common/api/endpoint'; import { EndpointActionFileDownloadSchema } from '../../../../common/api/endpoint'; import type { ResponseActionsClient } from '../../services'; @@ -47,9 +48,10 @@ export const registerActionFileDownloadRoutes = ( }, }, withEndpointAuthz( - { any: ['canWriteFileOperations', 'canWriteExecuteOperations'] }, + { any: ['canWriteFileOperations', 'canWriteExecuteOperations', 'canGetRunningProcesses'] }, logger, - getActionFileDownloadRouteHandler(endpointContext) + getActionFileDownloadRouteHandler(endpointContext), + ensureUserHasAuthzToFilesForAction ) ); }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.test.ts index e9914dc4232d9..b2866f7cca263 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.test.ts @@ -42,6 +42,7 @@ describe('Response Action file info API', () => { const actionRequestEsSearchResponse = createActionRequestsEsSearchResultsMock(); actionRequestEsSearchResponse.hits.hits[0]._source!.EndpointActions.action_id = '321-654'; + actionRequestEsSearchResponse.hits.hits[0]._source!.EndpointActions.data.command = 'get-file'; applyEsClientSearchMock({ esClientMock, diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts index a84f3b3a8bf6f..1cb4e95e1eaf1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/file_info_handler.ts @@ -6,6 +6,7 @@ */ import type { RequestHandler } from '@kbn/core/server'; +import { ensureUserHasAuthzToFilesForAction } from './utils'; import { stringify } from '../../utils/stringify'; import type { EndpointActionFileInfoParams } from '../../../../common/api/endpoint'; import { EndpointActionFileInfoSchema } from '../../../../common/api/endpoint'; @@ -83,9 +84,10 @@ export const registerActionFileInfoRoute = ( }, }, withEndpointAuthz( - { any: ['canWriteFileOperations', 'canWriteExecuteOperations'] }, + { any: ['canWriteFileOperations', 'canWriteExecuteOperations', 'canGetRunningProcesses'] }, endpointContext.logFactory.get('actionFileInfo'), - getActionFileInfoRouteHandler(endpointContext) + getActionFileInfoRouteHandler(endpointContext), + ensureUserHasAuthzToFilesForAction ) ); }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.test.ts new file mode 100644 index 0000000000000..eaf05e972943c --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.test.ts @@ -0,0 +1,80 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { HttpApiTestSetupMock } from '../../mocks'; +import { createHttpApiTestSetupMock } from '../../mocks'; +import type { LogsEndpointAction } from '../../../../common/endpoint/types'; +import { EndpointActionGenerator } from '../../../../common/endpoint/data_generators/endpoint_action_generator'; +import { applyEsClientSearchMock } from '../../mocks/utils.mock'; +import { ENDPOINT_ACTIONS_INDEX } from '../../../../common/endpoint/constants'; +import { ensureUserHasAuthzToFilesForAction } from './utils'; +import type { Mutable } from 'utility-types'; +import type { KibanaRequest } from '@kbn/core-http-server'; + +describe('Route utilities', () => { + describe('#ensureUserHasAuthzToFilesForAction()', () => { + let testSetupMock: HttpApiTestSetupMock; + let actionRequestMock: LogsEndpointAction; + let httpRequestMock: Mutable>; + + beforeEach(() => { + const endpointGenerator = new EndpointActionGenerator('seed'); + + actionRequestMock = endpointGenerator.generate(); + testSetupMock = createHttpApiTestSetupMock(); + + httpRequestMock = testSetupMock.createRequestMock({ + params: { action_id: actionRequestMock.EndpointActions.action_id }, + }); + + applyEsClientSearchMock({ + esClientMock: testSetupMock.getEsClientMock(), + index: ENDPOINT_ACTIONS_INDEX, + response: endpointGenerator.toEsSearchResponse([ + endpointGenerator.toEsSearchHit(actionRequestMock), + ]), + }); + }); + + it.each` + command | authzKey | agentType + ${'get-file'} | ${'canWriteFileOperations'} | ${'endpoint'} + ${'execute'} | ${'canWriteExecuteOperations'} | ${'endpoint'} + ${'running-processes'} | ${'canGetRunningProcesses'} | ${'sentinel_one'} + `( + 'should throw when user is not authorized to `$command` for $agentType', + async ({ command, authzKey, agentType }) => { + testSetupMock.setEndpointAuthz({ [authzKey]: false }); + actionRequestMock.EndpointActions.data.command = command; + actionRequestMock.EndpointActions.input_type = agentType; + + await expect(() => + ensureUserHasAuthzToFilesForAction(testSetupMock.httpHandlerContextMock, httpRequestMock) + ).rejects.toThrow('Endpoint authorization failure'); + } + ); + + it('should throw when response action is not supported by agent type', async () => { + actionRequestMock.EndpointActions.input_type = 'sentinel_one'; + actionRequestMock.EndpointActions.data.command = 'execute'; + + await expect(() => + ensureUserHasAuthzToFilesForAction(testSetupMock.httpHandlerContextMock, httpRequestMock) + ).rejects.toThrow('Response action [execute] not supported for agent type [sentinel_one]'); + }); + + it('should throw when response action does not support access to files', async () => { + actionRequestMock.EndpointActions.data.command = 'running-processes'; + + await expect(() => + ensureUserHasAuthzToFilesForAction(testSetupMock.httpHandlerContextMock, httpRequestMock) + ).rejects.toThrow( + 'Response action [running-processes] for agent type [endpoint] does not support file downloads' + ); + }); + }); +}); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.ts b/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.ts new file mode 100644 index 0000000000000..92033801e71b6 --- /dev/null +++ b/x-pack/plugins/security_solution/server/endpoint/routes/actions/utils.ts @@ -0,0 +1,135 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import type { KibanaRequest } from '@kbn/core-http-server'; +import { deepFreeze } from '@kbn/std'; +import { get } from 'lodash'; +import { CustomHttpRequestError } from '../../../utils/custom_http_request_error'; +import { isActionSupportedByAgentType } from '../../../../common/endpoint/service/response_actions/is_response_action_supported'; +import { EndpointAuthorizationError } from '../../errors'; +import { fetchActionRequestById } from '../../services/actions/utils/fetch_action_request_by_id'; +import type { SecuritySolutionRequestHandlerContext } from '../../../types'; +import type { + ResponseActionAgentType, + ResponseActionsApiCommandNames, +} from '../../../../common/endpoint/service/response_actions/constants'; + +type CommandsWithFileAccess = Readonly< + Record>> +>; + +// FYI: this object here should help to quickly catch instances where we might forget to update the +// authz on the file info/download apis when a response action needs to support file downloads. +const COMMANDS_WITH_ACCESS_TO_FILES: CommandsWithFileAccess = deepFreeze({ + 'get-file': { + endpoint: true, + sentinel_one: true, + crowdstrike: false, + }, + execute: { + endpoint: true, + sentinel_one: false, + crowdstrike: false, + }, + 'running-processes': { + endpoint: false, + sentinel_one: true, + crowdstrike: false, + }, + upload: { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, + scan: { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, + isolate: { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, + unisolate: { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, + 'kill-process': { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, + 'suspend-process': { + endpoint: false, + sentinel_one: false, + crowdstrike: false, + }, +}); + +/** + * Checks to ensure that the user has the correct authz for the response action associated with the action id. + * + * FYI: Additional check is needed because the File info and download APIs are used by multiple response actions, + * thus we want to ensure that we don't allow access to file associated with response actions the user does + * not have authz to. + * + * @param context + * @param request + */ +export const ensureUserHasAuthzToFilesForAction = async ( + context: SecuritySolutionRequestHandlerContext, + request: KibanaRequest +): Promise => { + const userAuthz = await (await context.securitySolution).getEndpointAuthz(); + const coreContext = await context.core; + const esClient = coreContext.elasticsearch.client.asInternalUser; + const { action_id: actionId } = request.params as { action_id: string }; + const { + EndpointActions: { + data: { command }, + input_type: agentType, + }, + } = await fetchActionRequestById(esClient, actionId); + + // Check if command is supported by the agent type + if (!isActionSupportedByAgentType(agentType, command, 'manual')) { + throw new CustomHttpRequestError( + `Response action [${command}] not supported for agent type [${agentType}]`, + 400 + ); + } + + // Check if the command is marked as having access to files + if (!get(COMMANDS_WITH_ACCESS_TO_FILES, `${command}.${agentType}`, false)) { + throw new CustomHttpRequestError( + `Response action [${command}] for agent type [${agentType}] does not support file downloads`, + 400 + ); + } + + let hasAuthzToCommand = false; + + switch (command) { + case 'get-file': + hasAuthzToCommand = userAuthz.canWriteFileOperations; + break; + + case 'execute': + hasAuthzToCommand = userAuthz.canWriteExecuteOperations; + break; + + case 'running-processes': + hasAuthzToCommand = userAuthz.canGetRunningProcesses; + break; + } + + if (!hasAuthzToCommand) { + throw new EndpointAuthorizationError(); + } +}; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts b/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts index a14303e0004ee..ca8602e0969d1 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/error_handler.ts @@ -8,7 +8,7 @@ import type { IKibanaResponse, KibanaResponseFactory, Logger } from '@kbn/core/server'; import { FleetFileNotFound } from '@kbn/fleet-plugin/server/errors'; import { CustomHttpRequestError } from '../../utils/custom_http_request_error'; -import { NotFoundError } from '../errors'; +import { EndpointAuthorizationError, NotFoundError } from '../errors'; import { EndpointHostUnEnrolledError, EndpointHostNotFoundError } from '../services/metadata'; /** @@ -51,6 +51,10 @@ export const errorHandler = ( return res.notFound({ body: error }); } + if (error instanceof EndpointAuthorizationError) { + return res.forbidden({ body: error }); + } + // Kibana CORE will take care of `500` errors when the handler `throw`'s, including logging the error throw error; }; diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts index 573b8dc9cbae5..d5cccedf7bb95 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.test.ts @@ -11,7 +11,7 @@ import { requestContextMock } from '../../lib/detection_engine/routes/__mocks__' import type { EndpointApiNeededAuthz } from './with_endpoint_authz'; import { withEndpointAuthz } from './with_endpoint_authz'; import type { EndpointAuthz } from '../../../common/endpoint/types/authz'; -import { EndpointAuthorizationError } from '../errors'; +import { EndpointAuthorizationError, NotFoundError } from '../errors'; import { getEndpointAuthzInitialStateMock } from '../../../common/endpoint/service/authz/mocks'; describe('When using `withEndpointAuthz()`', () => { @@ -105,4 +105,37 @@ describe('When using `withEndpointAuthz()`', () => { body: expect.any(EndpointAuthorizationError), }); }); + + it('should call additionalChecks callback if defined', async () => { + const additionalChecks = jest.fn(); + const routeContextMock = coreMock.createCustomRequestHandlerContext(mockContext); + await withEndpointAuthz( + { any: ['canGetRunningProcesses'] }, + logger, + mockRequestHandler, + additionalChecks + )(routeContextMock, mockRequest, mockResponse); + + expect(additionalChecks).toHaveBeenCalledWith(routeContextMock, mockRequest); + expect(mockRequestHandler).toHaveBeenCalled(); + }); + + it('should deny access if additionalChecks callback throws an error', async () => { + const error = new NotFoundError('something happen'); + const additionalChecks = jest.fn(async () => { + throw error; + }); + const routeContextMock = coreMock.createCustomRequestHandlerContext(mockContext); + await withEndpointAuthz( + { any: ['canGetRunningProcesses'] }, + logger, + mockRequestHandler, + additionalChecks + )(routeContextMock, mockRequest, mockResponse); + + expect(mockRequestHandler).not.toHaveBeenCalled(); + expect(mockResponse.notFound).toHaveBeenCalledWith({ + body: error, + }); + }); }); diff --git a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.ts b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.ts index a241148c7b714..e42064488aa59 100644 --- a/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.ts +++ b/x-pack/plugins/security_solution/server/endpoint/routes/with_endpoint_authz.ts @@ -5,7 +5,8 @@ * 2.0. */ -import type { RequestHandler, Logger } from '@kbn/core/server'; +import type { RequestHandler, KibanaRequest, Logger } from '@kbn/core/server'; +import { errorHandler } from './error_handler'; import { stringify } from '../utils/stringify'; import type { EndpointAuthzKeyList } from '../../../common/endpoint/types/authz'; import type { SecuritySolutionRequestHandlerContext } from '../../types'; @@ -29,11 +30,16 @@ export interface EndpointApiNeededAuthz { * @param neededAuthz * @param routeHandler * @param logger + * @param additionalChecks */ export const withEndpointAuthz = ( neededAuthz: EndpointApiNeededAuthz, logger: Logger, - routeHandler: T + routeHandler: T, + additionalChecks?: ( + context: SecuritySolutionRequestHandlerContext, + request: KibanaRequest + ) => void | Promise ): T => { const needAll: EndpointAuthzKeyList = neededAuthz.all ?? []; const needAny: EndpointAuthzKeyList = neededAuthz.any ?? []; @@ -104,6 +110,16 @@ export const withEndpointAuthz = ( } } + if (additionalChecks) { + try { + await additionalChecks(context, request); + } catch (err) { + logger.debug(() => stringify(err)); + + return errorHandler(logger, response, err); + } + } + // Authz is good call the route handler return (routeHandler as unknown as RequestHandler)(context, request, response); }; diff --git a/x-pack/plugins/stack_alerts/common/constants.ts b/x-pack/plugins/stack_alerts/common/constants.ts index b8f15a1e3c1b1..37d428ac4bce6 100644 --- a/x-pack/plugins/stack_alerts/common/constants.ts +++ b/x-pack/plugins/stack_alerts/common/constants.ts @@ -7,6 +7,7 @@ export const MAX_SELECTABLE_GROUP_BY_TERMS = 4; export const MAX_SELECTABLE_SOURCE_FIELDS = 5; +export const MAX_HITS_FOR_GROUP_BY = 100; const HOST_NAME = 'host.name'; const HOST_HOSTNAME = 'host.hostname'; diff --git a/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.test.ts b/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.test.ts index 6b3668a023292..80aa0c7352b97 100644 --- a/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.test.ts +++ b/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.test.ts @@ -419,4 +419,25 @@ describe('expression params validation', () => { 'Cannot select more than 5 fields' ); }); + + test('if groupBy is defined and size is greater than max allowed, should return proper errror message', () => { + const initialParams: EsQueryRuleParams = { + index: ['test'], + esQuery: `{\n \"query\":{\n \"match_all\" : {}\n }\n}`, + size: 101, + timeWindowSize: 1, + timeWindowUnit: 's', + threshold: [0], + timeField: '', + excludeHitsFromPreviousRun: true, + aggType: 'count', + groupBy: 'top', + termSize: 5, + termField: ['term'], + }; + expect(validateExpression(initialParams).errors.size.length).toBeGreaterThan(0); + expect(validateExpression(initialParams).errors.size[0]).toBe( + 'Size cannot exceed 100 when using a group by field.' + ); + }); }); diff --git a/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.ts b/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.ts index c8119110d76a2..8d68d7711e765 100644 --- a/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.ts +++ b/x-pack/plugins/stack_alerts/public/rule_types/es_query/validation.ts @@ -19,6 +19,7 @@ import { MAX_SELECTABLE_GROUP_BY_TERMS, ES_QUERY_MAX_HITS_PER_EXECUTION_SERVERLESS, ES_QUERY_MAX_HITS_PER_EXECUTION, + MAX_HITS_FOR_GROUP_BY, } from '../../../common/constants'; import { EsQueryRuleParams, SearchType } from './types'; import { isEsqlQueryRule, isSearchSourceRule } from './util'; @@ -75,6 +76,21 @@ const validateCommonParams = (ruleParams: EsQueryRuleParams, isServerless?: bool ); } + if ( + groupBy && + builtInGroupByTypes[groupBy] && + builtInGroupByTypes[groupBy].sizeRequired && + size && + size > MAX_HITS_FOR_GROUP_BY + ) { + errors.size.push( + i18n.translate('xpack.stackAlerts.esQuery.ui.validation.error.sizeTooLargeForGroupByText', { + defaultMessage: 'Size cannot exceed {max} when using a group by field.', + values: { max: MAX_HITS_FOR_GROUP_BY }, + }) + ); + } + if ( groupBy && builtInGroupByTypes[groupBy].validNormalizedTypes && diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.test.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.test.ts index 46b3bb2ff495f..6a97832c1ae57 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.test.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.test.ts @@ -377,4 +377,106 @@ describe('fetchEsQuery', () => { { meta: true } ); }); + + it('should log if group by and top hits size is too large', async () => { + const params = { + ...defaultParams, + groupBy: 'top', + termField: 'host.name', + termSize: 10, + size: 200, + }; + const date = new Date().toISOString(); + + await fetchEsQuery({ + ruleId: 'abc', + name: 'test-rule', + params, + timestamp: undefined, + services, + spacePrefix: '', + publicBaseUrl: '', + dateStart: date, + dateEnd: date, + }); + expect(logger.warn).toHaveBeenCalledWith(`Top hits size is capped at 100`); + expect(scopedClusterClientMock.asCurrentUser.search).toHaveBeenCalledWith( + { + allow_no_indices: true, + body: { + aggs: { + groupAgg: { + aggs: { + conditionSelector: { + bucket_selector: { + buckets_path: { + compareValue: '_count', + }, + script: 'params.compareValue < 0L', + }, + }, + topHitsAgg: { + top_hits: { + size: 100, + }, + }, + }, + terms: { + field: 'host.name', + size: 10, + }, + }, + groupAggCount: { + stats_bucket: { + buckets_path: 'groupAgg._count', + }, + }, + }, + docvalue_fields: [ + { + field: '@timestamp', + format: 'strict_date_optional_time', + }, + ], + query: { + bool: { + filter: [ + { + match_all: {}, + }, + { + bool: { + filter: [ + { + range: { + '@timestamp': { + format: 'strict_date_optional_time', + gte: date, + lte: date, + }, + }, + }, + ], + }, + }, + ], + }, + }, + sort: [ + { + '@timestamp': { + format: 'strict_date_optional_time||epoch_millis', + order: 'desc', + }, + }, + ], + }, + ignore_unavailable: true, + index: ['test-index'], + size: 0, + track_total_hits: true, + }, + { meta: true } + ); + }); }); diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts index 9a3aba68039b9..0a27a4e2c373a 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_es_query.ts @@ -120,6 +120,7 @@ export async function fetchEsQuery({ ), }, ...(isGroupAgg ? { topHitsSize: params.size } : {}), + loggerCb: (message: string) => logger.warn(message), }), }); diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.test.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.test.ts index e64cd443fadf6..cdc053aac565b 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.test.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.test.ts @@ -7,6 +7,7 @@ import { OnlySearchSourceRuleParams } from '../types'; import { createSearchSourceMock } from '@kbn/data-plugin/common/search/search_source/mocks'; +import { loggerMock } from '@kbn/logging-mocks'; import { updateSearchSource, generateLink, @@ -63,6 +64,8 @@ const defaultParams: OnlySearchSourceRuleParams = { timeField: 'timeFieldNotFromDataView', }; +const logger = loggerMock.create(); + describe('fetchSearchSourceQuery', () => { const dataViewMock = createDataView(); @@ -90,7 +93,8 @@ describe('fetchSearchSourceQuery', () => { params, undefined, dateStart, - dateEnd + dateEnd, + logger ); const searchRequest = searchSource.getSearchRequestBody(); expect(filterToExcludeHitsFromPreviousRun).toBe(null); @@ -130,7 +134,8 @@ describe('fetchSearchSourceQuery', () => { params, '2020-02-09T23:12:41.941Z', dateStart, - dateEnd + dateEnd, + logger ); const searchRequest = searchSource.getSearchRequestBody(); expect(searchRequest.track_total_hits).toBe(true); @@ -195,7 +200,8 @@ describe('fetchSearchSourceQuery', () => { params, '2020-01-09T22:12:41.941Z', dateStart, - dateEnd + dateEnd, + logger ); const searchRequest = searchSource.getSearchRequestBody(); expect(filterToExcludeHitsFromPreviousRun).toBe(null); @@ -235,7 +241,8 @@ describe('fetchSearchSourceQuery', () => { params, '2020-02-09T23:12:41.941Z', dateStart, - dateEnd + dateEnd, + logger ); const searchRequest = searchSource.getSearchRequestBody(); expect(filterToExcludeHitsFromPreviousRun).toBe(null); @@ -281,7 +288,8 @@ describe('fetchSearchSourceQuery', () => { params, '2020-02-09T23:12:41.941Z', dateStart, - dateEnd + dateEnd, + logger ); const searchRequest = searchSource.getSearchRequestBody(); expect(searchRequest.track_total_hits).toBeUndefined(); @@ -337,6 +345,84 @@ describe('fetchSearchSourceQuery', () => { } `); }); + + it('should log if group by and top hits size is too large', async () => { + const params = { + ...defaultParams, + excludeHitsFromPreviousRun: false, + groupBy: 'top', + termField: 'host.name', + termSize: 10, + size: 200, + }; + + const searchSourceInstance = createSearchSourceMock({ index: dataViewMock }); + + const { dateStart, dateEnd } = getTimeRange(); + const { searchSource } = await updateSearchSource( + searchSourceInstance, + dataViewMock, + params, + '2020-02-09T23:12:41.941Z', + dateStart, + dateEnd, + logger + ); + const searchRequest = searchSource.getSearchRequestBody(); + expect(searchRequest.track_total_hits).toBeUndefined(); + expect(searchRequest.size).toMatchInlineSnapshot(`0`); + expect(searchRequest.query).toMatchInlineSnapshot(` + Object { + "bool": Object { + "filter": Array [ + Object { + "range": Object { + "time": Object { + "format": "strict_date_optional_time", + "gte": "2020-02-09T23:10:41.941Z", + "lte": "2020-02-09T23:15:41.941Z", + }, + }, + }, + ], + "must": Array [], + "must_not": Array [], + "should": Array [], + }, + } + `); + expect(searchRequest.aggs).toMatchInlineSnapshot(` + Object { + "groupAgg": Object { + "aggs": Object { + "conditionSelector": Object { + "bucket_selector": Object { + "buckets_path": Object { + "compareValue": "_count", + }, + "script": "params.compareValue < 0L", + }, + }, + "topHitsAgg": Object { + "top_hits": Object { + "size": 100, + }, + }, + }, + "terms": Object { + "field": "host.name", + "size": 10, + }, + }, + "groupAggCount": Object { + "stats_bucket": Object { + "buckets_path": "groupAgg._count", + }, + }, + } + `); + expect(logger.warn).toHaveBeenCalledWith('Top hits size is capped at 100'); + }); }); describe('generateLink', () => { @@ -352,7 +438,8 @@ describe('fetchSearchSourceQuery', () => { params, '2020-02-09T23:12:41.941Z', dateStart, - dateEnd + dateEnd, + logger ); expect(filterToExcludeHitsFromPreviousRun).toMatchInlineSnapshot(` diff --git a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts index bc281b3a08f0d..6290186653426 100644 --- a/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts +++ b/x-pack/plugins/stack_alerts/server/rule_types/es_query/lib/fetch_search_source_query.ts @@ -66,6 +66,7 @@ export async function fetchSearchSourceQuery({ latestTimestamp, dateStart, dateEnd, + logger, alertLimit ); @@ -108,6 +109,7 @@ export async function updateSearchSource( latestTimestamp: string | undefined, dateStart: string, dateEnd: string, + logger: Logger, alertLimit?: number ): Promise<{ searchSource: ISearchSource; filterToExcludeHitsFromPreviousRun: Filter | null }> { const isGroupAgg = isGroupAggregation(params.termField); @@ -171,6 +173,7 @@ export async function updateSearchSource( ), }, ...(isGroupAgg ? { topHitsSize: params.size } : {}), + loggerCb: (message: string) => logger.warn(message), }) ); return { diff --git a/x-pack/plugins/stack_connectors/common/thehive/constants.ts b/x-pack/plugins/stack_connectors/common/thehive/constants.ts new file mode 100644 index 0000000000000..62afe84b801f4 --- /dev/null +++ b/x-pack/plugins/stack_connectors/common/thehive/constants.ts @@ -0,0 +1,34 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const THEHIVE_TITLE = i18n.translate( + 'xpack.stackConnectors.components.thehive.connectorTypeTitle', + { + defaultMessage: 'TheHive', + } +); +export const THEHIVE_CONNECTOR_ID = '.thehive'; + +export enum SUB_ACTION { + PUSH_TO_SERVICE = 'pushToService', + CREATE_ALERT = 'createAlert', +} +export enum TheHiveSeverity { + LOW = 1, + MEDIUM = 2, + HIGH = 3, + CRITICAL = 4, +} +export enum TheHiveTLP { + CLEAR = 0, + GREEN = 1, + AMBER = 2, + AMBER_STRICT = 3, + RED = 4, +} diff --git a/x-pack/plugins/stack_connectors/common/thehive/schema.ts b/x-pack/plugins/stack_connectors/common/thehive/schema.ts new file mode 100644 index 0000000000000..e880ca900591a --- /dev/null +++ b/x-pack/plugins/stack_connectors/common/thehive/schema.ts @@ -0,0 +1,186 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { schema } from '@kbn/config-schema'; +import { TheHiveSeverity, TheHiveTLP, SUB_ACTION } from './constants'; + +export const TheHiveConfigSchema = schema.object({ + url: schema.string(), + organisation: schema.nullable(schema.string()), +}); + +export const TheHiveSecretsSchema = schema.object({ + apiKey: schema.string(), +}); + +export const ExecutorSubActionPushParamsSchema = schema.object({ + incident: schema.object({ + title: schema.string(), + description: schema.string(), + externalId: schema.nullable(schema.string()), + severity: schema.nullable(schema.number({ defaultValue: TheHiveSeverity.MEDIUM })), + tlp: schema.nullable(schema.number({ defaultValue: TheHiveTLP.AMBER })), + tags: schema.nullable(schema.arrayOf(schema.string())), + }), + comments: schema.nullable( + schema.arrayOf( + schema.object({ + comment: schema.string(), + commentId: schema.string(), + }) + ) + ), +}); + +export const PushToServiceIncidentSchema = { + title: schema.string(), + description: schema.string(), + severity: schema.nullable(schema.number()), + tlp: schema.nullable(schema.number()), + tags: schema.nullable(schema.arrayOf(schema.string())), +}; + +export const ExecutorSubActionGetIncidentParamsSchema = schema.object({ + externalId: schema.string(), +}); + +export const ExecutorSubActionCreateAlertParamsSchema = schema.object({ + title: schema.string(), + description: schema.string(), + type: schema.string(), + source: schema.string(), + sourceRef: schema.string(), + severity: schema.nullable(schema.number({ defaultValue: TheHiveSeverity.MEDIUM })), + tlp: schema.nullable(schema.number({ defaultValue: TheHiveTLP.AMBER })), + tags: schema.nullable(schema.arrayOf(schema.string())), +}); + +export const ExecutorParamsSchema = schema.oneOf([ + schema.object({ + subAction: schema.literal(SUB_ACTION.PUSH_TO_SERVICE), + subActionParams: ExecutorSubActionPushParamsSchema, + }), + schema.object({ + subAction: schema.literal(SUB_ACTION.CREATE_ALERT), + subActionParams: ExecutorSubActionCreateAlertParamsSchema, + }), +]); + +export const TheHiveIncidentResponseSchema = schema.object( + { + _id: schema.string(), + _type: schema.string(), + _createdBy: schema.string(), + _updatedBy: schema.nullable(schema.string()), + _createdAt: schema.number(), + _updatedAt: schema.nullable(schema.number()), + number: schema.number(), + title: schema.string(), + description: schema.string(), + severity: schema.number(), + severityLabel: schema.string(), + startDate: schema.number(), + endDate: schema.nullable(schema.number()), + tags: schema.nullable(schema.arrayOf(schema.string())), + flag: schema.boolean(), + tlp: schema.number(), + tlpLabel: schema.string(), + pap: schema.number(), + papLabel: schema.string(), + status: schema.string(), + stage: schema.string(), + summary: schema.nullable(schema.string()), + impactStatus: schema.nullable(schema.string()), + assignee: schema.nullable(schema.string()), + customFields: schema.nullable(schema.arrayOf(schema.recordOf(schema.string(), schema.any()))), + userPermissions: schema.nullable(schema.arrayOf(schema.string())), + extraData: schema.object({}, { unknowns: 'allow' }), + newDate: schema.number(), + inProgressDate: schema.nullable(schema.number()), + closedDate: schema.nullable(schema.number()), + alertDate: schema.nullable(schema.number()), + alertNewDate: schema.nullable(schema.number()), + alertInProgressDate: schema.nullable(schema.number()), + alertImportedDate: schema.nullable(schema.number()), + timeToDetect: schema.number(), + timeToTriage: schema.nullable(schema.number()), + timeToQualify: schema.nullable(schema.number()), + timeToAcknowledge: schema.nullable(schema.number()), + timeToResolve: schema.nullable(schema.number()), + handlingDuration: schema.nullable(schema.number()), + }, + { unknowns: 'ignore' } +); + +export const TheHiveUpdateIncidentResponseSchema = schema.any(); + +export const TheHiveAddCommentResponseSchema = schema.object( + { + _id: schema.string(), + _type: schema.string(), + createdBy: schema.string(), + createdAt: schema.number(), + updatedAt: schema.nullable(schema.number()), + updatedBy: schema.nullable(schema.string()), + message: schema.string(), + isEdited: schema.boolean(), + extraData: schema.object({}, { unknowns: 'allow' }), + }, + { unknowns: 'ignore' } +); + +export const TheHiveCreateAlertResponseSchema = schema.object( + { + _id: schema.string(), + _type: schema.string(), + _createdBy: schema.string(), + _updatedBy: schema.nullable(schema.string()), + _createdAt: schema.number(), + _updatedAt: schema.nullable(schema.number()), + type: schema.string(), + source: schema.string(), + sourceRef: schema.string(), + externalLink: schema.nullable(schema.string()), + title: schema.string(), + description: schema.string(), + severity: schema.number(), + severityLabel: schema.string(), + date: schema.number(), + tags: schema.nullable(schema.arrayOf(schema.string())), + tlp: schema.number(), + tlpLabel: schema.string(), + pap: schema.number(), + papLabel: schema.string(), + follow: schema.nullable(schema.boolean()), + customFields: schema.nullable(schema.arrayOf(schema.object({}, { unknowns: 'allow' }))), + caseTemplate: schema.nullable(schema.string()), + observableCount: schema.number(), + caseId: schema.nullable(schema.string()), + status: schema.string(), + stage: schema.string(), + assignee: schema.nullable(schema.string()), + summary: schema.nullable(schema.string()), + extraData: schema.object({}, { unknowns: 'allow' }), + newDate: schema.number(), + inProgressDate: schema.nullable(schema.number()), + closedDate: schema.nullable(schema.number()), + importedDate: schema.nullable(schema.number()), + timeToDetect: schema.number(), + timeToTriage: schema.nullable(schema.number()), + timeToQualify: schema.nullable(schema.number()), + timeToAcknowledge: schema.nullable(schema.number()), + }, + { unknowns: 'ignore' } +); + +export const TheHiveFailureResponseSchema = schema.object( + { + type: schema.number(), + message: schema.string(), + }, + { unknowns: 'ignore' } +); diff --git a/x-pack/plugins/stack_connectors/common/thehive/types.ts b/x-pack/plugins/stack_connectors/common/thehive/types.ts new file mode 100644 index 0000000000000..b67820ac77e5e --- /dev/null +++ b/x-pack/plugins/stack_connectors/common/thehive/types.ts @@ -0,0 +1,39 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TypeOf } from '@kbn/config-schema'; +import { + TheHiveConfigSchema, + TheHiveSecretsSchema, + ExecutorParamsSchema, + ExecutorSubActionPushParamsSchema, + ExecutorSubActionCreateAlertParamsSchema, + TheHiveFailureResponseSchema, + TheHiveIncidentResponseSchema, +} from './schema'; + +export type TheHiveConfig = TypeOf; +export type TheHiveSecrets = TypeOf; + +export type ExecutorParams = TypeOf; +export type ExecutorSubActionPushParams = TypeOf; +export type ExecutorSubActionCreateAlertParams = TypeOf< + typeof ExecutorSubActionCreateAlertParamsSchema +>; + +export type TheHiveFailureResponse = TypeOf; + +export interface ExternalServiceIncidentResponse { + id: string; + title: string; + url: string; + pushedDate: string; +} + +export type Incident = Omit; + +export type GetIncidentResponse = TypeOf; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/index.ts b/x-pack/plugins/stack_connectors/public/connector_types/index.ts index 893b756338dcb..dd1c5e5c63a2a 100644 --- a/x-pack/plugins/stack_connectors/public/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/public/connector_types/index.ts @@ -32,6 +32,7 @@ import { getXmattersConnectorType } from './xmatters'; import { getD3SecurityConnectorType } from './d3security'; import { ExperimentalFeaturesService } from '../common/experimental_features_service'; import { getSentinelOneConnectorType } from './sentinelone'; +import { getTheHiveConnectorType } from './thehive'; import { getCrowdStrikeConnectorType } from './crowdstrike'; export interface RegistrationServices { @@ -71,6 +72,7 @@ export function registerConnectorTypes({ connectorTypeRegistry.register(getTorqConnectorType()); connectorTypeRegistry.register(getTinesConnectorType()); connectorTypeRegistry.register(getD3SecurityConnectorType()); + connectorTypeRegistry.register(getTheHiveConnectorType()); if (ExperimentalFeaturesService.get().sentinelOneConnectorOn) { connectorTypeRegistry.register(getSentinelOneConnectorType()); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.test.tsx new file mode 100644 index 0000000000000..7b61456b093d7 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.test.tsx @@ -0,0 +1,113 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import TheHiveConnectorFields from './connector'; +import { ConnectorFormTestProvider } from '../lib/test_utils'; +import { act, render, waitFor } from '@testing-library/react'; +import userEvent from '@testing-library/user-event'; + +jest.mock('@kbn/triggers-actions-ui-plugin/public/common/lib/kibana'); + +describe('TheHiveActionConnectorFields renders', () => { + const actionConnector = { + actionTypeId: '.thehive', + name: 'thehive', + config: { + url: 'https://test.com', + }, + secrets: { + apiKey: 'apiKey', + }, + isDeprecated: false, + }; + + it('TheHive connector fields are rendered', () => { + const { getByTestId } = render( + + {}} + /> + + ); + + expect(getByTestId('config.url-input')).toBeInTheDocument(); + expect(getByTestId('secrets.apiKey-input')).toBeInTheDocument(); + }); + + describe('Validation', () => { + const onSubmit = jest.fn(); + + beforeEach(() => { + jest.clearAllMocks(); + }); + + const tests: Array<[string, string]> = [ + ['config.url-input', 'not-valid'], + ['secrets.apiKey-input', ''], + ]; + + it('connector validation succeeds when connector config is valid', async () => { + const { getByTestId } = render( + + {}} + /> + + ); + + await act(async () => { + userEvent.click(getByTestId('form-test-provide-submit')); + }); + + waitFor(() => { + expect(onSubmit).toBeCalledWith({ + data: { + actionTypeId: '.thehive', + name: 'thehive', + config: { + url: 'https://test.com', + }, + secrets: { + apiKey: 'apiKey', + }, + isDeprecated: false, + }, + isValid: true, + }); + }); + }); + + it.each(tests)('validates correctly %p', async (field, value) => { + const res = render( + + {}} + /> + + ); + + await act(async () => { + await userEvent.type(res.getByTestId(field), `{selectall}{backspace}${value}`, { + delay: 10, + }); + }); + + await act(async () => { + userEvent.click(res.getByTestId('form-test-provide-submit')); + }); + + expect(onSubmit).toHaveBeenCalledWith({ data: {}, isValid: false }); + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.tsx new file mode 100644 index 0000000000000..01ab1803c00ea --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/connector.tsx @@ -0,0 +1,51 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { ActionConnectorFieldsProps } from '@kbn/triggers-actions-ui-plugin/public'; +import { + ConfigFieldSchema, + SimpleConnectorForm, + SecretsFieldSchema, +} from '@kbn/triggers-actions-ui-plugin/public'; + +import { + URL_LABEL, + API_KEY_LABEL, + ORGANISATION_LABEL, + ORGANISATION_HELP_TEXT, +} from './translations'; + +const configFormSchema: ConfigFieldSchema[] = [ + { + id: 'organisation', + label: ORGANISATION_LABEL, + isRequired: false, + helpText: ORGANISATION_HELP_TEXT, + }, + { id: 'url', label: URL_LABEL, isUrlField: true }, +]; + +const secretsFormSchema: SecretsFieldSchema[] = [ + { id: 'apiKey', label: API_KEY_LABEL, isPasswordField: true }, +]; + +const TheHiveConnectorFields: React.FC = ({ readOnly, isEdit }) => { + return ( + <> + + + ); +}; + +// eslint-disable-next-line import/no-default-export +export { TheHiveConnectorFields as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/constants.ts b/x-pack/plugins/stack_connectors/public/connector_types/thehive/constants.ts new file mode 100644 index 0000000000000..b94fd5e4ad4be --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/constants.ts @@ -0,0 +1,114 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; +import { TheHiveSeverity, TheHiveTLP, SUB_ACTION } from '../../../common/thehive/constants'; + +export const eventActionOptions = [ + { + value: SUB_ACTION.PUSH_TO_SERVICE, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectCreateCaseOptionLabel', + { + defaultMessage: 'Create Case', + } + ), + }, + { + value: SUB_ACTION.CREATE_ALERT, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectCreateAlertOptionLabel', + { + defaultMessage: 'Create Alert', + } + ), + }, +]; + +export const severityOptions = [ + { + value: TheHiveSeverity.LOW, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectSeverityLowOptionLabel', + { + defaultMessage: 'LOW', + } + ), + }, + { + value: TheHiveSeverity.MEDIUM, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectSeverityMediumOptionLabel', + { + defaultMessage: 'MEDIUM', + } + ), + }, + { + value: TheHiveSeverity.HIGH, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectSeverityHighOptionLabel', + { + defaultMessage: 'HIGH', + } + ), + }, + { + value: TheHiveSeverity.CRITICAL, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectSeverityCriticalOptionLabel', + { + defaultMessage: 'CRITICAL', + } + ), + }, +]; + +export const tlpOptions = [ + { + value: TheHiveTLP.CLEAR, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectTlpClearOptionLabel', + { + defaultMessage: 'CLEAR', + } + ), + }, + { + value: TheHiveTLP.GREEN, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectTlpGreenOptionLabel', + { + defaultMessage: 'GREEN', + } + ), + }, + { + value: TheHiveTLP.AMBER, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectTlpAmberOptionLabel', + { + defaultMessage: 'AMBER', + } + ), + }, + { + value: TheHiveTLP.AMBER_STRICT, + text: i18n.translate( + 'xpack.stackConnectors.components.thehive.eventSelectTlpAmberStrictOptionLabel', + { + defaultMessage: 'AMBER+STRICT', + } + ), + }, + { + value: TheHiveTLP.RED, + text: i18n.translate('xpack.stackConnectors.components.thehive.eventSelectTlpRedOptionLabel', { + defaultMessage: 'RED', + }), + }, +]; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/index.ts b/x-pack/plugins/stack_connectors/public/connector_types/thehive/index.ts new file mode 100644 index 0000000000000..9a98fce201e58 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/index.ts @@ -0,0 +1,8 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +export { getConnectorType as getTheHiveConnectorType } from './thehive'; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/logo.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/logo.tsx new file mode 100644 index 0000000000000..45025e1f24041 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/logo.tsx @@ -0,0 +1,40 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { LogoProps } from '../types'; + +const Logo = (props: LogoProps) => ( + + + + + + +); + +// eslint-disable-next-line import/no-default-export +export { Logo as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.test.tsx new file mode 100644 index 0000000000000..d69080938fc26 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.test.tsx @@ -0,0 +1,105 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { fireEvent, render } from '@testing-library/react'; +import { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public/types'; +import TheHiveParamsFields from './params'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { ExecutorParams, ExecutorSubActionPushParams } from '../../../common/thehive/types'; + +describe('TheHiveParamsFields renders', () => { + const subActionParams: ExecutorSubActionPushParams = { + incident: { + title: 'title {test}', + description: 'test description', + tlp: 2, + severity: 2, + tags: ['test1'], + externalId: null, + }, + comments: [], + }; + const actionParams: ExecutorParams = { + subAction: SUB_ACTION.PUSH_TO_SERVICE, + subActionParams, + }; + const connector: ActionConnector = { + secrets: {}, + config: {}, + id: 'test', + actionTypeId: '.test', + name: 'Test', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false as const, + }; + + const editAction = jest.fn(); + const defaultProps = { + actionConnector: connector, + actionParams, + editAction, + errors: { 'subActionParams.incident.title': [] }, + index: 0, + messageVariables: [], + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('all Params fields is rendered', () => { + const { getByTestId } = render(); + + expect(getByTestId('eventActionSelect')).toBeInTheDocument(); + expect(getByTestId('eventActionSelect')).toHaveValue(SUB_ACTION.PUSH_TO_SERVICE); + }); + + it('calls editAction function with the correct arguments', () => { + const { getByTestId } = render(); + const eventActionEl = getByTestId('eventActionSelect'); + + fireEvent.change(eventActionEl, { target: { value: SUB_ACTION.CREATE_ALERT } }); + expect(editAction).toHaveBeenCalledWith( + 'subActionParams', + { + tlp: 2, + severity: 2, + tags: [], + sourceRef: '{{alert.uuid}}', + }, + 0 + ); + + fireEvent.change(eventActionEl, { target: { value: SUB_ACTION.PUSH_TO_SERVICE } }); + expect(editAction).toHaveBeenCalledWith( + 'subActionParams', + { + incident: { + tlp: 2, + severity: 2, + tags: [], + }, + comments: [], + }, + 0 + ); + }); + + it('handles the case when subAction is undefined', () => { + const newProps = { + ...defaultProps, + actionParams: { + ...actionParams, + subAction: undefined, + }, + }; + render(); + expect(editAction).toHaveBeenCalledWith('subAction', SUB_ACTION.PUSH_TO_SERVICE, 0); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.tsx new file mode 100644 index 0000000000000..f0221ce7a460b --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params.tsx @@ -0,0 +1,133 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useEffect, useRef, useMemo } from 'react'; +import { ActionParamsProps, ActionConnectorMode } from '@kbn/triggers-actions-ui-plugin/public'; +import { EuiFormRow, EuiSelect } from '@elastic/eui'; +import { eventActionOptions } from './constants'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { ExecutorParams } from '../../../common/thehive/types'; +import { TheHiveParamsAlertFields } from './params_alert'; +import { TheHiveParamsCaseFields } from './params_case'; +import * as translations from './translations'; + +const TheHiveParamsFields: React.FunctionComponent> = ({ + actionConnector, + actionParams, + editAction, + index, + errors, + messageVariables, + executionMode, +}) => { + const [eventAction, setEventAction] = useState( + actionParams.subAction ?? SUB_ACTION.PUSH_TO_SERVICE + ); + const actionConnectorRef = useRef(actionConnector?.id ?? ''); + const isTest = useMemo(() => executionMode === ActionConnectorMode.Test, [executionMode]); + + useEffect(() => { + if (actionConnector != null && actionConnectorRef.current !== actionConnector.id) { + actionConnectorRef.current = actionConnector.id; + editAction( + 'subActionParams', + { + incident: { + tlp: 2, + severity: 2, + tags: [], + }, + comments: [], + }, + index + ); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [actionConnector]); + + useEffect(() => { + if (!actionParams.subAction) { + editAction('subAction', SUB_ACTION.PUSH_TO_SERVICE, index); + } + if (!actionParams.subActionParams) { + editAction( + 'subActionParams', + { + incident: { + tlp: 2, + severity: 2, + tags: [], + }, + comments: [], + }, + index + ); + } + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [actionParams]); + + useEffect(() => { + editAction('subAction', eventAction, index); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [eventAction]); + + const setEventActionType = (eventActionType: SUB_ACTION) => { + const subActionParams = + eventActionType === SUB_ACTION.CREATE_ALERT + ? { + tlp: 2, + severity: 2, + tags: [], + sourceRef: isTest ? undefined : '{{alert.uuid}}', + } + : { + incident: { + tlp: 2, + severity: 2, + tags: [], + }, + comments: [], + }; + + setEventAction(eventActionType); + editAction('subActionParams', subActionParams, index); + }; + + return ( + <> + + setEventActionType(e.target.value as SUB_ACTION)} + /> + + {eventAction === SUB_ACTION.PUSH_TO_SERVICE ? ( + + ) : ( + + )} + + ); +}; + +// eslint-disable-next-line import/no-default-export +export { TheHiveParamsFields as default }; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.test.tsx new file mode 100644 index 0000000000000..138595bd52690 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.test.tsx @@ -0,0 +1,70 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render } from '@testing-library/react'; +import { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public/types'; +import { TheHiveParamsAlertFields } from './params_alert'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { ExecutorParams, ExecutorSubActionCreateAlertParams } from '../../../common/thehive/types'; + +describe('TheHiveParamsFields renders', () => { + const subActionParams: ExecutorSubActionCreateAlertParams = { + title: 'title {test}', + description: 'description test', + tlp: 2, + severity: 2, + tags: ['test1'], + source: 'source test', + type: 'sourceType test', + sourceRef: 'sourceRef test', + }; + const actionParams: ExecutorParams = { + subAction: SUB_ACTION.CREATE_ALERT, + subActionParams, + }; + const connector: ActionConnector = { + secrets: {}, + config: {}, + id: 'test', + actionTypeId: '.test', + name: 'Test', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false as const, + }; + + const editAction = jest.fn(); + const defaultProps = { + actionConnector: connector, + actionParams, + editAction, + errors: { 'subActionParams.incident.title': [] }, + index: 0, + messageVariables: [], + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('all Params fields is rendered', () => { + const { getByTestId } = render(); + + expect(getByTestId('titleInput')).toBeInTheDocument(); + expect(getByTestId('descriptionTextArea')).toBeInTheDocument(); + expect(getByTestId('tagsInput')).toBeInTheDocument(); + expect(getByTestId('severitySelectInput')).toBeInTheDocument(); + expect(getByTestId('tlpSelectInput')).toBeInTheDocument(); + expect(getByTestId('typeInput')).toBeInTheDocument(); + expect(getByTestId('sourceInput')).toBeInTheDocument(); + expect(getByTestId('sourceRefInput')).toBeInTheDocument(); + + expect(getByTestId('severitySelectInput')).toHaveValue('2'); + expect(getByTestId('tlpSelectInput')).toHaveValue('2'); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.tsx new file mode 100644 index 0000000000000..868298ef98a7c --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_alert.tsx @@ -0,0 +1,192 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useMemo } from 'react'; +import { + TextFieldWithMessageVariables, + TextAreaWithMessageVariables, + ActionParamsProps, +} from '@kbn/triggers-actions-ui-plugin/public'; +import { EuiFormRow, EuiSelect, EuiComboBox } from '@elastic/eui'; +import { ExecutorParams, ExecutorSubActionCreateAlertParams } from '../../../common/thehive/types'; +import { severityOptions, tlpOptions } from './constants'; +import * as translations from './translations'; + +export const TheHiveParamsAlertFields: React.FC> = ({ + actionParams, + editAction, + index, + errors, + messageVariables, +}) => { + const alert = useMemo( + () => + (actionParams.subActionParams as ExecutorSubActionCreateAlertParams) ?? + ({ + tlp: 2, + severity: 2, + tags: [], + } as unknown as ExecutorSubActionCreateAlertParams), + [actionParams.subActionParams] + ); + + const [severity, setSeverity] = useState(alert.severity ?? severityOptions[1].value); + const [tlp, setTlp] = useState(alert.tlp ?? tlpOptions[2].value); + const [selectedOptions, setSelected] = useState>( + alert.tags?.map((tag) => ({ label: tag })) ?? [] + ); + + const onCreateOption = (searchValue: string) => { + setSelected([...selectedOptions, { label: searchValue }]); + editAction('subActionParams', { ...alert, tags: [...(alert.tags ?? []), searchValue] }, index); + }; + + const onChange = (selectedOptionList: Array<{ label: string }>) => { + setSelected(selectedOptionList); + editAction( + 'subActionParams', + { ...alert, tags: selectedOptionList.map((option) => option.label) }, + index + ); + }; + + return ( + <> + { + editAction('subActionParams', { ...alert, [key]: value }, index); + }} + messageVariables={messageVariables} + paramsProperty={'title'} + inputTargetValue={alert.title ?? undefined} + wrapField={true} + formRowProps={{ + label: translations.TITLE_LABEL, + fullWidth: true, + helpText: '', + isInvalid: + errors['createAlertParam.title'] !== undefined && + Number(errors['createAlertParam.title'].length) > 0 && + alert.title !== undefined, + error: errors['createAlertParam.title'] as string, + }} + errors={errors['createAlertParam.title'] as string[]} + /> + { + editAction('subActionParams', { ...alert, [key]: value }, index); + }} + messageVariables={messageVariables} + paramsProperty={'description'} + inputTargetValue={alert.description ?? undefined} + errors={errors['createAlertParam.description'] as string[]} + /> + { + editAction('subActionParams', { ...alert, [key]: value }, index); + }} + paramsProperty={'type'} + inputTargetValue={alert.type ?? undefined} + wrapField={true} + formRowProps={{ + label: translations.TYPE_LABEL, + fullWidth: true, + helpText: '', + isInvalid: + errors['createAlertParam.type'] !== undefined && + Number(errors['createAlertParam.type'].length) > 0 && + alert.type !== undefined, + error: errors['createAlertParam.type'] as string, + }} + errors={errors['createAlertParam.type'] as string[]} + /> + { + editAction('subActionParams', { ...alert, [key]: value }, index); + }} + paramsProperty={'source'} + inputTargetValue={alert.source ?? undefined} + wrapField={true} + formRowProps={{ + label: translations.SOURCE_LABEL, + fullWidth: true, + helpText: '', + isInvalid: + errors['createAlertParam.source'] !== undefined && + Number(errors['createAlertParam.source'].length) > 0 && + alert.source !== undefined, + error: errors['createAlertParam.source'] as string, + }} + errors={errors['createAlertParam.source'] as string[]} + /> + { + editAction('subActionParams', { ...alert, [key]: value }, index); + }} + messageVariables={messageVariables} + paramsProperty={'sourceRef'} + inputTargetValue={alert.sourceRef ?? undefined} + wrapField={true} + formRowProps={{ + label: translations.SOURCE_REF_LABEL, + fullWidth: true, + helpText: '', + isInvalid: + errors['createAlertParam.sourceRef'] !== undefined && + Number(errors['createAlertParam.sourceRef'].length) > 0 && + alert.sourceRef !== undefined, + error: errors['createAlertParam.sourceRef'] as string, + }} + errors={errors['createAlertParam.sourceRef'] as string[]} + /> + + { + editAction( + 'subActionParams', + { ...alert, severity: parseInt(e.target.value, 10) }, + index + ); + setSeverity(parseInt(e.target.value, 10)); + }} + /> + + + { + editAction('subActionParams', { ...alert, tlp: parseInt(e.target.value, 10) }, index); + setTlp(parseInt(e.target.value, 10)); + }} + /> + + + + + + ); +}; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.test.tsx new file mode 100644 index 0000000000000..f76d9fe8aece0 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.test.tsx @@ -0,0 +1,69 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React from 'react'; +import { render } from '@testing-library/react'; +import { ActionConnector } from '@kbn/triggers-actions-ui-plugin/public/types'; +import TheHiveParamsFields from './params'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { ExecutorParams, ExecutorSubActionPushParams } from '../../../common/thehive/types'; + +describe('TheHiveParamsFields renders', () => { + const subActionParams: ExecutorSubActionPushParams = { + incident: { + title: 'title {test}', + description: 'test description', + tlp: 2, + severity: 2, + tags: ['test1'], + externalId: null, + }, + comments: [], + }; + const actionParams: ExecutorParams = { + subAction: SUB_ACTION.PUSH_TO_SERVICE, + subActionParams, + }; + const connector: ActionConnector = { + secrets: {}, + config: {}, + id: 'test', + actionTypeId: '.test', + name: 'Test', + isPreconfigured: false, + isDeprecated: false, + isSystemAction: false as const, + }; + + const editAction = jest.fn(); + const defaultProps = { + actionConnector: connector, + actionParams, + editAction, + errors: { 'subActionParams.incident.title': [] }, + index: 0, + messageVariables: [], + }; + + beforeEach(() => { + jest.clearAllMocks(); + }); + + it('all Params fields is rendered', () => { + const { getByTestId } = render(); + + expect(getByTestId('titleInput')).toBeInTheDocument(); + expect(getByTestId('descriptionTextArea')).toBeInTheDocument(); + expect(getByTestId('tagsInput')).toBeInTheDocument(); + expect(getByTestId('severitySelectInput')).toBeInTheDocument(); + expect(getByTestId('tlpSelectInput')).toBeInTheDocument(); + expect(getByTestId('commentsTextArea')).toBeInTheDocument(); + + expect(getByTestId('severitySelectInput')).toHaveValue('2'); + expect(getByTestId('tlpSelectInput')).toHaveValue('2'); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.tsx new file mode 100644 index 0000000000000..7ee7f36efd90c --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/params_case.tsx @@ -0,0 +1,154 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import React, { useState, useMemo, useCallback } from 'react'; +import { + TextFieldWithMessageVariables, + TextAreaWithMessageVariables, + ActionParamsProps, +} from '@kbn/triggers-actions-ui-plugin/public'; +import { EuiFormRow, EuiSelect, EuiComboBox } from '@elastic/eui'; +import { ExecutorParams, ExecutorSubActionPushParams } from '../../../common/thehive/types'; +import { severityOptions, tlpOptions } from './constants'; +import * as translations from './translations'; + +export const TheHiveParamsCaseFields: React.FC> = ({ + actionParams, + editAction, + index, + errors, + messageVariables, +}) => { + const { incident, comments } = useMemo( + () => + (actionParams.subActionParams as ExecutorSubActionPushParams) ?? + ({ + incident: { + tlp: 2, + severity: 2, + tags: [], + }, + comments: [], + } as unknown as ExecutorSubActionPushParams), + [actionParams.subActionParams] + ); + + const [severity, setSeverity] = useState(incident.severity ?? severityOptions[1].value); + const [tlp, setTlp] = useState(incident.tlp ?? tlpOptions[2].value); + const [selectedOptions, setSelected] = useState>( + incident.tags?.map((tag) => ({ label: tag })) ?? [] + ); + + const editSubActionProperty = useCallback( + (key: string, value: any) => { + const newProps = + key !== 'comments' + ? { + incident: { ...incident, [key]: value }, + comments, + } + : { incident, [key]: value }; + editAction('subActionParams', newProps, index); + }, + [comments, editAction, incident, index] + ); + + const editComment = useCallback( + (key, value) => { + editSubActionProperty(key, [{ commentId: '1', comment: value }]); + }, + [editSubActionProperty] + ); + + const onCreateOption = (searchValue: string) => { + setSelected([...selectedOptions, { label: searchValue }]); + editSubActionProperty('tags', [...(incident.tags ?? []), searchValue]); + }; + + const onChange = (selectedOptionList: Array<{ label: string }>) => { + setSelected(selectedOptionList); + editSubActionProperty( + 'tags', + selectedOptionList.map((option) => option.label) + ); + }; + + return ( + <> + 0 && + incident.title !== undefined, + error: errors['pushToServiceParam.incident.title'] as string, + }} + errors={errors['pushToServiceParam.incident.title'] as string[]} + /> + + + { + editSubActionProperty('severity', parseInt(e.target.value, 10)); + setSeverity(parseInt(e.target.value, 10)); + }} + /> + + + { + editSubActionProperty('tlp', parseInt(e.target.value, 10)); + setTlp(parseInt(e.target.value, 10)); + }} + /> + + + + + 0 ? comments[0].comment : undefined} + label={translations.COMMENTS_LABEL} + /> + + ); +}; diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.test.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.test.tsx new file mode 100644 index 0000000000000..3a6788a8bf55d --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.test.tsx @@ -0,0 +1,137 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TypeRegistry } from '@kbn/triggers-actions-ui-plugin/public/application/type_registry'; +import { registerConnectorTypes } from '..'; +import { ActionTypeModel as ConnectorTypeModel } from '@kbn/triggers-actions-ui-plugin/public/types'; +import { experimentalFeaturesMock, registrationServicesMock } from '../../mocks'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { ExperimentalFeaturesService } from '../../common/experimental_features_service'; + +const CONNECTOR_TYPE_ID = '.thehive'; +let connectorTypeModel: ConnectorTypeModel; +beforeAll(() => { + const connectorTypeRegistry = new TypeRegistry(); + ExperimentalFeaturesService.init({ experimentalFeatures: experimentalFeaturesMock }); + registerConnectorTypes({ connectorTypeRegistry, services: registrationServicesMock }); + const getResult = connectorTypeRegistry.get(CONNECTOR_TYPE_ID); + if (getResult !== null) { + connectorTypeModel = getResult; + } +}); + +describe('actionTypeRegistry.get() works', () => { + test('action type static data is as expected', () => { + expect(connectorTypeModel.id).toEqual(CONNECTOR_TYPE_ID); + }); +}); + +describe('thehive pushToService action params validation', () => { + test('pushToService action params validation succeeds when action params is valid', async () => { + const actionParams = { + subAction: SUB_ACTION.PUSH_TO_SERVICE, + subActionParams: { + incident: { + title: 'title {test}', + description: 'test description', + }, + }, + comments: [], + }; + + expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ + errors: { + 'pushToServiceParam.incident.title': [], + 'pushToServiceParam.incident.description': [], + 'createAlertParam.title': [], + 'createAlertParam.description': [], + 'createAlertParam.type': [], + 'createAlertParam.source': [], + 'createAlertParam.sourceRef': [], + }, + }); + }); + + test('pushToService action params validation fails when Required fields is not valid', async () => { + const actionParams = { + subAction: SUB_ACTION.PUSH_TO_SERVICE, + subActionParams: { + incident: { + title: '', + description: '', + }, + }, + comments: [], + }; + + expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ + errors: { + 'pushToServiceParam.incident.title': ['Title is required.'], + 'pushToServiceParam.incident.description': ['Description is required.'], + 'createAlertParam.title': [], + 'createAlertParam.description': [], + 'createAlertParam.type': [], + 'createAlertParam.source': [], + 'createAlertParam.sourceRef': [], + }, + }); + }); +}); + +describe('thehive createAlert action params validation', () => { + test('createAlert action params validation succeeds when action params is valid', async () => { + const actionParams = { + subAction: SUB_ACTION.CREATE_ALERT, + subActionParams: { + title: 'some title {test}', + description: 'some description {test}', + type: 'type test', + source: 'source test', + sourceRef: 'source reference test', + }, + comments: [], + }; + + expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ + errors: { + 'pushToServiceParam.incident.title': [], + 'pushToServiceParam.incident.description': [], + 'createAlertParam.title': [], + 'createAlertParam.description': [], + 'createAlertParam.type': [], + 'createAlertParam.source': [], + 'createAlertParam.sourceRef': [], + }, + }); + }); + + test('params validation fails when Required fields is not valid', async () => { + const actionParams = { + subAction: SUB_ACTION.CREATE_ALERT, + subActionParams: { + title: '', + description: '', + type: '', + source: '', + sourceRef: '', + }, + comments: [], + }; + + expect(await connectorTypeModel.validateParams(actionParams)).toEqual({ + errors: { + 'pushToServiceParam.incident.title': [], + 'pushToServiceParam.incident.description': [], + 'createAlertParam.title': ['Title is required.'], + 'createAlertParam.description': ['Description is required.'], + 'createAlertParam.type': ['Type is required.'], + 'createAlertParam.source': ['Source is required.'], + 'createAlertParam.sourceRef': ['Source Reference is required.'], + }, + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.tsx b/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.tsx new file mode 100644 index 0000000000000..5523a24e05d50 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/thehive.tsx @@ -0,0 +1,86 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { lazy } from 'react'; +import { i18n } from '@kbn/i18n'; +import { GenericValidationResult } from '@kbn/triggers-actions-ui-plugin/public/types'; +import { TheHiveConnector } from './types'; +import { THEHIVE_CONNECTOR_ID, SUB_ACTION, THEHIVE_TITLE } from '../../../common/thehive/constants'; +import { + ExecutorParams, + ExecutorSubActionPushParams, + ExecutorSubActionCreateAlertParams, +} from '../../../common/thehive/types'; + +export function getConnectorType(): TheHiveConnector { + return { + id: THEHIVE_CONNECTOR_ID, + iconClass: lazy(() => import('./logo')), + selectMessage: i18n.translate('xpack.stackConnectors.components.thehive.descriptionText', { + defaultMessage: 'Create cases and alerts in TheHive', + }), + actionTypeTitle: THEHIVE_TITLE, + hideInUi: true, + validateParams: async ( + actionParams: ExecutorParams + ): Promise> => { + const translations = await import('./translations'); + + const errors = { + 'pushToServiceParam.incident.title': new Array(), + 'pushToServiceParam.incident.description': new Array(), + 'createAlertParam.title': new Array(), + 'createAlertParam.description': new Array(), + 'createAlertParam.type': new Array(), + 'createAlertParam.source': new Array(), + 'createAlertParam.sourceRef': new Array(), + }; + + const validationResult = { + errors, + }; + + const { subAction, subActionParams } = actionParams; + if (subAction === SUB_ACTION.PUSH_TO_SERVICE) { + const pushToServiceParam = subActionParams as ExecutorSubActionPushParams; + if (pushToServiceParam && pushToServiceParam.incident) { + if (!pushToServiceParam.incident.title?.length) { + errors['pushToServiceParam.incident.title'].push(translations.TITLE_REQUIRED); + } + if (!pushToServiceParam.incident.description?.length) { + errors['pushToServiceParam.incident.description'].push( + translations.DESCRIPTION_REQUIRED + ); + } + } + } else if (subAction === SUB_ACTION.CREATE_ALERT) { + const createAlertParam = subActionParams as ExecutorSubActionCreateAlertParams; + if (createAlertParam) { + if (!createAlertParam.title?.length) { + errors['createAlertParam.title'].push(translations.TITLE_REQUIRED); + } + if (!createAlertParam.description?.length) { + errors['createAlertParam.description'].push(translations.DESCRIPTION_REQUIRED); + } + if (!createAlertParam.type?.length) { + errors['createAlertParam.type'].push(translations.TYPE_REQUIRED); + } + if (!createAlertParam.source?.length) { + errors['createAlertParam.source'].push(translations.SOURCE_REQUIRED); + } + if (!createAlertParam.sourceRef?.length) { + errors['createAlertParam.sourceRef'].push(translations.SOURCE_REF_REQUIRED); + } + } + } + + return validationResult; + }, + actionConnectorFields: lazy(() => import('./connector')), + actionParamsFields: lazy(() => import('./params')), + }; +} diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/translations.ts b/x-pack/plugins/stack_connectors/public/connector_types/thehive/translations.ts new file mode 100644 index 0000000000000..fa2c7b822019a --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/translations.ts @@ -0,0 +1,138 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { i18n } from '@kbn/i18n'; + +export const URL_LABEL = i18n.translate('xpack.stackConnectors.components.thehive.urlFieldLabel', { + defaultMessage: 'URL', +}); + +export const ORGANISATION_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.organisationFieldLabel', + { + defaultMessage: 'Organisation', + } +); + +export const ORGANISATION_HELP_TEXT = i18n.translate( + 'xpack.stackConnectors.components.thehive.organisationFieldHelpText', + { + defaultMessage: `By default, the user's default organization will be considered.`, + } +); + +export const API_KEY_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.apiKeyFieldLabel', + { + defaultMessage: 'API Key', + } +); + +export const EVENT_ACTION_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.eventActionSelectFieldLabel', + { + defaultMessage: 'Event Action', + } +); + +export const TITLE_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.titleFieldLabel', + { + defaultMessage: 'Title*', + } +); + +export const DESCRIPTION_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.descriptionFieldLabel', + { + defaultMessage: 'Description*', + } +); + +export const TLP_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.tlpSelectFieldLabel', + { + defaultMessage: 'TLP', + } +); + +export const SEVERITY_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.severitySelectFieldLabel', + { + defaultMessage: 'Severity', + } +); + +export const TAGS_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.TagsMultiSelectFieldLabel', + { + defaultMessage: 'Tags', + } +); + +export const COMMENTS_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.commentsTextAreaFieldLabel', + { + defaultMessage: 'Additional comments', + } +); + +export const TYPE_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.typeFieldLabel', + { + defaultMessage: 'Type*', + } +); + +export const SOURCE_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.sourceFieldLabel', + { + defaultMessage: 'Source*', + } +); + +export const SOURCE_REF_LABEL = i18n.translate( + 'xpack.stackConnectors.components.thehive.sourceRefFieldLabel', + { + defaultMessage: 'Source Reference*', + } +); + +export const TITLE_REQUIRED = i18n.translate( + 'xpack.stackConnectors.components.thehive.requiredTitleText', + { + defaultMessage: 'Title is required.', + } +); + +export const DESCRIPTION_REQUIRED = i18n.translate( + 'xpack.stackConnectors.components.thehive.requiredDescriptionText', + { + defaultMessage: 'Description is required.', + } +); + +export const TYPE_REQUIRED = i18n.translate( + 'xpack.stackConnectors.components.thehive.requiredTypeText', + { + defaultMessage: 'Type is required.', + } +); + +export const SOURCE_REQUIRED = i18n.translate( + 'xpack.stackConnectors.components.thehive.requiredSourceText', + { + defaultMessage: 'Source is required.', + } +); + +export const SOURCE_REF_REQUIRED = i18n.translate( + 'xpack.stackConnectors.components.thehive.requiredSourceRefText', + { + defaultMessage: 'Source Reference is required.', + } +); diff --git a/x-pack/plugins/stack_connectors/public/connector_types/thehive/types.ts b/x-pack/plugins/stack_connectors/public/connector_types/thehive/types.ts new file mode 100644 index 0000000000000..0724b5bf2b9d3 --- /dev/null +++ b/x-pack/plugins/stack_connectors/public/connector_types/thehive/types.ts @@ -0,0 +1,11 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ActionTypeModel as ConnectorTypeModel } from '@kbn/triggers-actions-ui-plugin/public'; +import { TheHiveConfig, TheHiveSecrets, ExecutorParams } from '../../../common/thehive/types'; + +export type TheHiveConnector = ConnectorTypeModel; diff --git a/x-pack/plugins/stack_connectors/server/connector_types/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/index.ts index 6364fed0e193f..2c905471761ed 100644 --- a/x-pack/plugins/stack_connectors/server/connector_types/index.ts +++ b/x-pack/plugins/stack_connectors/server/connector_types/index.ts @@ -29,6 +29,7 @@ import { getConnectorType as getWebhookConnectorType } from './webhook'; import { getConnectorType as getXmattersConnectorType } from './xmatters'; import { getConnectorType as getTeamsConnectorType } from './teams'; import { getConnectorType as getD3SecurityConnectorType } from './d3security'; +import { getConnectorType as getTheHiveConnectorType } from './thehive'; import { getOpsgenieConnectorType } from './opsgenie'; import type { ActionParamsType as ServiceNowITSMActionParams } from './servicenow_itsm'; import type { ActionParamsType as ServiceNowSIRActionParams } from './servicenow_sir'; @@ -109,6 +110,7 @@ export function registerConnectorTypes({ actions.registerSubActionConnectorType(getGeminiConnectorType()); actions.registerSubActionConnectorType(getD3SecurityConnectorType()); actions.registerSubActionConnectorType(getResilientConnectorType()); + actions.registerSubActionConnectorType(getTheHiveConnectorType()); if (experimentalFeatures.sentinelOneConnectorOn) { actions.registerSubActionConnectorType(getSentinelOneConnectorType()); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.test.ts new file mode 100644 index 0000000000000..86176462ab6d2 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.test.ts @@ -0,0 +1,20 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TheHiveConnectorType, getConnectorType } from '.'; + +let connectorType: TheHiveConnectorType; + +describe('TheHive Connector', () => { + beforeEach(() => { + connectorType = getConnectorType(); + }); + test('exposes the connector as `TheHive` with id `.thehive`', () => { + expect(connectorType.id).toEqual('.thehive'); + expect(connectorType.name).toEqual('TheHive'); + }); +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.ts b/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.ts new file mode 100644 index 0000000000000..d39849adb4490 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/thehive/index.ts @@ -0,0 +1,46 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { + SubActionConnectorType, + ValidatorType, +} from '@kbn/actions-plugin/server/sub_action_framework/types'; +import { + AlertingConnectorFeatureId, + SecurityConnectorFeatureId, + UptimeConnectorFeatureId, +} from '@kbn/actions-plugin/common/types'; +import { urlAllowListValidator } from '@kbn/actions-plugin/server'; +import { TheHiveConnector } from './thehive'; +import { + TheHiveConfigSchema, + TheHiveSecretsSchema, + PushToServiceIncidentSchema, +} from '../../../common/thehive/schema'; +import { THEHIVE_CONNECTOR_ID, THEHIVE_TITLE } from '../../../common/thehive/constants'; +import { TheHiveConfig, TheHiveSecrets } from '../../../common/thehive/types'; + +export type TheHiveConnectorType = SubActionConnectorType; + +export function getConnectorType(): TheHiveConnectorType { + return { + id: THEHIVE_CONNECTOR_ID, + minimumLicenseRequired: 'platinum', + name: THEHIVE_TITLE, + getService: (params) => new TheHiveConnector(params, PushToServiceIncidentSchema), + supportedFeatureIds: [ + AlertingConnectorFeatureId, + SecurityConnectorFeatureId, + UptimeConnectorFeatureId, + ], + schema: { + config: TheHiveConfigSchema, + secrets: TheHiveSecretsSchema, + }, + validators: [{ type: ValidatorType.CONFIG, validator: urlAllowListValidator('url') }], + }; +} diff --git a/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.test.ts b/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.test.ts new file mode 100644 index 0000000000000..6218d48ae33fa --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.test.ts @@ -0,0 +1,409 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { TheHiveConnector } from './thehive'; +import { actionsConfigMock } from '@kbn/actions-plugin/server/actions_config.mock'; +import { THEHIVE_CONNECTOR_ID } from '../../../common/thehive/constants'; +import { loggingSystemMock } from '@kbn/core-logging-server-mocks'; +import { actionsMock } from '@kbn/actions-plugin/server/mocks'; +import { + TheHiveIncidentResponseSchema, + TheHiveUpdateIncidentResponseSchema, + TheHiveAddCommentResponseSchema, + TheHiveCreateAlertResponseSchema, + PushToServiceIncidentSchema, +} from '../../../common/thehive/schema'; +import type { ExecutorSubActionCreateAlertParams, Incident } from '../../../common/thehive/types'; + +const mockTime = new Date('2024-04-03T09:10:30.000'); + +describe('TheHiveConnector', () => { + const connector = new TheHiveConnector( + { + configurationUtilities: actionsConfigMock.create(), + connector: { id: '1', type: THEHIVE_CONNECTOR_ID }, + config: { url: 'https://example.com', organisation: null }, + secrets: { apiKey: 'test123' }, + logger: loggingSystemMock.createLogger(), + services: actionsMock.createServices(), + }, + PushToServiceIncidentSchema + ); + + let mockRequest: jest.Mock; + let mockError: jest.Mock; + + beforeAll(() => { + jest.useFakeTimers(); + jest.setSystemTime(mockTime); + }); + + afterAll(() => { + jest.useRealTimers(); + }); + + beforeEach(() => { + mockError = jest.fn().mockImplementation(() => { + throw new Error('API Error'); + }); + jest.clearAllMocks(); + }); + + describe('createIncident', () => { + const mockResponse = { + data: { + _id: '~172064', + _type: 'Case', + _createdBy: 'user1@thehive.local', + _createdAt: 1712128153041, + number: 67, + title: 'title', + description: 'description', + severity: 1, + severityLabel: 'LOW', + startDate: 1712128153029, + tags: ['tag1', 'tag2'], + flag: false, + tlp: 2, + tlpLabel: 'AMBER', + pap: 2, + papLabel: 'AMBER', + status: 'New', + stage: 'New', + assignee: 'user1@thehive.local', + customFields: [], + userPermissions: [ + 'manageCase/create', + 'manageAlert/update', + 'manageProcedure', + 'managePage', + 'manageObservable', + 'manageCase/delete', + 'manageAlert/create', + 'manageCaseReport', + 'manageAlert/delete', + 'accessTheHiveFS', + 'manageKnowledgeBase', + 'manageAction', + 'manageShare', + 'manageAnalyse', + 'manageFunction/invoke', + 'manageTask', + 'manageCase/merge', + 'manageCustomEvent', + 'manageAlert/import', + 'manageCase/changeOwnership', + 'manageComment', + 'manageAlert/reopen', + 'manageCase/update', + 'manageCase/reopen', + ], + extraData: {}, + newDate: 1712128153029, + timeToDetect: 0, + }, + }; + + beforeEach(() => { + mockRequest = jest.fn().mockResolvedValue(mockResponse); + // @ts-ignore + connector.request = mockRequest; + jest.clearAllMocks(); + }); + + const incident: Incident = { + title: 'title', + description: 'description', + severity: 1, + tlp: 2, + tags: ['tag1', 'tag2'], + }; + + it('TheHive API call is successful with correct parameters', async () => { + const response = await connector.createIncident(incident); + expect(mockRequest).toBeCalledTimes(1); + expect(mockRequest).toHaveBeenCalledWith({ + url: 'https://example.com/api/v1/case', + method: 'post', + responseSchema: TheHiveIncidentResponseSchema, + data: incident, + headers: { + Authorization: 'Bearer test123', + 'X-Organisation': null, + }, + }); + expect(response).toEqual({ + id: '~172064', + url: 'https://example.com/cases/~172064/details', + title: 'title', + pushedDate: '2024-04-03T07:09:13.041Z', + }); + }); + + it('errors during API calls are properly handled', async () => { + // @ts-ignore + connector.request = mockError; + + await expect(connector.createIncident(incident)).rejects.toThrow('API Error'); + }); + }); + + describe('updateIncident', () => { + const mockResponse = { + data: null, + }; + + beforeEach(() => { + mockRequest = jest.fn().mockResolvedValue(mockResponse); + // @ts-ignore + connector.request = mockRequest; + jest.clearAllMocks(); + }); + + const incident: Incident = { + title: 'new title', + description: 'new description', + severity: 3, + tlp: 1, + tags: ['tag3'], + }; + + it('TheHive API call is successful with correct parameters', async () => { + const response = await connector.updateIncident({ incidentId: '~172064', incident }); + expect(mockRequest).toBeCalledTimes(1); + expect(mockRequest).toHaveBeenCalledWith({ + url: 'https://example.com/api/v1/case/~172064', + method: 'patch', + responseSchema: TheHiveUpdateIncidentResponseSchema, + data: incident, + headers: { + Authorization: 'Bearer test123', + 'X-Organisation': null, + }, + }); + expect(response).toEqual({ + id: '~172064', + url: 'https://example.com/cases/~172064/details', + title: 'new title', + pushedDate: mockTime.toISOString(), + }); + }); + + it('errors during API calls are properly handled', async () => { + // @ts-ignore + connector.request = mockError; + + await expect(connector.updateIncident({ incidentId: '~172064', incident })).rejects.toThrow( + 'API Error' + ); + }); + }); + + describe('addComment', () => { + const mockResponse = { + data: { + _id: '~41156688', + _type: 'Comment', + createdBy: 'user1@thehive.local', + createdAt: 1712158280100, + message: 'test comment', + isEdited: false, + extraData: {}, + }, + }; + + beforeEach(() => { + mockRequest = jest.fn().mockResolvedValue(mockResponse); + // @ts-ignore + connector.request = mockRequest; + jest.clearAllMocks(); + }); + + it('TheHive API call is successful with correct parameters', async () => { + await connector.addComment({ + incidentId: '~172064', + comment: 'test comment', + }); + expect(mockRequest).toBeCalledTimes(1); + expect(mockRequest).toHaveBeenCalledWith({ + url: 'https://example.com/api/v1/case/~172064/comment', + method: 'post', + responseSchema: TheHiveAddCommentResponseSchema, + data: { message: 'test comment' }, + headers: { + Authorization: 'Bearer test123', + 'X-Organisation': null, + }, + }); + }); + + it('errors during API calls are properly handled', async () => { + // @ts-ignore + connector.request = mockError; + + await expect( + connector.addComment({ incidentId: '~172064', comment: 'test comment' }) + ).rejects.toThrow('API Error'); + }); + }); + + describe('getIncident', () => { + const mockResponse = { + data: { + _id: '~172064', + _type: 'Case', + _createdBy: 'user1@thehive.local', + _createdAt: 1712128153041, + number: 67, + title: 'title', + description: 'description', + severity: 1, + severityLabel: 'LOW', + startDate: 1712128153029, + tags: ['tag1', 'tag2'], + flag: false, + tlp: 2, + tlpLabel: 'AMBER', + pap: 2, + papLabel: 'AMBER', + status: 'New', + stage: 'New', + assignee: 'user1@thehive.local', + customFields: [], + userPermissions: [ + 'manageCase/create', + 'manageAlert/update', + 'manageProcedure', + 'managePage', + 'manageObservable', + 'manageCase/delete', + 'manageAlert/create', + 'manageCaseReport', + 'manageAlert/delete', + 'accessTheHiveFS', + 'manageKnowledgeBase', + 'manageAction', + 'manageShare', + 'manageAnalyse', + 'manageFunction/invoke', + 'manageTask', + 'manageCase/merge', + 'manageCustomEvent', + 'manageAlert/import', + 'manageCase/changeOwnership', + 'manageComment', + 'manageAlert/reopen', + 'manageCase/update', + 'manageCase/reopen', + ], + extraData: {}, + newDate: 1712128153029, + timeToDetect: 0, + }, + }; + + beforeEach(() => { + mockRequest = jest.fn().mockResolvedValue(mockResponse); + // @ts-ignore + connector.request = mockRequest; + jest.clearAllMocks(); + }); + + it('TheHive API call is successful with correct parameters', async () => { + const response = await connector.getIncident({ id: '~172064' }); + expect(mockRequest).toBeCalledTimes(1); + expect(mockRequest).toHaveBeenCalledWith({ + url: 'https://example.com/api/v1/case/~172064', + responseSchema: TheHiveIncidentResponseSchema, + headers: { + Authorization: 'Bearer test123', + 'X-Organisation': null, + }, + }); + expect(response).toEqual(mockResponse.data); + }); + + it('errors during API calls are properly handled', async () => { + // @ts-ignore + connector.request = mockError; + + await expect(connector.getIncident({ id: '~172064' })).rejects.toThrow('API Error'); + }); + }); + + describe('createAlert', () => { + const mockResponse = { + data: { + _id: '~41128088', + _type: 'Alert', + _createdBy: 'user1@thehive.local', + _createdAt: 1712161128982, + type: 'alert type', + source: 'alert source', + sourceRef: 'test123', + title: 'title', + description: 'description', + severity: 1, + severityLabel: 'LOW', + date: 1712161128964, + tags: ['tag1', 'tag2'], + tlp: 2, + tlpLabel: 'AMBER', + pap: 2, + papLabel: 'AMBER', + follow: true, + customFields: [], + observableCount: 0, + status: 'New', + stage: 'New', + extraData: {}, + newDate: 1712161128967, + timeToDetect: 0, + }, + }; + + beforeEach(() => { + mockRequest = jest.fn().mockResolvedValue(mockResponse); + // @ts-ignore + connector.request = mockRequest; + jest.clearAllMocks(); + }); + + const alert: ExecutorSubActionCreateAlertParams = { + title: 'title', + description: 'description', + type: 'alert type', + source: 'alert source', + sourceRef: 'test123', + severity: 1, + tlp: 2, + tags: ['tag1', 'tag2'], + }; + + it('TheHive API call is successful with correct parameters', async () => { + await connector.createAlert(alert); + expect(mockRequest).toBeCalledTimes(1); + expect(mockRequest).toHaveBeenCalledWith({ + url: 'https://example.com/api/v1/alert', + method: 'post', + responseSchema: TheHiveCreateAlertResponseSchema, + data: alert, + headers: { + Authorization: 'Bearer test123', + 'X-Organisation': null, + }, + }); + }); + + it('errors during API calls are properly handled', async () => { + // @ts-ignore + connector.request = mockError; + + await expect(connector.createAlert(alert)).rejects.toThrow('API Error'); + }); + }); +}); diff --git a/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.ts b/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.ts new file mode 100644 index 0000000000000..fe0caf8788f28 --- /dev/null +++ b/x-pack/plugins/stack_connectors/server/connector_types/thehive/thehive.ts @@ -0,0 +1,140 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import { ServiceParams, CaseConnector } from '@kbn/actions-plugin/server'; +import type { AxiosError } from 'axios'; +import { Type } from '@kbn/config-schema'; +import { SUB_ACTION } from '../../../common/thehive/constants'; +import { + TheHiveIncidentResponseSchema, + TheHiveUpdateIncidentResponseSchema, + TheHiveAddCommentResponseSchema, + TheHiveCreateAlertResponseSchema, + ExecutorSubActionCreateAlertParamsSchema, +} from '../../../common/thehive/schema'; +import type { + TheHiveConfig, + TheHiveSecrets, + ExecutorSubActionCreateAlertParams, + TheHiveFailureResponse, + ExternalServiceIncidentResponse, + Incident, + GetIncidentResponse, +} from '../../../common/thehive/types'; + +export const API_VERSION = 'v1'; + +export class TheHiveConnector extends CaseConnector< + TheHiveConfig, + TheHiveSecrets, + Incident, + GetIncidentResponse +> { + private url: string; + private apiKey: string; + private organisation: string | null; + private urlWithoutTrailingSlash: string; + + constructor( + params: ServiceParams, + pushToServiceParamsExtendedSchema: Record> + ) { + super(params, pushToServiceParamsExtendedSchema); + + this.registerSubAction({ + name: SUB_ACTION.CREATE_ALERT, + method: 'createAlert', + schema: ExecutorSubActionCreateAlertParamsSchema, + }); + + this.url = this.config.url; + this.organisation = this.config.organisation; + this.apiKey = this.secrets.apiKey; + this.urlWithoutTrailingSlash = this.url?.endsWith('/') ? this.url.slice(0, -1) : this.url; + } + + private getAuthHeaders() { + return { Authorization: `Bearer ${this.apiKey}`, 'X-Organisation': this.organisation }; + } + + protected getResponseErrorMessage(error: AxiosError): string { + if (!error.response?.status) { + return 'Unknown API Error'; + } + return `API Error: ${error.response?.data?.type} - ${error.response?.data?.message}`; + } + + public async createIncident(incident: Incident): Promise { + const res = await this.request({ + method: 'post', + url: `${this.url}/api/${API_VERSION}/case`, + data: incident, + headers: this.getAuthHeaders(), + responseSchema: TheHiveIncidentResponseSchema, + }); + + return { + id: res.data._id, + title: res.data.title, + url: `${this.urlWithoutTrailingSlash}/cases/${res.data._id}/details`, + pushedDate: new Date(res.data._createdAt).toISOString(), + }; + } + + public async addComment({ incidentId, comment }: { incidentId: string; comment: string }) { + await this.request({ + method: 'post', + url: `${this.url}/api/${API_VERSION}/case/${incidentId}/comment`, + data: { message: comment }, + headers: this.getAuthHeaders(), + responseSchema: TheHiveAddCommentResponseSchema, + }); + } + + public async updateIncident({ + incidentId, + incident, + }: { + incidentId: string; + incident: Incident; + }): Promise { + await this.request({ + method: 'patch', + url: `${this.url}/api/${API_VERSION}/case/${incidentId}`, + data: incident, + headers: this.getAuthHeaders(), + responseSchema: TheHiveUpdateIncidentResponseSchema, + }); + + return { + id: incidentId, + title: incident.title, + url: `${this.urlWithoutTrailingSlash}/cases/${incidentId}/details`, + pushedDate: new Date().toISOString(), + }; + } + + public async getIncident({ id }: { id: string }): Promise { + const res = await this.request({ + url: `${this.url}/api/${API_VERSION}/case/${id}`, + headers: this.getAuthHeaders(), + responseSchema: TheHiveIncidentResponseSchema, + }); + + return res.data; + } + + public async createAlert(alert: ExecutorSubActionCreateAlertParams) { + await this.request({ + method: 'post', + url: `${this.url}/api/${API_VERSION}/alert`, + data: alert, + headers: this.getAuthHeaders(), + responseSchema: TheHiveCreateAlertResponseSchema, + }); + } +} diff --git a/x-pack/plugins/stack_connectors/server/plugin.test.ts b/x-pack/plugins/stack_connectors/server/plugin.test.ts index ee99a4e4be297..0c9551f787ca0 100644 --- a/x-pack/plugins/stack_connectors/server/plugin.test.ts +++ b/x-pack/plugins/stack_connectors/server/plugin.test.ts @@ -131,7 +131,7 @@ describe('Stack Connectors Plugin', () => { name: 'Torq', }) ); - expect(actionsSetup.registerSubActionConnectorType).toHaveBeenCalledTimes(9); + expect(actionsSetup.registerSubActionConnectorType).toHaveBeenCalledTimes(10); expect(actionsSetup.registerSubActionConnectorType).toHaveBeenNthCalledWith( 1, expect.objectContaining({ @@ -183,13 +183,20 @@ describe('Stack Connectors Plugin', () => { ); expect(actionsSetup.registerSubActionConnectorType).toHaveBeenNthCalledWith( 8, + expect.objectContaining({ + id: '.thehive', + name: 'TheHive', + }) + ); + expect(actionsSetup.registerSubActionConnectorType).toHaveBeenNthCalledWith( + 9, expect.objectContaining({ id: '.sentinelone', name: 'Sentinel One', }) ); expect(actionsSetup.registerSubActionConnectorType).toHaveBeenNthCalledWith( - 9, + 10, expect.objectContaining({ id: '.crowdstrike', name: 'CrowdStrike', diff --git a/x-pack/plugins/task_manager/kibana.jsonc b/x-pack/plugins/task_manager/kibana.jsonc index 9d1a9e216bec7..e1141bbc58377 100644 --- a/x-pack/plugins/task_manager/kibana.jsonc +++ b/x-pack/plugins/task_manager/kibana.jsonc @@ -11,8 +11,6 @@ "task_manager" ], "optionalPlugins": [ - "cloud", - "serverless", "usageCollection" ] } diff --git a/x-pack/plugins/task_manager/server/MONITORING.md b/x-pack/plugins/task_manager/server/MONITORING.md index c4e66ab92bad5..02946b9b3e53f 100644 --- a/x-pack/plugins/task_manager/server/MONITORING.md +++ b/x-pack/plugins/task_manager/server/MONITORING.md @@ -50,7 +50,7 @@ The root `timestamp` is the time in which the summary was exposed (either to the Follow this step-by-step guide to make sense of the stats: https://www.elastic.co/guide/en/kibana/master/task-manager-troubleshooting.html#task-manager-diagnosing-root-cause #### The Configuration Section -The `configuration` section summarizes Task Manager's current configuration, including dynamic configurations which change over time, such as `poll_interval` and `capacity` which adjust in reaction to changing load on the system. +The `configuration` section summarizes Task Manager's current configuration, including dynamic configurations which change over time, such as `poll_interval` and `max_workers` which adjust in reaction to changing load on the system. These are "Hot" stats which are updated whenever a change happens in the configuration. @@ -69,8 +69,8 @@ The `runtime` tracks Task Manager's performance as it runs, making note of task These include: - The time it takes a task to run (p50, p90, p95 & p99, using a configurable running average window, `50` by default) - The average _drift_ that tasks experience (p50, p90, p95 & p99, using the same configurable running average window as above). Drift tells us how long after a task's scheduled a task typically executes. - - The average _load_ (p50, p90, p95 & p99, using the same configurable running average window as above). Load tells us what percentage of capacity is in use at the end of each polling cycle. - - The polling rate (the timestamp of the last time a polling cycle completed), the polling health stats (number of version clashes and mismatches) and the result [`No tasks | Filled task pool | Unexpectedly ran out of capacity`] frequency the past 50 polling cycles (using the same window size as the one used for running averages) + - The average _load_ (p50, p90, p95 & p99, using the same configurable running average window as above). Load tells us what percentage of workers is in use at the end of each polling cycle. + - The polling rate (the timestamp of the last time a polling cycle completed), the polling health stats (number of version clashes and mismatches) and the result [`No tasks | Filled task pool | Unexpectedly ran out of workers`] frequency the past 50 polling cycles (using the same window size as the one used for running averages) - The `Success | Retry | Failure ratio` by task type. This is different than the workload stats which tell you what's in the queue, but ca't keep track of retries and of non recurring tasks as they're wiped off the index when completed. These are "Hot" stats which are updated reactively as Tasks are executed and interacted with. diff --git a/x-pack/plugins/task_manager/server/config.test.ts b/x-pack/plugins/task_manager/server/config.test.ts index 81e9e24ea4586..bb59a73a305d6 100644 --- a/x-pack/plugins/task_manager/server/config.test.ts +++ b/x-pack/plugins/task_manager/server/config.test.ts @@ -23,6 +23,7 @@ describe('config validation', () => { "warn_threshold": 5000, }, "max_attempts": 3, + "max_workers": 10, "metrics_reset_interval": 30000, "monitored_aggregated_stats_refresh_rate": 60000, "monitored_stats_health_verbose_log": Object { @@ -80,6 +81,7 @@ describe('config validation', () => { "warn_threshold": 5000, }, "max_attempts": 3, + "max_workers": 10, "metrics_reset_interval": 30000, "monitored_aggregated_stats_refresh_rate": 60000, "monitored_stats_health_verbose_log": Object { @@ -135,6 +137,7 @@ describe('config validation', () => { "warn_threshold": 5000, }, "max_attempts": 3, + "max_workers": 10, "metrics_reset_interval": 30000, "monitored_aggregated_stats_refresh_rate": 60000, "monitored_stats_health_verbose_log": Object { diff --git a/x-pack/plugins/task_manager/server/config.ts b/x-pack/plugins/task_manager/server/config.ts index f0f4031a4c8ac..eec63c5be489c 100644 --- a/x-pack/plugins/task_manager/server/config.ts +++ b/x-pack/plugins/task_manager/server/config.ts @@ -8,9 +8,6 @@ import { schema, TypeOf } from '@kbn/config-schema'; export const MAX_WORKERS_LIMIT = 100; -export const DEFAULT_CAPACITY = 10; -export const MAX_CAPACITY = 50; -export const MIN_CAPACITY = 5; export const DEFAULT_MAX_WORKERS = 10; export const DEFAULT_POLL_INTERVAL = 3000; export const DEFAULT_VERSION_CONFLICT_THRESHOLD = 80; @@ -67,8 +64,6 @@ const requestTimeoutsConfig = schema.object({ export const configSchema = schema.object( { allow_reading_invalid_state: schema.boolean({ defaultValue: true }), - /* The number of normal cost tasks that this Kibana instance will run simultaneously */ - capacity: schema.maybe(schema.number({ min: MIN_CAPACITY, max: MAX_CAPACITY })), ephemeral_tasks: schema.object({ enabled: schema.boolean({ defaultValue: false }), /* How many requests can Task Manager buffer before it rejects new requests. */ @@ -86,12 +81,11 @@ export const configSchema = schema.object( min: 1, }), /* The maximum number of tasks that this Kibana instance will run simultaneously. */ - max_workers: schema.maybe( - schema.number({ - // disable the task manager rather than trying to specify it with 0 workers - min: 1, - }) - ), + max_workers: schema.number({ + defaultValue: DEFAULT_MAX_WORKERS, + // disable the task manager rather than trying to specify it with 0 workers + min: 1, + }), /* The interval at which monotonically increasing metrics counters will reset */ metrics_reset_interval: schema.number({ defaultValue: DEFAULT_METRICS_RESET_INTERVAL, diff --git a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts index 2a6f1bf8c33b8..19cfa2943502c 100644 --- a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts +++ b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.test.ts @@ -18,7 +18,7 @@ import { v4 as uuidv4 } from 'uuid'; import { asTaskPollingCycleEvent, asTaskRunEvent, TaskPersistence } from './task_events'; import { TaskRunResult } from './task_running'; import { TaskPoolRunResult } from './task_pool'; -import { TaskPoolMock } from './task_pool/task_pool.mock'; +import { TaskPoolMock } from './task_pool.mock'; import { executionContextServiceMock } from '@kbn/core/server/mocks'; import { taskManagerMock } from './mocks'; @@ -45,6 +45,7 @@ describe('EphemeralTaskLifecycle', () => { definitions: new TaskTypeDictionary(taskManagerLogger), executionContext, config: { + max_workers: 10, max_attempts: 9, poll_interval: 6000000, version_conflict_threshold: 80, @@ -155,7 +156,7 @@ describe('EphemeralTaskLifecycle', () => { expect(ephemeralTaskLifecycle.attemptToRun(task)).toMatchObject(asOk(task)); poolCapacity.mockReturnValue({ - availableCapacity: 10, + availableWorkers: 10, }); lifecycleEvent$.next( @@ -178,7 +179,7 @@ describe('EphemeralTaskLifecycle', () => { expect(ephemeralTaskLifecycle.attemptToRun(task)).toMatchObject(asOk(task)); poolCapacity.mockReturnValue({ - availableCapacity: 10, + availableWorkers: 10, }); lifecycleEvent$.next( @@ -215,7 +216,7 @@ describe('EphemeralTaskLifecycle', () => { expect(ephemeralTaskLifecycle.attemptToRun(tasks[2])).toMatchObject(asOk(tasks[2])); poolCapacity.mockReturnValue({ - availableCapacity: 2, + availableWorkers: 2, }); lifecycleEvent$.next( @@ -255,9 +256,9 @@ describe('EphemeralTaskLifecycle', () => { // pool has capacity for both poolCapacity.mockReturnValue({ - availableCapacity: 10, + availableWorkers: 10, }); - pool.getUsedCapacityByType.mockReturnValue(0); + pool.getOccupiedWorkersByType.mockReturnValue(0); lifecycleEvent$.next( asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed })) @@ -295,10 +296,10 @@ describe('EphemeralTaskLifecycle', () => { // pool has capacity in general poolCapacity.mockReturnValue({ - availableCapacity: 2, + availableWorkers: 2, }); // but when we ask how many it has occupied by type - wee always have one worker already occupied by that type - pool.getUsedCapacityByType.mockReturnValue(1); + pool.getOccupiedWorkersByType.mockReturnValue(1); lifecycleEvent$.next( asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed })) @@ -307,7 +308,7 @@ describe('EphemeralTaskLifecycle', () => { expect(pool.run).toHaveBeenCalledTimes(0); // now we release the worker in the pool and cause another cycle in the epheemral queue - pool.getUsedCapacityByType.mockReturnValue(0); + pool.getOccupiedWorkersByType.mockReturnValue(0); lifecycleEvent$.next( asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed })) ); @@ -355,9 +356,9 @@ describe('EphemeralTaskLifecycle', () => { // pool has capacity for all poolCapacity.mockReturnValue({ - availableCapacity: 10, + availableWorkers: 10, }); - pool.getUsedCapacityByType.mockReturnValue(0); + pool.getOccupiedWorkersByType.mockReturnValue(0); lifecycleEvent$.next(asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed }))); @@ -388,19 +389,19 @@ describe('EphemeralTaskLifecycle', () => { expect(ephemeralTaskLifecycle.queuedTasks).toBe(3); poolCapacity.mockReturnValue({ - availableCapacity: 1, + availableWorkers: 1, }); lifecycleEvent$.next(asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed }))); expect(ephemeralTaskLifecycle.queuedTasks).toBe(2); poolCapacity.mockReturnValue({ - availableCapacity: 1, + availableWorkers: 1, }); lifecycleEvent$.next(asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed }))); expect(ephemeralTaskLifecycle.queuedTasks).toBe(1); poolCapacity.mockReturnValue({ - availableCapacity: 1, + availableWorkers: 1, }); lifecycleEvent$.next(asTaskPollingCycleEvent(asOk({ result: FillPoolResult.NoTasksClaimed }))); expect(ephemeralTaskLifecycle.queuedTasks).toBe(0); diff --git a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.ts b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.ts index c7ee267b848e5..37cc166ece211 100644 --- a/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.ts +++ b/x-pack/plugins/task_manager/server/ephemeral_task_lifecycle.ts @@ -143,13 +143,13 @@ export class EphemeralTaskLifecycle { taskType && this.definitions.get(taskType)?.maxConcurrency ? Math.max( Math.min( - this.pool.availableCapacity(), + this.pool.availableWorkers, this.definitions.get(taskType)!.maxConcurrency! - - this.pool.getUsedCapacityByType(taskType) + this.pool.getOccupiedWorkersByType(taskType) ), 0 ) - : this.pool.availableCapacity(); + : this.pool.availableWorkers; private emitEvent = (event: TaskLifecycleEvent) => { this.events$.next(event); diff --git a/x-pack/plugins/task_manager/server/index.ts b/x-pack/plugins/task_manager/server/index.ts index 965df090911fd..8d50c37adda0b 100644 --- a/x-pack/plugins/task_manager/server/index.ts +++ b/x-pack/plugins/task_manager/server/index.ts @@ -55,6 +55,9 @@ export type { export const config: PluginConfigDescriptor = { schema: configSchema, + exposeToUsage: { + max_workers: true, + }, deprecations: ({ deprecate }) => { return [ deprecate('ephemeral_tasks.enabled', 'a future version', { @@ -65,10 +68,6 @@ export const config: PluginConfigDescriptor = { level: 'warning', message: `Configuring "xpack.task_manager.ephemeral_tasks.request_capacity" is deprecated and will be removed in a future version. Remove this setting to increase task execution resiliency.`, }), - deprecate('max_workers', 'a future version', { - level: 'warning', - message: `Configuring "xpack.task_manager.max_workers" is deprecated and will be removed in a future version. Remove this setting and use "xpack.task_manager.capacity" instead.`, - }), (settings, fromPath, addDeprecation) => { const taskManager = get(settings, fromPath); if (taskManager?.index) { diff --git a/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap b/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap deleted file mode 100644 index e59912ed91905..0000000000000 --- a/x-pack/plugins/task_manager/server/integration_tests/__snapshots__/task_cost_check.test.ts.snap +++ /dev/null @@ -1,10 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Task cost checks detects tasks with cost definitions 1`] = ` -Array [ - Object { - "cost": 10, - "taskType": "alerting:siem.indicatorRule", - }, -] -`; diff --git a/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts b/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts index cc16b8d0544cf..c0939b5b31667 100644 --- a/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts +++ b/x-pack/plugins/task_manager/server/integration_tests/managed_configuration.test.ts @@ -35,362 +35,164 @@ describe('managed configuration', () => { }, }; - afterEach(() => clock.restore()); - - describe('managed poll interval', () => { - beforeEach(async () => { - jest.resetAllMocks(); - clock = sinon.useFakeTimers(); - - const context = coreMock.createPluginInitializerContext({ - capacity: 10, - max_attempts: 9, - poll_interval: 3000, - allow_reading_invalid_state: false, - version_conflict_threshold: 80, - monitored_aggregated_stats_refresh_rate: 60000, - monitored_stats_health_verbose_log: { - enabled: false, - level: 'debug' as const, - warn_delayed_task_start_in_seconds: 60, - }, - monitored_stats_required_freshness: 4000, - monitored_stats_running_average_window: 50, - request_capacity: 1000, - monitored_task_execution_thresholds: { - default: { - error_threshold: 90, - warn_threshold: 80, - }, - custom: {}, - }, - ephemeral_tasks: { - enabled: true, - request_capacity: 10, - }, - unsafe: { - exclude_task_types: [], - authenticate_background_task_utilization: true, - }, - event_loop_delay: { - monitor: true, - warn_threshold: 5000, - }, - worker_utilization_running_average_window: 5, - metrics_reset_interval: 3000, - claim_strategy: 'default', - request_timeouts: { - update_by_query: 1000, - }, - }); - logger = context.logger.get('taskManager'); - - const taskManager = new TaskManagerPlugin(context); - ( - await taskManager.setup(coreMock.createSetup(), { usageCollection: undefined }) - ).registerTaskDefinitions({ - foo: { - title: 'Foo', - createTaskRunner: jest.fn(), - }, - }); - - const coreStart = coreMock.createStart(); - coreStart.elasticsearch = esStart; - esStart.client.asInternalUser.child.mockReturnValue( - esStart.client.asInternalUser as unknown as Client - ); - coreStart.savedObjects.createInternalRepository.mockReturnValue(savedObjectsClient); - taskManagerStart = await taskManager.start(coreStart, {}); - - // force rxjs timers to fire when they are scheduled for setTimeout(0) as the - // sinon fake timers cause them to stall - clock.tick(0); + beforeEach(async () => { + jest.resetAllMocks(); + clock = sinon.useFakeTimers(); + + const context = coreMock.createPluginInitializerContext({ + max_workers: 10, + max_attempts: 9, + poll_interval: 3000, + allow_reading_invalid_state: false, + version_conflict_threshold: 80, + monitored_aggregated_stats_refresh_rate: 60000, + monitored_stats_health_verbose_log: { + enabled: false, + level: 'debug' as const, + warn_delayed_task_start_in_seconds: 60, + }, + monitored_stats_required_freshness: 4000, + monitored_stats_running_average_window: 50, + request_capacity: 1000, + monitored_task_execution_thresholds: { + default: { + error_threshold: 90, + warn_threshold: 80, + }, + custom: {}, + }, + ephemeral_tasks: { + enabled: true, + request_capacity: 10, + }, + unsafe: { + exclude_task_types: [], + authenticate_background_task_utilization: true, + }, + event_loop_delay: { + monitor: true, + warn_threshold: 5000, + }, + worker_utilization_running_average_window: 5, + metrics_reset_interval: 3000, + claim_strategy: 'default', + request_timeouts: { + update_by_query: 1000, + }, }); - - test('should increase poll interval when Elasticsearch returns 429 error', async () => { - savedObjectsClient.create.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b') - ); - - // Cause "too many requests" error to be thrown - await expect( - taskManagerStart.schedule({ - taskType: 'foo', - state: {}, - params: {}, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(`"Too Many Requests"`); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - - expect(logger.warn).toHaveBeenCalledWith( - 'Poll interval configuration is temporarily increased after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Poll interval configuration changing from 3000 to 3600 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith('Task poller now using interval of 3600ms'); + logger = context.logger.get('taskManager'); + + const taskManager = new TaskManagerPlugin(context); + ( + await taskManager.setup(coreMock.createSetup(), { usageCollection: undefined }) + ).registerTaskDefinitions({ + foo: { + title: 'Foo', + createTaskRunner: jest.fn(), + }, }); - test('should increase poll interval when Elasticsearch returns "cannot execute [inline] scripts" error', async () => { - const childEsClient = esStart.client.asInternalUser.child({}) as jest.Mocked; - childEsClient.search.mockImplementationOnce(async () => { - throw inlineScriptError; - }); - - await expect(taskManagerStart.fetch({})).rejects.toThrowErrorMatchingInlineSnapshot( - `"cannot execute [inline] scripts\\" error"` - ); - - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - - expect(logger.warn).toHaveBeenCalledWith( - 'Poll interval configuration is temporarily increased after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Poll interval configuration changing from 3000 to 3600 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith('Task poller now using interval of 3600ms'); - }); + const coreStart = coreMock.createStart(); + coreStart.elasticsearch = esStart; + esStart.client.asInternalUser.child.mockReturnValue( + esStart.client.asInternalUser as unknown as Client + ); + coreStart.savedObjects.createInternalRepository.mockReturnValue(savedObjectsClient); + taskManagerStart = await taskManager.start(coreStart); + + // force rxjs timers to fire when they are scheduled for setTimeout(0) as the + // sinon fake timers cause them to stall + clock.tick(0); }); - describe('managed capacity with default claim strategy', () => { - beforeEach(async () => { - jest.resetAllMocks(); - clock = sinon.useFakeTimers(); - - const context = coreMock.createPluginInitializerContext({ - capacity: 10, - max_attempts: 9, - poll_interval: 3000, - allow_reading_invalid_state: false, - version_conflict_threshold: 80, - monitored_aggregated_stats_refresh_rate: 60000, - monitored_stats_health_verbose_log: { - enabled: false, - level: 'debug' as const, - warn_delayed_task_start_in_seconds: 60, - }, - monitored_stats_required_freshness: 4000, - monitored_stats_running_average_window: 50, - request_capacity: 1000, - monitored_task_execution_thresholds: { - default: { - error_threshold: 90, - warn_threshold: 80, - }, - custom: {}, - }, - ephemeral_tasks: { - enabled: true, - request_capacity: 10, - }, - unsafe: { - exclude_task_types: [], - authenticate_background_task_utilization: true, - }, - event_loop_delay: { - monitor: true, - warn_threshold: 5000, - }, - worker_utilization_running_average_window: 5, - metrics_reset_interval: 3000, - claim_strategy: 'default', - request_timeouts: { - update_by_query: 1000, - }, - }); - logger = context.logger.get('taskManager'); - - const taskManager = new TaskManagerPlugin(context); - ( - await taskManager.setup(coreMock.createSetup(), { usageCollection: undefined }) - ).registerTaskDefinitions({ - foo: { - title: 'Foo', - createTaskRunner: jest.fn(), - }, - }); - - const coreStart = coreMock.createStart(); - coreStart.elasticsearch = esStart; - esStart.client.asInternalUser.child.mockReturnValue( - esStart.client.asInternalUser as unknown as Client - ); - coreStart.savedObjects.createInternalRepository.mockReturnValue(savedObjectsClient); - taskManagerStart = await taskManager.start(coreStart, {}); - - // force rxjs timers to fire when they are scheduled for setTimeout(0) as the - // sinon fake timers cause them to stall - clock.tick(0); - }); - - test('should lower capacity when Elasticsearch returns 429 error', async () => { - savedObjectsClient.create.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b') - ); - - // Cause "too many requests" error to be thrown - await expect( - taskManagerStart.schedule({ - taskType: 'foo', - state: {}, - params: {}, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(`"Too Many Requests"`); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Capacity configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Task pool now using 10 as the max worker value which is based on a capacity of 10' - ); - }); - - test('should lower capacity when Elasticsearch returns "cannot execute [inline] scripts" error', async () => { - const childEsClient = esStart.client.asInternalUser.child({}) as jest.Mocked; - childEsClient.search.mockImplementationOnce(async () => { - throw inlineScriptError; - }); - - await expect(taskManagerStart.fetch({})).rejects.toThrowErrorMatchingInlineSnapshot( - `"cannot execute [inline] scripts\\" error"` - ); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); + afterEach(() => clock.restore()); - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Capacity configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Task pool now using 10 as the max worker value which is based on a capacity of 10' - ); - }); + test('should lower max workers when Elasticsearch returns 429 error', async () => { + savedObjectsClient.create.mockRejectedValueOnce( + SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b') + ); + + // Cause "too many requests" error to be thrown + await expect( + taskManagerStart.schedule({ + taskType: 'foo', + state: {}, + params: {}, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"Too Many Requests"`); + clock.tick(ADJUST_THROUGHPUT_INTERVAL); + + expect(logger.warn).toHaveBeenCalledWith( + 'Max workers configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' + ); + expect(logger.debug).toHaveBeenCalledWith( + 'Max workers configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' + ); + expect(logger.debug).toHaveBeenCalledWith('Task pool now using 10 as the max worker value'); }); - describe('managed capacity with mget claim strategy', () => { - beforeEach(async () => { - jest.resetAllMocks(); - clock = sinon.useFakeTimers(); - - const context = coreMock.createPluginInitializerContext({ - capacity: 10, - max_attempts: 9, - poll_interval: 3000, - allow_reading_invalid_state: false, - version_conflict_threshold: 80, - monitored_aggregated_stats_refresh_rate: 60000, - monitored_stats_health_verbose_log: { - enabled: false, - level: 'debug' as const, - warn_delayed_task_start_in_seconds: 60, - }, - monitored_stats_required_freshness: 4000, - monitored_stats_running_average_window: 50, - request_capacity: 1000, - monitored_task_execution_thresholds: { - default: { - error_threshold: 90, - warn_threshold: 80, - }, - custom: {}, - }, - ephemeral_tasks: { - enabled: true, - request_capacity: 10, - }, - unsafe: { - exclude_task_types: [], - authenticate_background_task_utilization: true, - }, - event_loop_delay: { - monitor: true, - warn_threshold: 5000, - }, - worker_utilization_running_average_window: 5, - metrics_reset_interval: 3000, - claim_strategy: 'unsafe_mget', - request_timeouts: { - update_by_query: 1000, - }, - }); - logger = context.logger.get('taskManager'); - - const taskManager = new TaskManagerPlugin(context); - ( - await taskManager.setup(coreMock.createSetup(), { usageCollection: undefined }) - ).registerTaskDefinitions({ - foo: { - title: 'Foo', - createTaskRunner: jest.fn(), - }, - }); - - const coreStart = coreMock.createStart(); - coreStart.elasticsearch = esStart; - esStart.client.asInternalUser.child.mockReturnValue( - esStart.client.asInternalUser as unknown as Client - ); - coreStart.savedObjects.createInternalRepository.mockReturnValue(savedObjectsClient); - taskManagerStart = await taskManager.start(coreStart, {}); + test('should increase poll interval when Elasticsearch returns 429 error', async () => { + savedObjectsClient.create.mockRejectedValueOnce( + SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b') + ); + + // Cause "too many requests" error to be thrown + await expect( + taskManagerStart.schedule({ + taskType: 'foo', + state: {}, + params: {}, + }) + ).rejects.toThrowErrorMatchingInlineSnapshot(`"Too Many Requests"`); + clock.tick(ADJUST_THROUGHPUT_INTERVAL); + + expect(logger.warn).toHaveBeenCalledWith( + 'Poll interval configuration is temporarily increased after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' + ); + expect(logger.debug).toHaveBeenCalledWith( + 'Poll interval configuration changing from 3000 to 3600 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' + ); + expect(logger.debug).toHaveBeenCalledWith('Task poller now using interval of 3600ms'); + }); - // force rxjs timers to fire when they are scheduled for setTimeout(0) as the - // sinon fake timers cause them to stall - clock.tick(0); + test('should lower max workers when Elasticsearch returns "cannot execute [inline] scripts" error', async () => { + const childEsClient = esStart.client.asInternalUser.child({}) as jest.Mocked; + childEsClient.search.mockImplementationOnce(async () => { + throw inlineScriptError; }); - test('should lower capacity when Elasticsearch returns 429 error', async () => { - savedObjectsClient.create.mockRejectedValueOnce( - SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b') - ); - - // Cause "too many requests" error to be thrown - await expect( - taskManagerStart.schedule({ - taskType: 'foo', - state: {}, - params: {}, - }) - ).rejects.toThrowErrorMatchingInlineSnapshot(`"Too Many Requests"`); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); + await expect(taskManagerStart.fetch({})).rejects.toThrowErrorMatchingInlineSnapshot( + `"cannot execute [inline] scripts\\" error"` + ); + clock.tick(ADJUST_THROUGHPUT_INTERVAL); + + expect(logger.warn).toHaveBeenCalledWith( + 'Max workers configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' + ); + expect(logger.debug).toHaveBeenCalledWith( + 'Max workers configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' + ); + expect(logger.debug).toHaveBeenCalledWith('Task pool now using 10 as the max worker value'); + }); - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Capacity configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Task pool now using 20 as the max allowed cost which is based on a capacity of 10' - ); + test('should increase poll interval when Elasticsearch returns "cannot execute [inline] scripts" error', async () => { + const childEsClient = esStart.client.asInternalUser.child({}) as jest.Mocked; + childEsClient.search.mockImplementationOnce(async () => { + throw inlineScriptError; }); - test('should lower capacity when Elasticsearch returns "cannot execute [inline] scripts" error', async () => { - const childEsClient = esStart.client.asInternalUser.child({}) as jest.Mocked; - childEsClient.search.mockImplementationOnce(async () => { - throw inlineScriptError; - }); + await expect(taskManagerStart.fetch({})).rejects.toThrowErrorMatchingInlineSnapshot( + `"cannot execute [inline] scripts\\" error"` + ); - await expect(taskManagerStart.fetch({})).rejects.toThrowErrorMatchingInlineSnapshot( - `"cannot execute [inline] scripts\\" error"` - ); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); + clock.tick(ADJUST_THROUGHPUT_INTERVAL); - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Capacity configuration changing from 10 to 8 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' - ); - expect(logger.debug).toHaveBeenCalledWith( - 'Task pool now using 20 as the max allowed cost which is based on a capacity of 10' - ); - }); + expect(logger.warn).toHaveBeenCalledWith( + 'Poll interval configuration is temporarily increased after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' + ); + expect(logger.debug).toHaveBeenCalledWith( + 'Poll interval configuration changing from 3000 to 3600 after seeing 1 "too many request" and/or "execute [inline] script" error(s)' + ); + expect(logger.debug).toHaveBeenCalledWith('Task poller now using interval of 3600ms'); }); }); diff --git a/x-pack/plugins/task_manager/server/integration_tests/task_cost_check.test.ts b/x-pack/plugins/task_manager/server/integration_tests/task_cost_check.test.ts deleted file mode 100644 index 96678f714ac69..0000000000000 --- a/x-pack/plugins/task_manager/server/integration_tests/task_cost_check.test.ts +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { - type TestElasticsearchUtils, - type TestKibanaUtils, -} from '@kbn/core-test-helpers-kbn-server'; -import { TaskCost, TaskDefinition } from '../task'; -import { setupTestServers } from './lib'; -import { TaskTypeDictionary } from '../task_type_dictionary'; - -jest.mock('../task_type_dictionary', () => { - const actual = jest.requireActual('../task_type_dictionary'); - return { - ...actual, - TaskTypeDictionary: jest.fn().mockImplementation((opts) => { - return new actual.TaskTypeDictionary(opts); - }), - }; -}); - -// Notify response-ops if a task sets a cost to something other than `Normal` -describe('Task cost checks', () => { - let esServer: TestElasticsearchUtils; - let kibanaServer: TestKibanaUtils; - let taskTypeDictionary: TaskTypeDictionary; - - beforeAll(async () => { - const setupResult = await setupTestServers(); - esServer = setupResult.esServer; - kibanaServer = setupResult.kibanaServer; - - const mockedTaskTypeDictionary = jest.requireMock('../task_type_dictionary'); - expect(mockedTaskTypeDictionary.TaskTypeDictionary).toHaveBeenCalledTimes(1); - taskTypeDictionary = mockedTaskTypeDictionary.TaskTypeDictionary.mock.results[0].value; - }); - - afterAll(async () => { - if (kibanaServer) { - await kibanaServer.stop(); - } - if (esServer) { - await esServer.stop(); - } - }); - - it('detects tasks with cost definitions', async () => { - const taskTypes = taskTypeDictionary.getAllDefinitions(); - const taskTypesWithCost = taskTypes - .map((taskType: TaskDefinition) => - !!taskType.cost ? { taskType: taskType.type, cost: taskType.cost } : null - ) - .filter( - (tt: { taskType: string; cost: TaskCost } | null) => - null != tt && tt.cost !== TaskCost.Normal - ); - expect(taskTypesWithCost).toMatchSnapshot(); - }); -}); diff --git a/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts b/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts index 49c68459982ba..fc2f34701e3c1 100644 --- a/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts +++ b/x-pack/plugins/task_manager/server/lib/calculate_health_status.test.ts @@ -16,6 +16,7 @@ Date.now = jest.fn().mockReturnValue(new Date(now)); const logger = loggingSystemMock.create().get(); const config = { enabled: true, + max_workers: 10, index: 'foo', max_attempts: 9, poll_interval: 3000, @@ -72,8 +73,6 @@ const getStatsWithTimestamp = ({ configuration: { timestamp, value: { - capacity: { config: 10, as_cost: 20, as_workers: 10 }, - claim_strategy: 'default', request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, monitored_stats_running_average_window: 50, @@ -85,6 +84,7 @@ const getStatsWithTimestamp = ({ }, }, poll_interval: 3000, + max_workers: 10, }, status: HealthStatus.OK, }, @@ -213,29 +213,24 @@ const getStatsWithTimestamp = ({ timestamp, value: { count: 2, - cost: 4, task_types: { taskType1: { count: 1, - cost: 2, status: { idle: 1, }, }, taskType2: { count: 1, - cost: 2, status: { idle: 1, }, }, }, non_recurring: 2, - non_recurring_cost: 4, owner_ids: 0, schedule: [['5m', 2]], overdue: 0, - overdue_cost: 0, overdue_non_recurring: 0, estimated_schedule_density: [ 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, diff --git a/x-pack/plugins/task_manager/server/lib/create_managed_configuration.test.ts b/x-pack/plugins/task_manager/server/lib/create_managed_configuration.test.ts index a93da63ae693a..b1d6ce92c323a 100644 --- a/x-pack/plugins/task_manager/server/lib/create_managed_configuration.test.ts +++ b/x-pack/plugins/task_manager/server/lib/create_managed_configuration.test.ts @@ -13,7 +13,6 @@ import { ADJUST_THROUGHPUT_INTERVAL, } from './create_managed_configuration'; import { mockLogger } from '../test_utils'; -import { CLAIM_STRATEGY_DEFAULT, CLAIM_STRATEGY_MGET, TaskManagerConfig } from '../config'; describe('createManagedConfiguration()', () => { let clock: sinon.SinonFakeTimers; @@ -27,141 +26,51 @@ describe('createManagedConfiguration()', () => { afterEach(() => clock.restore()); test('returns observables with initialized values', async () => { - const capacitySubscription = jest.fn(); + const maxWorkersSubscription = jest.fn(); const pollIntervalSubscription = jest.fn(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ + const { maxWorkersConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ logger, errors$: new Subject(), - config: { - capacity: 20, - poll_interval: 2, - } as TaskManagerConfig, + startingMaxWorkers: 1, + startingPollInterval: 2, }); - capacityConfiguration$.subscribe(capacitySubscription); + maxWorkersConfiguration$.subscribe(maxWorkersSubscription); pollIntervalConfiguration$.subscribe(pollIntervalSubscription); - expect(capacitySubscription).toHaveBeenCalledTimes(1); - expect(capacitySubscription).toHaveBeenNthCalledWith(1, 20); + expect(maxWorkersSubscription).toHaveBeenCalledTimes(1); + expect(maxWorkersSubscription).toHaveBeenNthCalledWith(1, 1); expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); expect(pollIntervalSubscription).toHaveBeenNthCalledWith(1, 2); }); - test('uses max_workers config as capacity if only max workers is defined', async () => { - const capacitySubscription = jest.fn(); - const pollIntervalSubscription = jest.fn(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ - logger, - errors$: new Subject(), - config: { - max_workers: 10, - poll_interval: 2, - } as TaskManagerConfig, - }); - capacityConfiguration$.subscribe(capacitySubscription); - pollIntervalConfiguration$.subscribe(pollIntervalSubscription); - expect(capacitySubscription).toHaveBeenCalledTimes(1); - expect(capacitySubscription).toHaveBeenNthCalledWith(1, 10); - expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); - expect(pollIntervalSubscription).toHaveBeenNthCalledWith(1, 2); - }); - - test('uses max_workers config as capacity but does not exceed MAX_CAPACITY', async () => { - const capacitySubscription = jest.fn(); - const pollIntervalSubscription = jest.fn(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ - logger, - errors$: new Subject(), - config: { - max_workers: 1000, - poll_interval: 2, - } as TaskManagerConfig, - }); - capacityConfiguration$.subscribe(capacitySubscription); - pollIntervalConfiguration$.subscribe(pollIntervalSubscription); - expect(capacitySubscription).toHaveBeenCalledTimes(1); - expect(capacitySubscription).toHaveBeenNthCalledWith(1, 50); - expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); - expect(pollIntervalSubscription).toHaveBeenNthCalledWith(1, 2); - }); - - test('uses provided defaultCapacity if neither capacity nor max_workers is defined', async () => { - const capacitySubscription = jest.fn(); - const pollIntervalSubscription = jest.fn(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ - defaultCapacity: 500, - logger, - errors$: new Subject(), - config: { - poll_interval: 2, - } as TaskManagerConfig, - }); - capacityConfiguration$.subscribe(capacitySubscription); - pollIntervalConfiguration$.subscribe(pollIntervalSubscription); - expect(capacitySubscription).toHaveBeenCalledTimes(1); - expect(capacitySubscription).toHaveBeenNthCalledWith(1, 500); - expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); - expect(pollIntervalSubscription).toHaveBeenNthCalledWith(1, 2); - }); - - test('logs warning and uses capacity config if both capacity and max_workers is defined', async () => { - const capacitySubscription = jest.fn(); - const pollIntervalSubscription = jest.fn(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ - logger, - errors$: new Subject(), - config: { - capacity: 30, - max_workers: 10, - poll_interval: 2, - } as TaskManagerConfig, - }); - capacityConfiguration$.subscribe(capacitySubscription); - pollIntervalConfiguration$.subscribe(pollIntervalSubscription); - expect(capacitySubscription).toHaveBeenCalledTimes(1); - expect(capacitySubscription).toHaveBeenNthCalledWith(1, 30); - expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); - expect(pollIntervalSubscription).toHaveBeenNthCalledWith(1, 2); - expect(logger.warn).toHaveBeenCalledWith( - `Both \"xpack.task_manager.capacity\" and \"xpack.task_manager.max_workers\" configs are set, max_workers will be ignored in favor of capacity and the setting should be removed.` - ); - }); - test(`skips errors that aren't about too many requests`, async () => { - const capacitySubscription = jest.fn(); + const maxWorkersSubscription = jest.fn(); const pollIntervalSubscription = jest.fn(); const errors$ = new Subject(); - const { capacityConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ + const { maxWorkersConfiguration$, pollIntervalConfiguration$ } = createManagedConfiguration({ errors$, logger, - config: { - capacity: 10, - poll_interval: 100, - } as TaskManagerConfig, + startingMaxWorkers: 100, + startingPollInterval: 100, }); - capacityConfiguration$.subscribe(capacitySubscription); + maxWorkersConfiguration$.subscribe(maxWorkersSubscription); pollIntervalConfiguration$.subscribe(pollIntervalSubscription); errors$.next(new Error('foo')); clock.tick(ADJUST_THROUGHPUT_INTERVAL); - expect(capacitySubscription).toHaveBeenCalledTimes(1); + expect(maxWorkersSubscription).toHaveBeenCalledTimes(1); expect(pollIntervalSubscription).toHaveBeenCalledTimes(1); }); - describe('capacity configuration', () => { - function setupScenario( - startingCapacity: number, - claimStrategy: string = CLAIM_STRATEGY_DEFAULT - ) { + describe('maxWorker configuration', () => { + function setupScenario(startingMaxWorkers: number) { const errors$ = new Subject(); const subscription = jest.fn(); - const { capacityConfiguration$ } = createManagedConfiguration({ + const { maxWorkersConfiguration$ } = createManagedConfiguration({ errors$, + startingMaxWorkers, logger, - config: { - capacity: startingCapacity, - poll_interval: 1, - claim_strategy: claimStrategy, - } as TaskManagerConfig, + startingPollInterval: 1, }); - capacityConfiguration$.subscribe(subscription); + maxWorkersConfiguration$.subscribe(subscription); return { subscription, errors$ }; } @@ -172,103 +81,66 @@ describe('createManagedConfiguration()', () => { afterEach(() => clock.restore()); - describe('default claim strategy', () => { - test('should decrease configuration at the next interval when an error is emitted', async () => { - const { subscription, errors$ } = setupScenario(10); - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL - 1); - expect(subscription).toHaveBeenCalledTimes(1); - expect(subscription).toHaveBeenNthCalledWith(1, 10); - clock.tick(1); - expect(subscription).toHaveBeenCalledTimes(2); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - }); - - test('should log a warning when the configuration changes from the starting value', async () => { - const { errors$ } = setupScenario(10); - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - }); - - test('should increase configuration back to normal incrementally after an error is emitted', async () => { - const { subscription, errors$ } = setupScenario(10); - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL * 10); - expect(subscription).toHaveBeenNthCalledWith(1, 10); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - expect(subscription).toHaveBeenNthCalledWith(3, 9); - expect(subscription).toHaveBeenNthCalledWith(4, 10); - // No new calls due to value not changing and usage of distinctUntilChanged() - expect(subscription).toHaveBeenCalledTimes(4); - }); + test('should decrease configuration at the next interval when an error is emitted', async () => { + const { subscription, errors$ } = setupScenario(100); + errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); + clock.tick(ADJUST_THROUGHPUT_INTERVAL - 1); + expect(subscription).toHaveBeenCalledTimes(1); + clock.tick(1); + expect(subscription).toHaveBeenCalledTimes(2); + expect(subscription).toHaveBeenNthCalledWith(2, 80); + }); - test('should keep reducing configuration when errors keep emitting until it reaches minimum', async () => { - const { subscription, errors$ } = setupScenario(10); - for (let i = 0; i < 20; i++) { - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - } - expect(subscription).toHaveBeenNthCalledWith(1, 10); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - expect(subscription).toHaveBeenNthCalledWith(3, 6); - expect(subscription).toHaveBeenNthCalledWith(4, 4); - expect(subscription).toHaveBeenNthCalledWith(5, 3); - expect(subscription).toHaveBeenNthCalledWith(6, 2); - expect(subscription).toHaveBeenNthCalledWith(7, 1); - // No new calls due to value not changing and usage of distinctUntilChanged() - expect(subscription).toHaveBeenCalledTimes(7); - }); + test('should log a warning when the configuration changes from the starting value', async () => { + const { errors$ } = setupScenario(100); + errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); + clock.tick(ADJUST_THROUGHPUT_INTERVAL); + expect(logger.warn).toHaveBeenCalledWith( + 'Max workers configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' + ); }); - describe('mget claim strategy', () => { - test('should decrease configuration at the next interval when an error is emitted', async () => { - const { subscription, errors$ } = setupScenario(10, CLAIM_STRATEGY_MGET); - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL - 1); - expect(subscription).toHaveBeenCalledTimes(1); - expect(subscription).toHaveBeenNthCalledWith(1, 10); - clock.tick(1); - expect(subscription).toHaveBeenCalledTimes(2); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - }); + test('should increase configuration back to normal incrementally after an error is emitted', async () => { + const { subscription, errors$ } = setupScenario(100); + errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); + clock.tick(ADJUST_THROUGHPUT_INTERVAL * 10); + expect(subscription).toHaveBeenNthCalledWith(2, 80); + expect(subscription).toHaveBeenNthCalledWith(3, 84); + // 88.2- > 89 from Math.ceil + expect(subscription).toHaveBeenNthCalledWith(4, 89); + expect(subscription).toHaveBeenNthCalledWith(5, 94); + expect(subscription).toHaveBeenNthCalledWith(6, 99); + // 103.95 -> 100 from Math.min with starting value + expect(subscription).toHaveBeenNthCalledWith(7, 100); + // No new calls due to value not changing and usage of distinctUntilChanged() + expect(subscription).toHaveBeenCalledTimes(7); + }); - test('should log a warning when the configuration changes from the starting value', async () => { - const { errors$ } = setupScenario(10, CLAIM_STRATEGY_MGET); + test('should keep reducing configuration when errors keep emitting', async () => { + const { subscription, errors$ } = setupScenario(100); + for (let i = 0; i < 20; i++) { errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); clock.tick(ADJUST_THROUGHPUT_INTERVAL); - expect(logger.warn).toHaveBeenCalledWith( - 'Capacity configuration is temporarily reduced after Elasticsearch returned 1 "too many request" and/or "execute [inline] script" error(s).' - ); - }); - - test('should increase configuration back to normal incrementally after an error is emitted', async () => { - const { subscription, errors$ } = setupScenario(10, CLAIM_STRATEGY_MGET); - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL * 10); - expect(subscription).toHaveBeenNthCalledWith(1, 10); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - expect(subscription).toHaveBeenNthCalledWith(3, 9); - expect(subscription).toHaveBeenNthCalledWith(4, 10); - // No new calls due to value not changing and usage of distinctUntilChanged() - expect(subscription).toHaveBeenCalledTimes(4); - }); - - test('should keep reducing configuration when errors keep emitting until it reaches minimum', async () => { - const { subscription, errors$ } = setupScenario(10, CLAIM_STRATEGY_MGET); - for (let i = 0; i < 20; i++) { - errors$.next(SavedObjectsErrorHelpers.createTooManyRequestsError('a', 'b')); - clock.tick(ADJUST_THROUGHPUT_INTERVAL); - } - expect(subscription).toHaveBeenNthCalledWith(1, 10); - expect(subscription).toHaveBeenNthCalledWith(2, 8); - expect(subscription).toHaveBeenNthCalledWith(3, 6); - expect(subscription).toHaveBeenNthCalledWith(4, 5); - // No new calls due to value not changing and usage of distinctUntilChanged() - expect(subscription).toHaveBeenCalledTimes(4); - }); + } + expect(subscription).toHaveBeenNthCalledWith(2, 80); + expect(subscription).toHaveBeenNthCalledWith(3, 64); + // 51.2 -> 51 from Math.floor + expect(subscription).toHaveBeenNthCalledWith(4, 51); + expect(subscription).toHaveBeenNthCalledWith(5, 40); + expect(subscription).toHaveBeenNthCalledWith(6, 32); + expect(subscription).toHaveBeenNthCalledWith(7, 25); + expect(subscription).toHaveBeenNthCalledWith(8, 20); + expect(subscription).toHaveBeenNthCalledWith(9, 16); + expect(subscription).toHaveBeenNthCalledWith(10, 12); + expect(subscription).toHaveBeenNthCalledWith(11, 9); + expect(subscription).toHaveBeenNthCalledWith(12, 7); + expect(subscription).toHaveBeenNthCalledWith(13, 5); + expect(subscription).toHaveBeenNthCalledWith(14, 4); + expect(subscription).toHaveBeenNthCalledWith(15, 3); + expect(subscription).toHaveBeenNthCalledWith(16, 2); + expect(subscription).toHaveBeenNthCalledWith(17, 1); + // No new calls due to value not changing and usage of distinctUntilChanged() + expect(subscription).toHaveBeenCalledTimes(17); }); }); @@ -279,10 +151,8 @@ describe('createManagedConfiguration()', () => { const { pollIntervalConfiguration$ } = createManagedConfiguration({ logger, errors$, - config: { - poll_interval: startingPollInterval, - capacity: 20, - } as TaskManagerConfig, + startingPollInterval, + startingMaxWorkers: 1, }); pollIntervalConfiguration$.subscribe(subscription); return { subscription, errors$ }; diff --git a/x-pack/plugins/task_manager/server/lib/create_managed_configuration.ts b/x-pack/plugins/task_manager/server/lib/create_managed_configuration.ts index 3036eb2008de6..5c7b1a16a4308 100644 --- a/x-pack/plugins/task_manager/server/lib/create_managed_configuration.ts +++ b/x-pack/plugins/task_manager/server/lib/create_managed_configuration.ts @@ -10,26 +10,17 @@ import { filter, mergeScan, map, scan, distinctUntilChanged, startWith } from 'r import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { Logger } from '@kbn/core/server'; import { isEsCannotExecuteScriptError } from './identify_es_error'; -import { CLAIM_STRATEGY_MGET, DEFAULT_CAPACITY, MAX_CAPACITY, TaskManagerConfig } from '../config'; -import { TaskCost } from '../task'; const FLUSH_MARKER = Symbol('flush'); export const ADJUST_THROUGHPUT_INTERVAL = 10 * 1000; export const PREFERRED_MAX_POLL_INTERVAL = 60 * 1000; - -// Capacity is measured in number of normal cost tasks that can be run -// At a minimum, we need to be able to run a single task with the greatest cost -// so we should convert the greatest cost to normal cost -export const MIN_COST = TaskCost.ExtraLarge / TaskCost.Normal; - -// For default claim strategy export const MIN_WORKERS = 1; -// When errors occur, reduce capacity by CAPACITY_DECREASE_PERCENTAGE -// When errors no longer occur, start increasing capacity by CAPACITY_INCREASE_PERCENTAGE +// When errors occur, reduce maxWorkers by MAX_WORKERS_DECREASE_PERCENTAGE +// When errors no longer occur, start increasing maxWorkers by MAX_WORKERS_INCREASE_PERCENTAGE // until starting value is reached -const CAPACITY_DECREASE_PERCENTAGE = 0.8; -const CAPACITY_INCREASE_PERCENTAGE = 1.05; +const MAX_WORKERS_DECREASE_PERCENTAGE = 0.8; +const MAX_WORKERS_INCREASE_PERCENTAGE = 1.05; // When errors occur, increase pollInterval by POLL_INTERVAL_INCREASE_PERCENTAGE // When errors no longer occur, start decreasing pollInterval by POLL_INTERVAL_DECREASE_PERCENTAGE @@ -38,32 +29,28 @@ const POLL_INTERVAL_DECREASE_PERCENTAGE = 0.95; const POLL_INTERVAL_INCREASE_PERCENTAGE = 1.2; interface ManagedConfigurationOpts { - config: TaskManagerConfig; - defaultCapacity?: number; - errors$: Observable; logger: Logger; + startingMaxWorkers: number; + startingPollInterval: number; + errors$: Observable; } export interface ManagedConfiguration { - startingCapacity: number; - capacityConfiguration$: Observable; + maxWorkersConfiguration$: Observable; pollIntervalConfiguration$: Observable; } export function createManagedConfiguration({ - config, - defaultCapacity = DEFAULT_CAPACITY, logger, + startingMaxWorkers, + startingPollInterval, errors$, }: ManagedConfigurationOpts): ManagedConfiguration { const errorCheck$ = countErrors(errors$, ADJUST_THROUGHPUT_INTERVAL); - const startingCapacity = calculateStartingCapacity(config, logger, defaultCapacity); - const startingPollInterval = config.poll_interval; return { - startingCapacity, - capacityConfiguration$: errorCheck$.pipe( - createCapacityScan(config, logger, startingCapacity), - startWith(startingCapacity), + maxWorkersConfiguration$: errorCheck$.pipe( + createMaxWorkersScan(logger, startingMaxWorkers), + startWith(startingMaxWorkers), distinctUntilChanged() ), pollIntervalConfiguration$: errorCheck$.pipe( @@ -74,39 +61,37 @@ export function createManagedConfiguration({ }; } -function createCapacityScan(config: TaskManagerConfig, logger: Logger, startingCapacity: number) { - return scan((previousCapacity: number, errorCount: number) => { - let newCapacity: number; +function createMaxWorkersScan(logger: Logger, startingMaxWorkers: number) { + return scan((previousMaxWorkers: number, errorCount: number) => { + let newMaxWorkers: number; if (errorCount > 0) { - const minCapacity = getMinCapacity(config); - // Decrease capacity by CAPACITY_DECREASE_PERCENTAGE while making sure it doesn't go lower than minCapacity. + // Decrease max workers by MAX_WORKERS_DECREASE_PERCENTAGE while making sure it doesn't go lower than 1. // Using Math.floor to make sure the number is different than previous while not being a decimal value. - newCapacity = Math.max( - Math.floor(previousCapacity * CAPACITY_DECREASE_PERCENTAGE), - minCapacity + newMaxWorkers = Math.max( + Math.floor(previousMaxWorkers * MAX_WORKERS_DECREASE_PERCENTAGE), + MIN_WORKERS ); } else { - // Increase capacity by CAPACITY_INCREASE_PERCENTAGE while making sure it doesn't go + // Increase max workers by MAX_WORKERS_INCREASE_PERCENTAGE while making sure it doesn't go // higher than the starting value. Using Math.ceil to make sure the number is different than // previous while not being a decimal value - newCapacity = Math.min( - startingCapacity, - Math.ceil(previousCapacity * CAPACITY_INCREASE_PERCENTAGE) + newMaxWorkers = Math.min( + startingMaxWorkers, + Math.ceil(previousMaxWorkers * MAX_WORKERS_INCREASE_PERCENTAGE) ); } - - if (newCapacity !== previousCapacity) { + if (newMaxWorkers !== previousMaxWorkers) { logger.debug( - `Capacity configuration changing from ${previousCapacity} to ${newCapacity} after seeing ${errorCount} "too many request" and/or "execute [inline] script" error(s)` + `Max workers configuration changing from ${previousMaxWorkers} to ${newMaxWorkers} after seeing ${errorCount} "too many request" and/or "execute [inline] script" error(s)` ); - if (previousCapacity === startingCapacity) { + if (previousMaxWorkers === startingMaxWorkers) { logger.warn( - `Capacity configuration is temporarily reduced after Elasticsearch returned ${errorCount} "too many request" and/or "execute [inline] script" error(s).` + `Max workers configuration is temporarily reduced after Elasticsearch returned ${errorCount} "too many request" and/or "execute [inline] script" error(s).` ); } } - return newCapacity; - }, startingCapacity); + return newMaxWorkers; + }, startingMaxWorkers); } function createPollIntervalScan(logger: Logger, startingPollInterval: number) { @@ -201,36 +186,3 @@ function resetErrorCount() { count: 0, }; } - -function getMinCapacity(config: TaskManagerConfig) { - switch (config.claim_strategy) { - case CLAIM_STRATEGY_MGET: - return MIN_COST; - - default: - return MIN_WORKERS; - } -} - -export function calculateStartingCapacity( - config: TaskManagerConfig, - logger: Logger, - defaultCapacity: number -): number { - if (config.capacity !== undefined && config.max_workers !== undefined) { - logger.warn( - `Both "xpack.task_manager.capacity" and "xpack.task_manager.max_workers" configs are set, max_workers will be ignored in favor of capacity and the setting should be removed.` - ); - } - - if (config.capacity) { - // Use capacity if explicitly set - return config.capacity!; - } else if (config.max_workers) { - // Otherwise use max_worker value as capacity, capped at MAX_CAPACITY - return Math.min(config.max_workers, MAX_CAPACITY); - } - - // Neither are set, use the given default capacity - return defaultCapacity; -} diff --git a/x-pack/plugins/task_manager/server/lib/fill_pool.test.ts b/x-pack/plugins/task_manager/server/lib/fill_pool.test.ts index d3533ac058314..9fdb16fb5f677 100644 --- a/x-pack/plugins/task_manager/server/lib/fill_pool.test.ts +++ b/x-pack/plugins/task_manager/server/lib/fill_pool.test.ts @@ -30,6 +30,7 @@ describe('fillPool', () => { tasksUpdated: tasks?.length ?? 0, tasksConflicted: 0, tasksClaimed: 0, + tasksRejected: 0, }, docs: tasks, }) diff --git a/x-pack/plugins/task_manager/server/lib/get_default_capacity.test.ts b/x-pack/plugins/task_manager/server/lib/get_default_capacity.test.ts deleted file mode 100644 index fb68a3620e43c..0000000000000 --- a/x-pack/plugins/task_manager/server/lib/get_default_capacity.test.ts +++ /dev/null @@ -1,185 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { CLAIM_STRATEGY_DEFAULT, CLAIM_STRATEGY_MGET, DEFAULT_CAPACITY } from '../config'; -import { getDefaultCapacity } from './get_default_capacity'; - -describe('getDefaultCapacity', () => { - it('returns default capacity when not in cloud', () => { - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: false, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: true, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: false, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: true, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - }); - - it('returns default capacity when default claim strategy', () => { - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_DEFAULT, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_DEFAULT, - }) - ).toBe(DEFAULT_CAPACITY); - }); - - it('returns default capacity when serverless', () => { - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: true, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: false, - isServerless: true, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: true, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: true, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(DEFAULT_CAPACITY); - }); - - it('returns capacity as expected when in cloud and claim strategy is mget', () => { - // 1GB - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(10); - - // 1GB but somehow background task node only is true - expect( - getDefaultCapacity({ - heapSizeLimit: 851443712, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(10); - - // 2GB - expect( - getDefaultCapacity({ - heapSizeLimit: 1702887424, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(15); - - // 2GB but somehow background task node only is true - expect( - getDefaultCapacity({ - heapSizeLimit: 1702887424, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(15); - - // 4GB - expect( - getDefaultCapacity({ - heapSizeLimit: 3405774848, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: false, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(25); - - // 4GB background task only - expect( - getDefaultCapacity({ - heapSizeLimit: 3405774848, - isCloud: true, - isServerless: false, - isBackgroundTaskNodeOnly: true, - claimStrategy: CLAIM_STRATEGY_MGET, - }) - ).toBe(50); - }); -}); diff --git a/x-pack/plugins/task_manager/server/lib/get_default_capacity.ts b/x-pack/plugins/task_manager/server/lib/get_default_capacity.ts deleted file mode 100644 index aeafa0f63c4d7..0000000000000 --- a/x-pack/plugins/task_manager/server/lib/get_default_capacity.ts +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { CLAIM_STRATEGY_MGET, DEFAULT_CAPACITY } from '../config'; - -interface GetDefaultCapacityOpts { - claimStrategy?: string; - heapSizeLimit: number; - isCloud: boolean; - isServerless: boolean; - isBackgroundTaskNodeOnly: boolean; -} - -// Map instance size to desired capacity -const HEAP_TO_CAPACITY_MAP = [ - { minHeap: 0, maxHeap: 1, capacity: 10 }, - { minHeap: 1, maxHeap: 2, capacity: 15 }, - { minHeap: 2, maxHeap: 4, capacity: 25, backgroundTaskNodeOnly: false }, - { minHeap: 2, maxHeap: 4, capacity: 50, backgroundTaskNodeOnly: true }, -]; - -export function getDefaultCapacity({ - claimStrategy, - heapSizeLimit: heapSizeLimitInBytes, - isCloud, - isServerless, - isBackgroundTaskNodeOnly, -}: GetDefaultCapacityOpts) { - // perform heap size based calculations only in cloud - if (isCloud && !isServerless && claimStrategy === CLAIM_STRATEGY_MGET) { - // convert bytes to GB - const heapSizeLimitInGB = heapSizeLimitInBytes / 1e9; - - const config = HEAP_TO_CAPACITY_MAP.find((map) => { - return ( - heapSizeLimitInGB > map.minHeap && - heapSizeLimitInGB <= map.maxHeap && - (map.backgroundTaskNodeOnly === undefined || - isBackgroundTaskNodeOnly === map.backgroundTaskNodeOnly) - ); - }); - - return config?.capacity ?? DEFAULT_CAPACITY; - } - - return DEFAULT_CAPACITY; -} diff --git a/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts b/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts index a39568df5fdd2..ea0793b60266b 100644 --- a/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts +++ b/x-pack/plugins/task_manager/server/lib/log_health_metrics.test.ts @@ -435,8 +435,7 @@ function getMockMonitoredHealth(overrides = {}): MonitoredHealth { timestamp: new Date().toISOString(), status: HealthStatus.OK, value: { - capacity: { config: 10, as_cost: 20, as_workers: 10 }, - claim_strategy: 'default', + max_workers: 10, poll_interval: 3000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -455,19 +454,16 @@ function getMockMonitoredHealth(overrides = {}): MonitoredHealth { status: HealthStatus.OK, value: { count: 4, - cost: 8, task_types: { - actions_telemetry: { count: 2, cost: 4, status: { idle: 2 } }, - alerting_telemetry: { count: 1, cost: 2, status: { idle: 1 } }, - session_cleanup: { count: 1, cost: 2, status: { idle: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 1, status: { idle: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, schedule: [], overdue: 0, - overdue_cost: 0, overdue_non_recurring: 0, estimatedScheduleDensity: [], non_recurring: 20, - non_recurring_cost: 40, owner_ids: 2, estimated_schedule_density: [], capacity_requirements: { diff --git a/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts b/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts index b1cf9a90b6cb6..309617a8e4cc3 100644 --- a/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts +++ b/x-pack/plugins/task_manager/server/metrics/create_aggregator.test.ts @@ -45,6 +45,7 @@ const config: TaskManagerConfig = { warn_threshold: 5000, }, max_attempts: 9, + max_workers: 10, metrics_reset_interval: 30000, monitored_aggregated_stats_refresh_rate: 5000, monitored_stats_health_verbose_log: { diff --git a/x-pack/plugins/task_manager/server/monitoring/background_task_utilization_statistics.ts b/x-pack/plugins/task_manager/server/monitoring/background_task_utilization_statistics.ts index 5a9a9e07aadf7..837f29c83f108 100644 --- a/x-pack/plugins/task_manager/server/monitoring/background_task_utilization_statistics.ts +++ b/x-pack/plugins/task_manager/server/monitoring/background_task_utilization_statistics.ts @@ -21,7 +21,7 @@ import { } from '../task_events'; import { MonitoredStat } from './monitoring_stats_stream'; import { AggregatedStat, AggregatedStatProvider } from '../lib/runtime_statistics_aggregator'; -import { createRunningAveragedStat } from './task_run_calculators'; +import { createRunningAveragedStat } from './task_run_calcultors'; import { DEFAULT_WORKER_UTILIZATION_RUNNING_AVERAGE_WINDOW } from '../config'; export interface PublicBackgroundTaskUtilizationStat extends JsonObject { diff --git a/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.test.ts b/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.test.ts index 9791ac805e500..263f2e9987b7c 100644 --- a/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.test.ts @@ -21,7 +21,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -77,7 +77,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -135,7 +135,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -172,7 +172,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -228,7 +228,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { // 0 active tasks at this moment in time, so no owners identifiable owner_ids: 0, @@ -285,7 +285,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 3, overdue_non_recurring: 0, @@ -347,7 +347,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: provisionedKibanaInstances, overdue_non_recurring: 0, @@ -428,7 +428,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: provisionedKibanaInstances, overdue_non_recurring: 0, @@ -510,7 +510,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -578,7 +578,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -643,7 +643,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -708,7 +708,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -784,7 +784,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { owner_ids: 1, overdue_non_recurring: 0, @@ -862,7 +862,7 @@ describe('estimateCapacity', () => { estimateCapacity( logger, mockStats( - { capacity: { config: 10, as_cost: 20, as_workers: 10 }, poll_interval: 3000 }, + { max_workers: 10, poll_interval: 3000 }, { overdue: undefined, owner_ids: 1, @@ -949,8 +949,7 @@ function mockStats( status: HealthStatus.OK, timestamp: new Date().toISOString(), value: { - capacity: { config: 10, as_cost: 20, as_workers: 10 }, - claim_strategy: 'default', + max_workers: 0, poll_interval: 0, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -970,19 +969,16 @@ function mockStats( timestamp: new Date().toISOString(), value: { count: 4, - cost: 8, task_types: { - actions_telemetry: { count: 2, cost: 4, status: { idle: 2 } }, - alerting_telemetry: { count: 1, cost: 2, status: { idle: 1 } }, - session_cleanup: { count: 1, cost: 2, status: { idle: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 1, status: { idle: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, schedule: [], overdue: 0, - overdue_cost: 0, overdue_non_recurring: 0, estimated_schedule_density: [], non_recurring: 20, - non_recurring_cost: 40, owner_ids: 2, capacity_requirements: { per_minute: 150, diff --git a/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.ts b/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.ts index d1c2f3591ea22..b12382f16e27b 100644 --- a/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.ts +++ b/x-pack/plugins/task_manager/server/monitoring/capacity_estimation.ts @@ -10,7 +10,7 @@ import stats from 'stats-lite'; import { JsonObject } from '@kbn/utility-types'; import { Logger } from '@kbn/core/server'; import { RawMonitoringStats, RawMonitoredStat, HealthStatus } from './monitoring_stats_stream'; -import { AveragedStat } from './task_run_calculators'; +import { AveragedStat } from './task_run_calcultors'; import { TaskPersistenceTypes } from './task_run_statistics'; import { asErr, asOk, map, Result } from '../lib/result_type'; @@ -61,10 +61,8 @@ export function estimateCapacity( non_recurring: percentageOfExecutionsUsedByNonRecurringTasks, } = capacityStats.runtime.value.execution.persistence; const { overdue, capacity_requirements: capacityRequirements } = workload; - const { - poll_interval: pollInterval, - capacity: { config: configuredCapacity }, - } = capacityStats.configuration.value; + const { poll_interval: pollInterval, max_workers: maxWorkers } = + capacityStats.configuration.value; /** * On average, how many polling cycles does it take to execute a task? @@ -80,10 +78,10 @@ export function estimateCapacity( ); /** - * Given the current configuration how much capacity do we have to run normal cost tasks? + * Given the current configuration how much task capacity do we have? */ const capacityPerMinutePerKibana = Math.round( - ((60 * 1000) / (averagePollIntervalsPerExecution * pollInterval)) * configuredCapacity + ((60 * 1000) / (averagePollIntervalsPerExecution * pollInterval)) * maxWorkers ); /** diff --git a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts index 0b5387b66dece..822356e2d6534 100644 --- a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.test.ts @@ -13,6 +13,7 @@ import { TaskManagerConfig } from '../config'; describe('Configuration Statistics Aggregator', () => { test('merges the static config with the merged configs', async () => { const configuration: TaskManagerConfig = { + max_workers: 10, max_attempts: 9, poll_interval: 6000000, allow_reading_invalid_state: false, @@ -54,8 +55,7 @@ describe('Configuration Statistics Aggregator', () => { }; const managedConfig = { - startingCapacity: 10, - capacityConfiguration$: new Subject(), + maxWorkersConfiguration$: new Subject(), pollIntervalConfiguration$: new Subject(), }; @@ -65,12 +65,7 @@ describe('Configuration Statistics Aggregator', () => { .pipe(take(3), bufferCount(3)) .subscribe(([initial, updatedWorkers, updatedInterval]) => { expect(initial.value).toEqual({ - capacity: { - config: 10, - as_workers: 10, - as_cost: 20, - }, - claim_strategy: 'default', + max_workers: 10, poll_interval: 6000000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -84,12 +79,7 @@ describe('Configuration Statistics Aggregator', () => { }, }); expect(updatedWorkers.value).toEqual({ - capacity: { - config: 8, - as_workers: 8, - as_cost: 16, - }, - claim_strategy: 'default', + max_workers: 8, poll_interval: 6000000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -103,12 +93,7 @@ describe('Configuration Statistics Aggregator', () => { }, }); expect(updatedInterval.value).toEqual({ - capacity: { - config: 8, - as_workers: 8, - as_cost: 16, - }, - claim_strategy: 'default', + max_workers: 8, poll_interval: 3000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -123,7 +108,7 @@ describe('Configuration Statistics Aggregator', () => { }); resolve(); }, reject); - managedConfig.capacityConfiguration$.next(8); + managedConfig.maxWorkersConfiguration$.next(8); managedConfig.pollIntervalConfiguration$.next(3000); } catch (error) { reject(error); diff --git a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.ts b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.ts index c606b63694b0f..dc3221351a33e 100644 --- a/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.ts +++ b/x-pack/plugins/task_manager/server/monitoring/configuration_statistics.ts @@ -8,11 +8,9 @@ import { combineLatest, of } from 'rxjs'; import { pick, merge } from 'lodash'; import { map, startWith } from 'rxjs'; -import { JsonObject } from '@kbn/utility-types'; import { AggregatedStatProvider } from '../lib/runtime_statistics_aggregator'; -import { CLAIM_STRATEGY_DEFAULT, TaskManagerConfig } from '../config'; +import { TaskManagerConfig } from '../config'; import { ManagedConfiguration } from '../lib/create_managed_configuration'; -import { getCapacityInCost, getCapacityInWorkers } from '../task_pool'; const CONFIG_FIELDS_TO_EXPOSE = [ 'request_capacity', @@ -21,19 +19,10 @@ const CONFIG_FIELDS_TO_EXPOSE = [ 'monitored_task_execution_thresholds', ] as const; -interface CapacityConfig extends JsonObject { - capacity: { - config: number; - as_workers: number; - as_cost: number; - }; -} - export type ConfigStat = Pick< TaskManagerConfig, - 'poll_interval' | 'claim_strategy' | (typeof CONFIG_FIELDS_TO_EXPOSE)[number] -> & - CapacityConfig; + 'max_workers' | 'poll_interval' | (typeof CONFIG_FIELDS_TO_EXPOSE)[number] +>; export function createConfigurationAggregator( config: TaskManagerConfig, @@ -41,21 +30,16 @@ export function createConfigurationAggregator( ): AggregatedStatProvider { return combineLatest([ of(pick(config, ...CONFIG_FIELDS_TO_EXPOSE)), - of({ claim_strategy: config.claim_strategy ?? CLAIM_STRATEGY_DEFAULT }), managedConfig.pollIntervalConfiguration$.pipe( startWith(config.poll_interval), map>((pollInterval) => ({ poll_interval: pollInterval, })) ), - managedConfig.capacityConfiguration$.pipe( - startWith(managedConfig.startingCapacity), - map((capacity) => ({ - capacity: { - config: capacity, - as_workers: getCapacityInWorkers(capacity), - as_cost: getCapacityInCost(capacity), - }, + managedConfig.maxWorkersConfiguration$.pipe( + startWith(config.max_workers), + map>((maxWorkers) => ({ + max_workers: maxWorkers, })) ), ]).pipe( diff --git a/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.test.ts b/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.test.ts index ac16070d7c131..d7135837e052e 100644 --- a/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.test.ts @@ -176,11 +176,11 @@ describe('Ephemeral Task Statistics', () => { }); const runningAverageWindowSize = 5; - const capacity = 10; + const maxWorkers = 10; const ephemeralTaskAggregator = createEphemeralTaskAggregator( ephemeralTaskLifecycle, runningAverageWindowSize, - capacity + maxWorkers ); function expectWindowEqualsUpdate( @@ -229,7 +229,7 @@ describe('Ephemeral Task Statistics', () => { }); }); -test('returns the average load added per polling cycle cycle by ephemeral tasks when load exceeds capacity', async () => { +test('returns the average load added per polling cycle cycle by ephemeral tasks when load exceeds max workers', async () => { const tasksExecuted = [0, 5, 10, 20, 15, 10, 5, 0, 0, 0, 0, 0]; const expectedLoad = [0, 50, 100, 200, 150, 100, 50, 0, 0, 0, 0, 0]; @@ -241,11 +241,11 @@ test('returns the average load added per polling cycle cycle by ephemeral tasks }); const runningAverageWindowSize = 5; - const capacity = 10; + const maxWorkers = 10; const ephemeralTaskAggregator = createEphemeralTaskAggregator( ephemeralTaskLifecycle, runningAverageWindowSize, - capacity + maxWorkers ); function expectWindowEqualsUpdate( diff --git a/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.ts b/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.ts index d02080a56a1aa..b77eae1080fbc 100644 --- a/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.ts +++ b/x-pack/plugins/task_manager/server/monitoring/ephemeral_task_statistics.ts @@ -17,7 +17,7 @@ import { AveragedStat, calculateRunningAverage, createRunningAveragedStat, -} from './task_run_calculators'; +} from './task_run_calcultors'; import { HealthStatus } from './monitoring_stats_stream'; export interface EphemeralTaskStat extends JsonObject { @@ -35,7 +35,7 @@ export interface SummarizedEphemeralTaskStat extends JsonObject { export function createEphemeralTaskAggregator( ephemeralTaskLifecycle: EphemeralTaskLifecycle, runningAverageWindowSize: number, - capacity: number + maxWorkers: number ): AggregatedStatProvider { const ephemeralTaskRunEvents$ = ephemeralTaskLifecycle.events.pipe( filter((taskEvent: TaskLifecycleEvent) => isTaskRunEvent(taskEvent)) @@ -70,7 +70,7 @@ export function createEphemeralTaskAggregator( map(([tasksRanSincePreviousQueueSize, ephemeralQueueSize]) => ({ queuedTasks: ephemeralQueuedTasksQueue(ephemeralQueueSize), executionsPerCycle: ephemeralQueueExecutionsPerCycleQueue(tasksRanSincePreviousQueueSize), - load: ephemeralTaskLoadQueue(calculateWorkerLoad(capacity, tasksRanSincePreviousQueueSize)), + load: ephemeralTaskLoadQueue(calculateWorkerLoad(maxWorkers, tasksRanSincePreviousQueueSize)), })), startWith({ queuedTasks: [], diff --git a/x-pack/plugins/task_manager/server/monitoring/index.ts b/x-pack/plugins/task_manager/server/monitoring/index.ts index 5dc024b53de10..9ee32e97d7758 100644 --- a/x-pack/plugins/task_manager/server/monitoring/index.ts +++ b/x-pack/plugins/task_manager/server/monitoring/index.ts @@ -18,7 +18,6 @@ import { TaskPollingLifecycle } from '../polling_lifecycle'; import { ManagedConfiguration } from '../lib/create_managed_configuration'; import { EphemeralTaskLifecycle } from '../ephemeral_task_lifecycle'; import { AdHocTaskCounter } from '../lib/adhoc_task_counter'; -import { TaskTypeDictionary } from '../task_type_dictionary'; export type { MonitoringStats, RawMonitoringStats } from './monitoring_stats_stream'; export { @@ -28,20 +27,27 @@ export { createMonitoringStatsStream, } from './monitoring_stats_stream'; -export interface CreateMonitoringStatsOpts { - taskStore: TaskStore; - elasticsearchAndSOAvailability$: Observable; - config: TaskManagerConfig; - managedConfig: ManagedConfiguration; - logger: Logger; - adHocTaskCounter: AdHocTaskCounter; - taskDefinitions: TaskTypeDictionary; - taskPollingLifecycle?: TaskPollingLifecycle; - ephemeralTaskLifecycle?: EphemeralTaskLifecycle; -} - export function createMonitoringStats( - opts: CreateMonitoringStatsOpts + taskStore: TaskStore, + elasticsearchAndSOAvailability$: Observable, + config: TaskManagerConfig, + managedConfig: ManagedConfiguration, + logger: Logger, + adHocTaskCounter: AdHocTaskCounter, + taskPollingLifecycle?: TaskPollingLifecycle, + ephemeralTaskLifecycle?: EphemeralTaskLifecycle ): Observable { - return createMonitoringStatsStream(createAggregators(opts)); + return createMonitoringStatsStream( + createAggregators( + taskStore, + elasticsearchAndSOAvailability$, + config, + managedConfig, + logger, + adHocTaskCounter, + taskPollingLifecycle, + ephemeralTaskLifecycle + ), + config + ); } diff --git a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts index 075b663e4ce83..f4da53871ffa3 100644 --- a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.test.ts @@ -5,6 +5,7 @@ * 2.0. */ +import { TaskManagerConfig } from '../config'; import { of, Subject } from 'rxjs'; import { take, bufferCount } from 'rxjs'; import { createMonitoringStatsStream } from './monitoring_stats_stream'; @@ -16,9 +17,51 @@ beforeEach(() => { }); describe('createMonitoringStatsStream', () => { + const configuration: TaskManagerConfig = { + max_workers: 10, + max_attempts: 9, + poll_interval: 6000000, + allow_reading_invalid_state: false, + version_conflict_threshold: 80, + monitored_stats_required_freshness: 6000000, + request_capacity: 1000, + monitored_aggregated_stats_refresh_rate: 5000, + monitored_stats_health_verbose_log: { + enabled: false, + level: 'debug' as const, + warn_delayed_task_start_in_seconds: 60, + }, + monitored_stats_running_average_window: 50, + monitored_task_execution_thresholds: { + default: { + error_threshold: 90, + warn_threshold: 80, + }, + custom: {}, + }, + ephemeral_tasks: { + enabled: true, + request_capacity: 10, + }, + unsafe: { + exclude_task_types: [], + authenticate_background_task_utilization: true, + }, + event_loop_delay: { + monitor: true, + warn_threshold: 5000, + }, + worker_utilization_running_average_window: 5, + metrics_reset_interval: 3000, + claim_strategy: 'default', + request_timeouts: { + update_by_query: 1000, + }, + }; + it('returns the initial config used to configure Task Manager', async () => { return new Promise((resolve) => { - createMonitoringStatsStream(of()) + createMonitoringStatsStream(of(), configuration) .pipe(take(1)) .subscribe((firstValue) => { expect(firstValue.stats).toEqual({}); @@ -31,7 +74,7 @@ describe('createMonitoringStatsStream', () => { const aggregatedStats$ = new Subject(); return new Promise((resolve) => { - createMonitoringStatsStream(aggregatedStats$) + createMonitoringStatsStream(aggregatedStats$, configuration) .pipe(take(3), bufferCount(3)) .subscribe(([initialValue, secondValue, thirdValue]) => { expect(initialValue.stats).toMatchObject({ @@ -39,7 +82,7 @@ describe('createMonitoringStatsStream', () => { stats: { configuration: { value: { - capacity: 10, + max_workers: 10, poll_interval: 6000000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -72,7 +115,7 @@ describe('createMonitoringStatsStream', () => { configuration: { timestamp: expect.any(String), value: { - capacity: 10, + max_workers: 10, poll_interval: 6000000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -105,7 +148,7 @@ describe('createMonitoringStatsStream', () => { configuration: { timestamp: expect.any(String), value: { - capacity: 10, + max_workers: 10, poll_interval: 6000000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, diff --git a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts index e1bffb55d54fa..5ee6465dae0eb 100644 --- a/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts +++ b/x-pack/plugins/task_manager/server/monitoring/monitoring_stats_stream.ts @@ -10,6 +10,8 @@ import { map, scan } from 'rxjs'; import { set } from '@kbn/safer-lodash-set'; import { Logger } from '@kbn/core/server'; import { JsonObject } from '@kbn/utility-types'; +import { TaskStore } from '../task_store'; +import { TaskPollingLifecycle } from '../polling_lifecycle'; import { createWorkloadAggregator, summarizeWorkloadStat, @@ -35,9 +37,11 @@ import { import { ConfigStat, createConfigurationAggregator } from './configuration_statistics'; import { TaskManagerConfig } from '../config'; +import { ManagedConfiguration } from '../lib/create_managed_configuration'; +import { EphemeralTaskLifecycle } from '../ephemeral_task_lifecycle'; import { CapacityEstimationStat, withCapacityEstimate } from './capacity_estimation'; +import { AdHocTaskCounter } from '../lib/adhoc_task_counter'; import { AggregatedStatProvider } from '../lib/runtime_statistics_aggregator'; -import { CreateMonitoringStatsOpts } from '.'; export interface MonitoringStats { last_update: string; @@ -77,28 +81,26 @@ export interface RawMonitoringStats { }; } -export function createAggregators({ - taskStore, - elasticsearchAndSOAvailability$, - config, - managedConfig, - logger, - taskDefinitions, - adHocTaskCounter, - taskPollingLifecycle, - ephemeralTaskLifecycle, -}: CreateMonitoringStatsOpts): AggregatedStatProvider { +export function createAggregators( + taskStore: TaskStore, + elasticsearchAndSOAvailability$: Observable, + config: TaskManagerConfig, + managedConfig: ManagedConfiguration, + logger: Logger, + adHocTaskCounter: AdHocTaskCounter, + taskPollingLifecycle?: TaskPollingLifecycle, + ephemeralTaskLifecycle?: EphemeralTaskLifecycle +): AggregatedStatProvider { const aggregators: AggregatedStatProvider[] = [ createConfigurationAggregator(config, managedConfig), - createWorkloadAggregator({ + createWorkloadAggregator( taskStore, elasticsearchAndSOAvailability$, - refreshInterval: config.monitored_aggregated_stats_refresh_rate, - pollInterval: config.poll_interval, - logger, - taskDefinitions, - }), + config.monitored_aggregated_stats_refresh_rate, + config.poll_interval, + logger + ), ]; if (taskPollingLifecycle) { aggregators.push( @@ -116,7 +118,7 @@ export function createAggregators({ createEphemeralTaskAggregator( ephemeralTaskLifecycle, config.monitored_stats_running_average_window, - managedConfig.startingCapacity + config.max_workers ) ); } @@ -124,7 +126,8 @@ export function createAggregators({ } export function createMonitoringStatsStream( - provider$: AggregatedStatProvider + provider$: AggregatedStatProvider, + config: TaskManagerConfig ): Observable { const initialStats = { last_update: new Date().toISOString(), diff --git a/x-pack/plugins/task_manager/server/monitoring/task_run_calculators.test.ts b/x-pack/plugins/task_manager/server/monitoring/task_run_calcultors.test.ts similarity index 98% rename from x-pack/plugins/task_manager/server/monitoring/task_run_calculators.test.ts rename to x-pack/plugins/task_manager/server/monitoring/task_run_calcultors.test.ts index 46df2b1b21d42..b5f6be8b7524d 100644 --- a/x-pack/plugins/task_manager/server/monitoring/task_run_calculators.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/task_run_calcultors.test.ts @@ -12,7 +12,7 @@ import { calculateFrequency, createRunningAveragedStat, createMapOfRunningAveragedStats, -} from './task_run_calculators'; +} from './task_run_calcultors'; describe('calculateRunningAverage', () => { test('calculates the running average and median of a window of values', async () => { diff --git a/x-pack/plugins/task_manager/server/monitoring/task_run_calculators.ts b/x-pack/plugins/task_manager/server/monitoring/task_run_calcultors.ts similarity index 100% rename from x-pack/plugins/task_manager/server/monitoring/task_run_calculators.ts rename to x-pack/plugins/task_manager/server/monitoring/task_run_calcultors.ts diff --git a/x-pack/plugins/task_manager/server/monitoring/task_run_statistics.ts b/x-pack/plugins/task_manager/server/monitoring/task_run_statistics.ts index 517b29a54cd64..6a7f10b7e75b6 100644 --- a/x-pack/plugins/task_manager/server/monitoring/task_run_statistics.ts +++ b/x-pack/plugins/task_manager/server/monitoring/task_run_statistics.ts @@ -35,7 +35,7 @@ import { calculateFrequency, createRunningAveragedStat, createMapOfRunningAveragedStats, -} from './task_run_calculators'; +} from './task_run_calcultors'; import { HealthStatus } from './monitoring_stats_stream'; import { TaskPollingLifecycle } from '../polling_lifecycle'; import { TaskExecutionFailureThreshold, TaskManagerConfig } from '../config'; diff --git a/x-pack/plugins/task_manager/server/monitoring/workload_statistics.test.ts b/x-pack/plugins/task_manager/server/monitoring/workload_statistics.test.ts index 2289c00b6405e..7ef860efa783a 100644 --- a/x-pack/plugins/task_manager/server/monitoring/workload_statistics.test.ts +++ b/x-pack/plugins/task_manager/server/monitoring/workload_statistics.test.ts @@ -15,14 +15,13 @@ import { padBuckets, estimateRecurringTaskScheduling, } from './workload_statistics'; -import { ConcreteTaskInstance, TaskCost } from '../task'; +import { ConcreteTaskInstance } from '../task'; import { times } from 'lodash'; import { taskStoreMock } from '../task_store.mock'; import { of, Subject } from 'rxjs'; import { sleep } from '../test_utils'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import { TaskTypeDictionary } from '../task_type_dictionary'; type ResponseWithAggs = Omit, 'aggregations'> & { aggregations: WorkloadAggregationResponse; @@ -33,98 +32,52 @@ const asApiResponse = (body: ResponseWithAggs) => .createSuccessTransportRequestPromise(body as estypes.SearchResponse) .then((res) => res.body as ResponseWithAggs); -const logger = loggingSystemMock.create().get(); - -const definitions = new TaskTypeDictionary(logger); -definitions.registerTaskDefinitions({ - report: { - title: 'report', - cost: TaskCost.ExtraLarge, - createTaskRunner: jest.fn(), - }, - foo: { - title: 'foo', - createTaskRunner: jest.fn(), - }, - bar: { - title: 'bar', - cost: TaskCost.Tiny, - createTaskRunner: jest.fn(), - }, -}); describe('Workload Statistics Aggregator', () => { - beforeEach(() => { - jest.resetAllMocks(); - }); - test('queries the Task Store at a fixed interval for the current workload', async () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue( asApiResponse({ - hits: { hits: [], max_score: 0, total: { value: 3, relation: 'eq' } }, + hits: { + hits: [], + max_score: 0, + total: { value: 0, relation: 'eq' }, + }, took: 1, timed_out: false, - _shards: { total: 1, successful: 1, skipped: 1, failed: 0 }, + _shards: { + total: 1, + successful: 1, + skipped: 1, + failed: 0, + }, aggregations: { taskType: { - buckets: [ - { - key: 'foo', - doc_count: 1, - status: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [{ key: 'idle', doc_count: 1 }], - }, - }, - { - key: 'bar', - doc_count: 1, - status: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [{ key: 'claiming', doc_count: 1 }], - }, - }, - { - key: 'report', - doc_count: 1, - status: { - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, - buckets: [{ key: 'idle', doc_count: 1 }], - }, - }, - ], + buckets: [], doc_count_error_upper_bound: 0, sum_other_doc_count: 0, }, schedule: { - buckets: [{ key: '1m', doc_count: 8 }], + buckets: [], doc_count_error_upper_bound: 0, sum_other_doc_count: 0, }, nonRecurringTasks: { - doc_count: 1, - taskType: { - buckets: [{ key: 'report', doc_count: 1 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + doc_count: 13, + }, + ownerIds: { + ownerIds: { + value: 1, }, }, - ownerIds: { ownerIds: { value: 1 } }, // The `FiltersAggregate` doesn't cover the case of a nested `AggregationsAggregationContainer`, in which `FiltersAggregate` // would not have a `buckets` property, but rather a keyed property that's inferred from the request. // @ts-expect-error idleTasks: { doc_count: 0, overdue: { - doc_count: 1, - nonRecurring: { doc_count: 0 }, - taskTypes: { - buckets: [{ key: 'foo', doc_count: 1 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + doc_count: 0, + nonRecurring: { + doc_count: 0, }, }, scheduleDensity: { @@ -136,7 +89,9 @@ describe('Workload Statistics Aggregator', () => { to: 1.601651976274e12, to_as_string: '2020-10-02T15:19:36.274Z', doc_count: 0, - histogram: { buckets: [] }, + histogram: { + buckets: [], + }, }, ], }, @@ -145,51 +100,87 @@ describe('Workload Statistics Aggregator', () => { }) ); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 10, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe(() => { expect(taskStore.aggregate).toHaveBeenCalledWith({ aggs: { taskType: { - terms: { size: 3, field: 'task.taskType' }, - aggs: { status: { terms: { field: 'task.status' } } }, + terms: { size: 100, field: 'task.taskType' }, + aggs: { + status: { + terms: { field: 'task.status' }, + }, + }, }, schedule: { - terms: { field: 'task.schedule.interval', size: 100 }, + terms: { + field: 'task.schedule.interval', + size: 100, + }, }, nonRecurringTasks: { - missing: { field: 'task.schedule.interval' }, - aggs: { taskType: { terms: { size: 3, field: 'task.taskType' } } }, + missing: { field: 'task.schedule' }, }, ownerIds: { - filter: { range: { 'task.startedAt': { gte: 'now-1w/w' } } }, - aggs: { ownerIds: { cardinality: { field: 'task.ownerId' } } }, + filter: { + range: { + 'task.startedAt': { + gte: 'now-1w/w', + }, + }, + }, + aggs: { + ownerIds: { + cardinality: { + field: 'task.ownerId', + }, + }, + }, }, idleTasks: { - filter: { term: { 'task.status': 'idle' } }, + filter: { + term: { 'task.status': 'idle' }, + }, aggs: { scheduleDensity: { - range: { field: 'task.runAt', ranges: [{ from: 'now', to: 'now+1m' }] }, + range: { + field: 'task.runAt', + ranges: [{ from: 'now', to: 'now+1m' }], + }, aggs: { histogram: { - date_histogram: { field: 'task.runAt', fixed_interval: '3s' }, - aggs: { interval: { terms: { field: 'task.schedule.interval' } } }, + date_histogram: { + field: 'task.runAt', + fixed_interval: '3s', + }, + aggs: { + interval: { + terms: { + field: 'task.schedule.interval', + }, + }, + }, }, }, }, overdue: { - filter: { range: { 'task.runAt': { lt: 'now' } } }, + filter: { + range: { + 'task.runAt': { lt: 'now' }, + }, + }, aggs: { - nonRecurring: { missing: { field: 'task.schedule.interval' } }, - taskTypes: { terms: { size: 3, field: 'task.taskType' } }, + nonRecurring: { + missing: { field: 'task.schedule' }, + }, }, }, }, @@ -203,18 +194,36 @@ describe('Workload Statistics Aggregator', () => { const mockAggregatedResult = () => asApiResponse({ - hits: { hits: [], max_score: 0, total: { value: 4, relation: 'eq' } }, + hits: { + hits: [], + max_score: 0, + total: { value: 4, relation: 'eq' }, + }, took: 1, timed_out: false, - _shards: { total: 1, successful: 1, skipped: 1, failed: 0 }, + _shards: { + total: 1, + successful: 1, + skipped: 1, + failed: 0, + }, aggregations: { schedule: { doc_count_error_upper_bound: 0, sum_other_doc_count: 0, buckets: [ - { key: '3600s', doc_count: 1 }, - { key: '60s', doc_count: 1 }, - { key: '720m', doc_count: 1 }, + { + key: '3600s', + doc_count: 1, + }, + { + key: '60s', + doc_count: 1, + }, + { + key: '720m', + doc_count: 1, + }, ], }, taskType: { @@ -222,55 +231,66 @@ describe('Workload Statistics Aggregator', () => { sum_other_doc_count: 0, buckets: [ { - key: 'foo', + key: 'actions_telemetry', doc_count: 2, status: { doc_count_error_upper_bound: 0, sum_other_doc_count: 0, - buckets: [{ key: 'idle', doc_count: 2 }], + buckets: [ + { + key: 'idle', + doc_count: 2, + }, + ], }, }, { - key: 'bar', + key: 'alerting_telemetry', doc_count: 1, status: { doc_count_error_upper_bound: 0, sum_other_doc_count: 0, - buckets: [{ key: 'idle', doc_count: 1 }], + buckets: [ + { + key: 'idle', + doc_count: 1, + }, + ], }, }, { - key: 'report', + key: 'session_cleanup', doc_count: 1, status: { doc_count_error_upper_bound: 0, sum_other_doc_count: 0, - buckets: [{ key: 'idle', doc_count: 1 }], + buckets: [ + { + key: 'idle', + doc_count: 1, + }, + ], }, }, ], }, nonRecurringTasks: { - doc_count: 1, - taskType: { - buckets: [{ key: 'report', doc_count: 1 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + doc_count: 13, + }, + ownerIds: { + ownerIds: { + value: 1, }, }, - ownerIds: { ownerIds: { value: 1 } }, // The `FiltersAggregate` doesn't cover the case of a nested `AggregationsAggregationContainer`, in which `FiltersAggregate` // would not have a `buckets` property, but rather a keyed property that's inferred from the request. // @ts-expect-error idleTasks: { - doc_count: 3, + doc_count: 13, overdue: { - doc_count: 2, - nonRecurring: { doc_count: 1 }, - taskTypes: { - buckets: [{ key: 'foo', doc_count: 1 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + doc_count: 6, + nonRecurring: { + doc_count: 6, }, }, scheduleDensity: { @@ -286,25 +306,23 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue(mockAggregatedResult()); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 10, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe((result) => { expect(result.key).toEqual('workload'); expect(result.value).toMatchObject({ count: 4, - cost: 15, task_types: { - foo: { count: 2, cost: 4, status: { idle: 2 } }, - bar: { count: 1, cost: 1, status: { idle: 1 } }, - report: { count: 1, cost: 10, status: { idle: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 1, status: { idle: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, }); resolve(); @@ -318,14 +336,13 @@ describe('Workload Statistics Aggregator', () => { const availability$ = new Subject(); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + availability$, + 10, + 3000, + loggingSystemMock.create().get() + ); return new Promise(async (resolve, reject) => { try { @@ -333,11 +350,25 @@ describe('Workload Statistics Aggregator', () => { expect(result.key).toEqual('workload'); expect(result.value).toMatchObject({ count: 4, - cost: 15, task_types: { - foo: { count: 2, cost: 4, status: { idle: 2 } }, - bar: { count: 1, cost: 1, status: { idle: 1 } }, - report: { count: 1, cost: 10, status: { idle: 1 } }, + actions_telemetry: { + count: 2, + status: { + idle: 2, + }, + }, + alerting_telemetry: { + count: 1, + status: { + idle: 1, + }, + }, + session_cleanup: { + count: 1, + status: { + idle: 1, + }, + }, }, }); resolve(); @@ -358,22 +389,19 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue(mockAggregatedResult()); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 10, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe((result) => { expect(result.key).toEqual('workload'); expect(result.value).toMatchObject({ - overdue: 2, - overdue_cost: 2, - overdue_non_recurring: 1, + overdue: 6, }); resolve(); }); @@ -384,14 +412,13 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue(mockAggregatedResult()); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 10, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe((result) => { @@ -413,14 +440,13 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue(mockAggregatedResult()); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 60 * 1000, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 60 * 1000, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe(() => { @@ -452,14 +478,13 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue(mockAggregatedResult()); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 15 * 60 * 1000, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + of(true), + 15 * 60 * 1000, + 3000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe((result) => { @@ -492,41 +517,42 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate .mockResolvedValueOnce( - mockAggregatedResult().then((res) => setTaskTypeCount(res, 'foo', { idle: 2 })) + mockAggregatedResult().then((res) => + setTaskTypeCount(res, 'alerting_telemetry', { + idle: 2, + }) + ) ) .mockRejectedValueOnce(new Error('Elasticsearch has gone poof')) .mockResolvedValueOnce( - mockAggregatedResult().then((res) => setTaskTypeCount(res, 'foo', { idle: 1, failed: 1 })) + mockAggregatedResult().then((res) => + setTaskTypeCount(res, 'alerting_telemetry', { + idle: 1, + failed: 1, + }) + ) ); - const workloadAggregator = createWorkloadAggregator({ - taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + const logger = loggingSystemMock.create().get(); + const workloadAggregator = createWorkloadAggregator(taskStore, of(true), 10, 3000, logger); return new Promise((resolve, reject) => { workloadAggregator.pipe(take(2), bufferCount(2)).subscribe((results) => { expect(results[0].key).toEqual('workload'); expect(results[0].value).toMatchObject({ - count: 4, - cost: 15, + count: 5, task_types: { - bar: { count: 1, cost: 1, status: { idle: 1 } }, - report: { count: 1, cost: 10, status: { idle: 1 } }, - foo: { count: 2, cost: 4, status: { idle: 2 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 2, status: { idle: 2 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, }); expect(results[1].key).toEqual('workload'); expect(results[1].value).toMatchObject({ - count: 4, - cost: 15, + count: 5, task_types: { - bar: { count: 1, cost: 1, status: { idle: 1 } }, - report: { count: 1, cost: 10, status: { idle: 1 } }, - foo: { count: 2, cost: 4, status: { idle: 1, failed: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 2, status: { idle: 1, failed: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, }); resolve(); @@ -541,27 +567,49 @@ describe('Workload Statistics Aggregator', () => { const taskStore = taskStoreMock.create({}); taskStore.aggregate.mockResolvedValue( asApiResponse({ - hits: { hits: [], max_score: 0, total: { value: 4, relation: 'eq' } }, + hits: { + hits: [], + max_score: 0, + total: { value: 4, relation: 'eq' }, + }, took: 1, timed_out: false, - _shards: { total: 1, successful: 1, skipped: 1, failed: 0 }, + _shards: { + total: 1, + successful: 1, + skipped: 1, + failed: 0, + }, aggregations: { schedule: { doc_count_error_upper_bound: 0, sum_other_doc_count: 0, buckets: [ // repeats each cycle - { key: `${pollingIntervalInSeconds}s`, doc_count: 1 }, - // 6 times per minute - { key: `10s`, doc_count: 20 }, - // 1 times per minute - { key: `60s`, doc_count: 10 }, - // 4 times per hour - { key: '15m', doc_count: 90 }, - // 2 times per day - { key: '720m', doc_count: 10 }, - // 8 times per day - { key: '3h', doc_count: 100 }, + { + key: `${pollingIntervalInSeconds}s`, + doc_count: 1, + }, + { + key: `10s`, // 6 times per minute + doc_count: 20, + }, + { + key: `60s`, // 1 times per minute + doc_count: 10, + }, + { + key: '15m', // 4 times per hour + doc_count: 90, + }, + { + key: '720m', // 2 times per day + doc_count: 10, + }, + { + key: '3h', // 8 times per day + doc_count: 100, + }, ], }, taskType: { @@ -571,13 +619,12 @@ describe('Workload Statistics Aggregator', () => { }, nonRecurringTasks: { doc_count: 13, - taskType: { - buckets: [{ key: 'report', doc_count: 13 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + }, + ownerIds: { + ownerIds: { + value: 3, }, }, - ownerIds: { ownerIds: { value: 3 } }, // The `FiltersAggregate` doesn't cover the case of a nested `AggregationContainer`, in which `FiltersAggregate` // would not have a `buckets` property, but rather a keyed property that's inferred from the request. // @ts-expect-error @@ -585,11 +632,8 @@ describe('Workload Statistics Aggregator', () => { doc_count: 13, overdue: { doc_count: 6, - nonRecurring: { doc_count: 0 }, - taskTypes: { - buckets: [{ key: 'foo', doc_count: 6 }], - doc_count_error_upper_bound: 0, - sum_other_doc_count: 0, + nonRecurring: { + doc_count: 0, }, }, scheduleDensity: { @@ -602,14 +646,13 @@ describe('Workload Statistics Aggregator', () => { }) ); - const workloadAggregator = createWorkloadAggregator({ + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), - refreshInterval: 10, - pollInterval: pollingIntervalInSeconds * 1000, - logger, - taskDefinitions: definitions, - }); + of(true), + 10, + pollingIntervalInSeconds * 1000, + loggingSystemMock.create().get() + ); return new Promise((resolve) => { workloadAggregator.pipe(first()).subscribe((result) => { @@ -617,7 +660,7 @@ describe('Workload Statistics Aggregator', () => { expect(result.value).toMatchObject({ capacity_requirements: { - // these are buckets of required capacity, rather than aggregated requirements. + // these are buckets of required capacity, rather than aggregated requirmenets. per_minute: 150, per_hour: 360, per_day: 820, @@ -632,14 +675,14 @@ describe('Workload Statistics Aggregator', () => { const refreshInterval = 1000; const taskStore = taskStoreMock.create({}); - const workloadAggregator = createWorkloadAggregator({ + const logger = loggingSystemMock.create().get(); + const workloadAggregator = createWorkloadAggregator( taskStore, - elasticsearchAndSOAvailability$: of(true), + of(true), refreshInterval, - pollInterval: 3000, - logger, - taskDefinitions: definitions, - }); + 3000, + logger + ); return new Promise((resolve, reject) => { let errorWasThrowAt = 0; @@ -651,7 +694,9 @@ describe('Workload Statistics Aggregator', () => { reject(new Error(`Elasticsearch is still poof`)); } - return setTaskTypeCount(await mockAggregatedResult(), 'foo', { idle: 2 }); + return setTaskTypeCount(await mockAggregatedResult(), 'alerting_telemetry', { + idle: 2, + }); }); workloadAggregator.pipe(take(2), bufferCount(2)).subscribe((results) => { @@ -754,7 +799,7 @@ describe('estimateRecurringTaskScheduling', () => { }); describe('padBuckets', () => { - test('returns zeroed out buckets when there are no buckets in the histogram', async () => { + test('returns zeroed out bucklets when there are no buckets in the histogram', async () => { expect( padBuckets(10, 3000, { key: '2020-10-02T19:47:28.128Z-2020-10-02T19:48:28.128Z', diff --git a/x-pack/plugins/task_manager/server/monitoring/workload_statistics.ts b/x-pack/plugins/task_manager/server/monitoring/workload_statistics.ts index e437b420c04f5..6c372ce0fc453 100644 --- a/x-pack/plugins/task_manager/server/monitoring/workload_statistics.ts +++ b/x-pack/plugins/task_manager/server/monitoring/workload_statistics.ts @@ -16,9 +16,7 @@ import { AggregatedStatProvider } from '../lib/runtime_statistics_aggregator'; import { parseIntervalAsSecond, asInterval, parseIntervalAsMillisecond } from '../lib/intervals'; import { HealthStatus } from './monitoring_stats_stream'; import { TaskStore } from '../task_store'; -import { createRunningAveragedStat } from './task_run_calculators'; -import { TaskTypeDictionary } from '../task_type_dictionary'; -import { TaskCost } from '../task'; +import { createRunningAveragedStat } from './task_run_calcultors'; interface StatusStat extends JsonObject { [status: string]: number; @@ -26,20 +24,16 @@ interface StatusStat extends JsonObject { interface TaskTypeStat extends JsonObject { [taskType: string]: { count: number; - cost: number; status: StatusStat; }; } interface RawWorkloadStat extends JsonObject { count: number; - cost: number; task_types: TaskTypeStat; schedule: Array<[string, number]>; non_recurring: number; - non_recurring_cost: number; overdue: number; - overdue_cost: number; overdue_non_recurring: number; estimated_schedule_density: number[]; capacity_requirements: CapacityRequirements; @@ -115,34 +109,22 @@ type ScheduleDensityResult = AggregationResultOf< type ScheduledIntervals = ScheduleDensityResult['histogram']['buckets'][0]; // Set an upper bound just in case a customer sets a really high refresh rate -const MAX_SCHEDULE_DENSITY_BUCKETS = 50; - -interface CreateWorkloadAggregatorOpts { - taskStore: TaskStore; - elasticsearchAndSOAvailability$: Observable; - refreshInterval: number; - pollInterval: number; - logger: Logger; - taskDefinitions: TaskTypeDictionary; -} +const MAX_SHCEDULE_DENSITY_BUCKETS = 50; -export function createWorkloadAggregator({ - taskStore, - elasticsearchAndSOAvailability$, - refreshInterval, - pollInterval, - logger, - taskDefinitions, -}: CreateWorkloadAggregatorOpts): AggregatedStatProvider { +export function createWorkloadAggregator( + taskStore: TaskStore, + elasticsearchAndSOAvailability$: Observable, + refreshInterval: number, + pollInterval: number, + logger: Logger +): AggregatedStatProvider { // calculate scheduleDensity going two refreshIntervals or 1 minute into into the future // (the longer of the two) const scheduleDensityBuckets = Math.min( Math.max(Math.round(60000 / pollInterval), Math.round((refreshInterval * 2) / pollInterval)), - MAX_SCHEDULE_DENSITY_BUCKETS + MAX_SHCEDULE_DENSITY_BUCKETS ); - const totalNumTaskDefinitions = taskDefinitions.getAllTypes().length; - const taskTypeTermAggSize = Math.min(totalNumTaskDefinitions, 10000); const ownerIdsQueue = createRunningAveragedStat(scheduleDensityBuckets); return combineLatest([timer(0, refreshInterval), elasticsearchAndSOAvailability$]).pipe( @@ -151,24 +133,39 @@ export function createWorkloadAggregator({ taskStore.aggregate({ aggs: { taskType: { - terms: { size: taskTypeTermAggSize, field: 'task.taskType' }, - aggs: { status: { terms: { field: 'task.status' } } }, + terms: { size: 100, field: 'task.taskType' }, + aggs: { + status: { + terms: { field: 'task.status' }, + }, + }, }, schedule: { terms: { field: 'task.schedule.interval', size: 100 }, }, nonRecurringTasks: { - missing: { field: 'task.schedule.interval' }, - aggs: { - taskType: { terms: { size: taskTypeTermAggSize, field: 'task.taskType' } }, - }, + missing: { field: 'task.schedule' }, }, ownerIds: { - filter: { range: { 'task.startedAt': { gte: 'now-1w/w' } } }, - aggs: { ownerIds: { cardinality: { field: 'task.ownerId' } } }, + filter: { + range: { + 'task.startedAt': { + gte: 'now-1w/w', + }, + }, + }, + aggs: { + ownerIds: { + cardinality: { + field: 'task.ownerId', + }, + }, + }, }, idleTasks: { - filter: { term: { 'task.status': 'idle' } }, + filter: { + term: { 'task.status': 'idle' }, + }, aggs: { scheduleDensity: { // create a window of upcoming tasks @@ -190,7 +187,7 @@ export function createWorkloadAggregator({ field: 'task.runAt', fixed_interval: asInterval(pollInterval), }, - // break down each bucket in the histogram by schedule + // break down each bucket in the historgram by schedule aggs: { interval: { terms: { field: 'task.schedule.interval' }, @@ -200,10 +197,15 @@ export function createWorkloadAggregator({ }, }, overdue: { - filter: { range: { 'task.runAt': { lt: 'now' } } }, + filter: { + range: { + 'task.runAt': { lt: 'now' }, + }, + }, aggs: { - taskTypes: { terms: { size: taskTypeTermAggSize, field: 'task.taskType' } }, - nonRecurring: { missing: { field: 'task.schedule.interval' } }, + nonRecurring: { + missing: { field: 'task.schedule' }, + }, }, }, }, @@ -224,13 +226,11 @@ export function createWorkloadAggregator({ const taskTypes = aggregations.taskType.buckets; const nonRecurring = aggregations.nonRecurringTasks.doc_count; - const nonRecurringTaskTypes = aggregations.nonRecurringTasks.taskType.buckets; const ownerIds = aggregations.ownerIds.ownerIds.value; const { overdue: { doc_count: overdue, - taskTypes: { buckets: taskTypesOverdue = [] } = {}, nonRecurring: { doc_count: overdueNonRecurring }, }, scheduleDensity: { buckets: [scheduleDensity] = [] } = {}, @@ -243,7 +243,6 @@ export function createWorkloadAggregator({ asSeconds: parseIntervalAsSecond(schedule.key as string), count: schedule.doc_count, }; - accm.schedules.push(parsedSchedule); if (parsedSchedule.asSeconds <= 60) { accm.cadence.perMinute += @@ -258,7 +257,11 @@ export function createWorkloadAggregator({ return accm; }, { - cadence: { perMinute: 0, perHour: 0, perDay: 0 }, + cadence: { + perMinute: 0, + perHour: 0, + perDay: 0, + }, schedules: [] as Array<{ interval: string; asSeconds: number; @@ -267,36 +270,20 @@ export function createWorkloadAggregator({ } ); - const totalNonRecurringCost = getTotalCost(nonRecurringTaskTypes, taskDefinitions); - const totalOverdueCost = getTotalCost(taskTypesOverdue, taskDefinitions); - - let totalCost = 0; - const taskTypeSummary = taskTypes.reduce((acc, bucket) => { - const value = bucket as TaskTypeWithStatusBucket; - const cost = - value.doc_count * taskDefinitions.get(value.key as string)?.cost ?? TaskCost.Normal; - totalCost += cost; - return Object.assign(acc, { - [value.key as string]: { - count: value.doc_count, - cost, - status: mapValues(keyBy(value.status.buckets, 'key'), 'doc_count'), - }, - }); - }, {}); - const summary: WorkloadStat = { count, - cost: totalCost, - task_types: taskTypeSummary, + task_types: mapValues(keyBy(taskTypes, 'key'), ({ doc_count: docCount, status }) => { + return { + count: docCount, + status: mapValues(keyBy(status.buckets, 'key'), 'doc_count'), + }; + }), non_recurring: nonRecurring, - non_recurring_cost: totalNonRecurringCost, owner_ids: ownerIdsQueue(ownerIds), schedule: schedules .sort((scheduleLeft, scheduleRight) => scheduleLeft.asSeconds - scheduleRight.asSeconds) .map((schedule) => [schedule.interval, schedule.count]), overdue, - overdue_cost: totalOverdueCost, overdue_non_recurring: overdueNonRecurring, estimated_schedule_density: padBuckets( scheduleDensityBuckets, @@ -470,37 +457,40 @@ export interface WorkloadAggregationResponse { taskType: TaskTypeAggregation; schedule: ScheduleAggregation; idleTasks: IdleTasksAggregation; - nonRecurringTasks: { doc_count: number; taskType: TaskTypeAggregation }; - ownerIds: { ownerIds: { value: number } }; - [otherAggs: string]: estypes.AggregationsAggregate; -} - -export type TaskTypeWithStatusBucket = TaskTypeBucket & { - status: { - buckets: Array<{ - doc_count: number; - key: string | number; - }>; - doc_count_error_upper_bound?: number | undefined; - sum_other_doc_count?: number | undefined; + nonRecurringTasks: { + doc_count: number; }; -}; - -export interface TaskTypeBucket { - doc_count: number; - key: string | number; + ownerIds: { + ownerIds: { + value: number; + }; + }; + [otherAggs: string]: estypes.AggregationsAggregate; } - // @ts-expect-error key doesn't accept a string export interface TaskTypeAggregation extends estypes.AggregationsFiltersAggregate { - buckets: Array; + buckets: Array<{ + doc_count: number; + key: string | number; + status: { + buckets: Array<{ + doc_count: number; + key: string | number; + }>; + doc_count_error_upper_bound?: number | undefined; + sum_other_doc_count?: number | undefined; + }; + }>; doc_count_error_upper_bound?: number | undefined; sum_other_doc_count?: number | undefined; } // @ts-expect-error key doesn't accept a string export interface ScheduleAggregation extends estypes.AggregationsFiltersAggregate { - buckets: Array<{ doc_count: number; key: string | number }>; + buckets: Array<{ + doc_count: number; + key: string | number; + }>; doc_count_error_upper_bound?: number | undefined; sum_other_doc_count?: number | undefined; } @@ -528,8 +518,9 @@ export interface IdleTasksAggregation extends estypes.AggregationsFiltersAggrega }; overdue: { doc_count: number; - nonRecurring: { doc_count: number }; - taskTypes: TaskTypeAggregation; + nonRecurring: { + doc_count: number; + }; }; } @@ -546,11 +537,3 @@ interface DateRangeBucket { from_as_string?: string; doc_count: number; } - -function getTotalCost(taskTypeBuckets: TaskTypeBucket[], definitions: TaskTypeDictionary): number { - let cost = 0; - for (const bucket of taskTypeBuckets) { - cost += bucket.doc_count * definitions.get(bucket.key as string)?.cost ?? TaskCost.Normal; - } - return cost; -} diff --git a/x-pack/plugins/task_manager/server/plugin.test.ts b/x-pack/plugins/task_manager/server/plugin.test.ts index a1589504bb364..7b80920a57559 100644 --- a/x-pack/plugins/task_manager/server/plugin.test.ts +++ b/x-pack/plugins/task_manager/server/plugin.test.ts @@ -11,8 +11,6 @@ import { TaskManagerConfig } from './config'; import { Subject } from 'rxjs'; import { bufferCount, take } from 'rxjs'; import { CoreStatus, ServiceStatusLevels } from '@kbn/core/server'; -import { serverlessPluginMock } from '@kbn/serverless/server/mocks'; -import { cloudMock } from '@kbn/cloud-plugin/public/mocks'; import { taskPollingLifecycleMock } from './polling_lifecycle.mock'; import { TaskPollingLifecycle } from './polling_lifecycle'; import type { TaskPollingLifecycle as TaskPollingLifecycleClass } from './polling_lifecycle'; @@ -40,6 +38,7 @@ jest.mock('./ephemeral_task_lifecycle', () => { const coreStart = coreMock.createStart(); const pluginInitializerContextParams = { + max_workers: 10, max_attempts: 9, poll_interval: 3000, version_conflict_threshold: 80, @@ -149,10 +148,7 @@ describe('TaskManagerPlugin', () => { pluginInitializerContext.node.roles.backgroundTasks = true; const taskManagerPlugin = new TaskManagerPlugin(pluginInitializerContext); taskManagerPlugin.setup(coreMock.createSetup(), { usageCollection: undefined }); - taskManagerPlugin.start(coreStart, { - serverless: serverlessPluginMock.createStartContract(), - cloud: cloudMock.createStart(), - }); + taskManagerPlugin.start(coreStart); expect(TaskPollingLifecycle as jest.Mock).toHaveBeenCalledTimes(1); expect( @@ -167,10 +163,7 @@ describe('TaskManagerPlugin', () => { pluginInitializerContext.node.roles.backgroundTasks = false; const taskManagerPlugin = new TaskManagerPlugin(pluginInitializerContext); taskManagerPlugin.setup(coreMock.createSetup(), { usageCollection: undefined }); - taskManagerPlugin.start(coreStart, { - serverless: serverlessPluginMock.createStartContract(), - cloud: cloudMock.createStart(), - }); + taskManagerPlugin.start(coreStart); expect(TaskPollingLifecycle as jest.Mock).not.toHaveBeenCalled(); expect( diff --git a/x-pack/plugins/task_manager/server/plugin.ts b/x-pack/plugins/task_manager/server/plugin.ts index a3a295169057d..1926b48b31ea6 100644 --- a/x-pack/plugins/task_manager/server/plugin.ts +++ b/x-pack/plugins/task_manager/server/plugin.ts @@ -18,8 +18,6 @@ import { ServiceStatusLevels, CoreStatus, } from '@kbn/core/server'; -import { ServerlessPluginStart } from '@kbn/serverless/server'; -import type { CloudStart } from '@kbn/cloud-plugin/server'; import { registerDeleteInactiveNodesTaskDefinition, scheduleDeleteInactiveNodesTaskDefinition, @@ -45,7 +43,6 @@ import { setupIntervalLogging } from './lib/log_health_metrics'; import { metricsStream, Metrics } from './metrics'; import { TaskManagerMetricsCollector } from './metrics/task_metrics_collector'; import { TaskPartitioner } from './lib/task_partitioner'; -import { getDefaultCapacity } from './lib/get_default_capacity'; export interface TaskManagerSetupContract { /** @@ -79,11 +76,6 @@ export type TaskManagerStartContract = Pick< getRegisteredTypes: () => string[]; }; -export interface TaskManagerPluginStart { - cloud?: CloudStart; - serverless?: ServerlessPluginStart; -} - const LogHealthForBackgroundTasksOnlyMinutes = 60; export class TaskManagerPlugin @@ -107,7 +99,6 @@ export class TaskManagerPlugin private taskManagerMetricsCollector?: TaskManagerMetricsCollector; private nodeRoles: PluginInitializerContext['node']['roles']; private kibanaDiscoveryService?: KibanaDiscoveryService; - private heapSizeLimit: number = 0; constructor(private readonly initContext: PluginInitializerContext) { this.initContext = initContext; @@ -131,13 +122,6 @@ export class TaskManagerPlugin ): TaskManagerSetupContract { this.elasticsearchAndSOAvailability$ = getElasticsearchAndSOAvailability(core.status.core$); - core.metrics - .getOpsMetrics$() - .pipe(distinctUntilChanged()) - .subscribe((metrics) => { - this.heapSizeLimit = metrics.process.memory.heap.size_limit; - }); - setupSavedObjects(core.savedObjects, this.config); this.taskManagerId = this.initContext.env.instanceUuid; @@ -248,10 +232,12 @@ export class TaskManagerPlugin }; } - public start( - { savedObjects, elasticsearch, executionContext, docLinks }: CoreStart, - { cloud, serverless }: TaskManagerPluginStart - ): TaskManagerStartContract { + public start({ + savedObjects, + elasticsearch, + executionContext, + docLinks, + }: CoreStart): TaskManagerStartContract { const savedObjectsRepository = savedObjects.createInternalRepository([ TASK_SO_NAME, BACKGROUND_TASK_NODE_SO_NAME, @@ -281,29 +267,11 @@ export class TaskManagerPlugin requestTimeouts: this.config.request_timeouts, }); - const defaultCapacity = getDefaultCapacity({ - claimStrategy: this.config?.claim_strategy, - heapSizeLimit: this.heapSizeLimit, - isCloud: cloud?.isCloudEnabled ?? false, - isServerless: !!serverless, - isBackgroundTaskNodeOnly: this.isNodeBackgroundTasksOnly(), - }); - - this.logger.info( - `Task manager isCloud=${ - cloud?.isCloudEnabled ?? false - } isServerless=${!!serverless} claimStrategy=${ - this.config!.claim_strategy - } isBackgroundTaskNodeOnly=${this.isNodeBackgroundTasksOnly()} heapSizeLimit=${ - this.heapSizeLimit - } defaultCapacity=${defaultCapacity}` - ); - const managedConfiguration = createManagedConfiguration({ - config: this.config!, - errors$: taskStore.errors$, - defaultCapacity, logger: this.logger, + errors$: taskStore.errors$, + startingMaxWorkers: this.config!.max_workers, + startingPollInterval: this.config!.poll_interval, }); // Only poll for tasks if configured to run tasks @@ -342,17 +310,16 @@ export class TaskManagerPlugin }); } - createMonitoringStats({ + createMonitoringStats( taskStore, - elasticsearchAndSOAvailability$: this.elasticsearchAndSOAvailability$!, - config: this.config!, - managedConfig: managedConfiguration, - logger: this.logger, - adHocTaskCounter: this.adHocTaskCounter, - taskDefinitions: this.definitions, - taskPollingLifecycle: this.taskPollingLifecycle, - ephemeralTaskLifecycle: this.ephemeralTaskLifecycle, - }).subscribe((stat) => this.monitoringStats$.next(stat)); + this.elasticsearchAndSOAvailability$!, + this.config!, + managedConfiguration, + this.logger, + this.adHocTaskCounter, + this.taskPollingLifecycle, + this.ephemeralTaskLifecycle + ).subscribe((stat) => this.monitoringStats$.next(stat)); metricsStream({ config: this.config!, diff --git a/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.test.ts b/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.test.ts index 11741aeadcf2d..f06c43bc15587 100644 --- a/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.test.ts +++ b/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.test.ts @@ -22,10 +22,10 @@ describe('delayOnClaimConflicts', () => { 'initializes with a delay of 0', fakeSchedulers(async () => { const pollInterval = 100; - const capacity = 10; + const maxWorkers = 10; const taskLifecycleEvents$ = new Subject(); const delays = delayOnClaimConflicts( - of(capacity), + of(maxWorkers), of(pollInterval), taskLifecycleEvents$, 80, @@ -42,11 +42,11 @@ describe('delayOnClaimConflicts', () => { 'emits a random delay whenever p50 of claim clashes exceed 80% of available max_workers', fakeSchedulers(async () => { const pollInterval = 100; - const capacity = 10; + const maxWorkers = 10; const taskLifecycleEvents$ = new Subject(); const delays$ = firstValueFrom( - delayOnClaimConflicts(of(capacity), of(pollInterval), taskLifecycleEvents$, 80, 2).pipe( + delayOnClaimConflicts(of(maxWorkers), of(pollInterval), taskLifecycleEvents$, 80, 2).pipe( take(2), bufferCount(2) ) @@ -60,6 +60,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 8, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) @@ -93,6 +94,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 8, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) @@ -109,6 +111,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 10, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) @@ -134,14 +137,18 @@ describe('delayOnClaimConflicts', () => { 'doesnt emit a new delay when conflicts have reduced', fakeSchedulers(async () => { const pollInterval = 100; - const capacity = 10; + const maxWorkers = 10; const taskLifecycleEvents$ = new Subject(); const handler = jest.fn(); - delayOnClaimConflicts(of(capacity), of(pollInterval), taskLifecycleEvents$, 80, 2).subscribe( - handler - ); + delayOnClaimConflicts( + of(maxWorkers), + of(pollInterval), + taskLifecycleEvents$, + 80, + 2 + ).subscribe(handler); await sleep(0); expect(handler).toHaveBeenCalledWith(0); @@ -154,6 +161,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 8, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) @@ -174,6 +182,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 7, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) @@ -192,6 +201,7 @@ describe('delayOnClaimConflicts', () => { tasksUpdated: 0, tasksConflicted: 9, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }) diff --git a/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.ts b/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.ts index 21b16b1a8d5c5..f491d58fc59ee 100644 --- a/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.ts +++ b/x-pack/plugins/task_manager/server/polling/delay_on_claim_conflicts.ts @@ -19,14 +19,13 @@ import { ManagedConfiguration } from '../lib/create_managed_configuration'; import { TaskLifecycleEvent } from '../polling_lifecycle'; import { isTaskPollingCycleEvent } from '../task_events'; import { ClaimAndFillPoolResult } from '../lib/fill_pool'; -import { createRunningAveragedStat } from '../monitoring/task_run_calculators'; -import { getCapacityInWorkers } from '../task_pool'; +import { createRunningAveragedStat } from '../monitoring/task_run_calcultors'; /** * Emits a delay amount in ms to apply to polling whenever the task store exceeds a threshold of claim claimClashes */ export function delayOnClaimConflicts( - capacityConfiguration$: ManagedConfiguration['capacityConfiguration$'], + maxWorkersConfiguration$: ManagedConfiguration['maxWorkersConfiguration$'], pollIntervalConfiguration$: ManagedConfiguration['pollIntervalConfiguration$'], taskLifecycleEvents$: Observable, claimClashesPercentageThreshold: number, @@ -38,7 +37,7 @@ export function delayOnClaimConflicts( merge( of(0), combineLatest([ - capacityConfiguration$, + maxWorkersConfiguration$, pollIntervalConfiguration$, taskLifecycleEvents$.pipe( map>((taskEvent: TaskLifecycleEvent) => @@ -52,10 +51,7 @@ export function delayOnClaimConflicts( map((claimClashes: Option) => (claimClashes as Some).value) ), ]).pipe( - map(([capacity, pollInterval, latestClaimConflicts]) => { - // convert capacity to maxWorkers - const maxWorkers = getCapacityInWorkers(capacity); - + map(([maxWorkers, pollInterval, latestClaimConflicts]) => { // add latest claimConflict count to queue claimConflictQueue(latestClaimConflicts); diff --git a/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts b/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts index e804f1c166cee..baf45cb65ea1e 100644 --- a/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts +++ b/x-pack/plugins/task_manager/server/polling_lifecycle.test.ts @@ -20,8 +20,6 @@ import { asOk, Err, isErr, isOk, Result } from './lib/result_type'; import { FillPoolResult } from './lib/fill_pool'; import { ElasticsearchResponseError } from './lib/identify_es_error'; import { executionContextServiceMock } from '@kbn/core/server/mocks'; -import { TaskCost } from './task'; -import { CLAIM_STRATEGY_MGET } from './config'; import { TaskPartitioner } from './lib/task_partitioner'; import { KibanaDiscoveryService } from './kibana_discovery_service'; @@ -46,6 +44,7 @@ describe('TaskPollingLifecycle', () => { const taskManagerOpts = { config: { enabled: true, + max_workers: 10, index: 'foo', max_attempts: 9, poll_interval: 6000000, @@ -91,8 +90,7 @@ describe('TaskPollingLifecycle', () => { unusedTypes: [], definitions: new TaskTypeDictionary(taskManagerLogger), middleware: createInitialMiddleware(), - startingCapacity: 20, - capacityConfiguration$: of(20), + maxWorkersConfiguration$: of(100), pollIntervalConfiguration$: of(100), executionContext, taskPartitioner: new TaskPartitioner('test', {} as KibanaDiscoveryService), @@ -107,23 +105,12 @@ describe('TaskPollingLifecycle', () => { afterEach(() => clock.restore()); describe('start', () => { - taskManagerOpts.definitions.registerTaskDefinitions({ - report: { - title: 'report', - maxConcurrency: 1, - cost: TaskCost.ExtraLarge, - createTaskRunner: jest.fn(), - }, - quickReport: { - title: 'quickReport', - maxConcurrency: 5, - createTaskRunner: jest.fn(), - }, - }); - test('begins polling once the ES and SavedObjects services are available', () => { const elasticsearchAndSOAvailability$ = new Subject(); - new TaskPollingLifecycle({ ...taskManagerOpts, elasticsearchAndSOAvailability$ }); + new TaskPollingLifecycle({ + ...taskManagerOpts, + elasticsearchAndSOAvailability$, + }); clock.tick(150); expect(mockTaskClaiming.claimAvailableTasksIfCapacityIsAvailable).not.toHaveBeenCalled(); @@ -134,70 +121,55 @@ describe('TaskPollingLifecycle', () => { expect(mockTaskClaiming.claimAvailableTasksIfCapacityIsAvailable).toHaveBeenCalled(); }); - test('provides TaskClaiming with the capacity available when strategy = CLAIM_STRATEGY_DEFAULT', () => { + test('provides TaskClaiming with the capacity available', () => { const elasticsearchAndSOAvailability$ = new Subject(); - const capacity$ = new Subject(); + const maxWorkers$ = new Subject(); + taskManagerOpts.definitions.registerTaskDefinitions({ + report: { + title: 'report', + maxConcurrency: 1, + createTaskRunner: jest.fn(), + }, + quickReport: { + title: 'quickReport', + maxConcurrency: 5, + createTaskRunner: jest.fn(), + }, + }); new TaskPollingLifecycle({ ...taskManagerOpts, elasticsearchAndSOAvailability$, - capacityConfiguration$: capacity$, + maxWorkersConfiguration$: maxWorkers$, }); const taskClaimingGetCapacity = (TaskClaiming as jest.Mock).mock - .calls[0][0].getAvailableCapacity; + .calls[0][0].getCapacity; - capacity$.next(40); - expect(taskClaimingGetCapacity()).toEqual(40); + maxWorkers$.next(20); + expect(taskClaimingGetCapacity()).toEqual(20); expect(taskClaimingGetCapacity('report')).toEqual(1); expect(taskClaimingGetCapacity('quickReport')).toEqual(5); - capacity$.next(60); - expect(taskClaimingGetCapacity()).toEqual(60); + maxWorkers$.next(30); + expect(taskClaimingGetCapacity()).toEqual(30); expect(taskClaimingGetCapacity('report')).toEqual(1); expect(taskClaimingGetCapacity('quickReport')).toEqual(5); - capacity$.next(4); - expect(taskClaimingGetCapacity()).toEqual(4); + maxWorkers$.next(2); + expect(taskClaimingGetCapacity()).toEqual(2); expect(taskClaimingGetCapacity('report')).toEqual(1); - expect(taskClaimingGetCapacity('quickReport')).toEqual(4); - }); - - test('provides TaskClaiming with the capacity available when strategy = CLAIM_STRATEGY_MGET', () => { - const elasticsearchAndSOAvailability$ = new Subject(); - const capacity$ = new Subject(); - - new TaskPollingLifecycle({ - ...taskManagerOpts, - config: { ...taskManagerOpts.config, claim_strategy: CLAIM_STRATEGY_MGET }, - elasticsearchAndSOAvailability$, - capacityConfiguration$: capacity$, - }); - - const taskClaimingGetCapacity = (TaskClaiming as jest.Mock).mock - .calls[0][0].getAvailableCapacity; - - capacity$.next(40); - expect(taskClaimingGetCapacity()).toEqual(80); - expect(taskClaimingGetCapacity('report')).toEqual(10); - expect(taskClaimingGetCapacity('quickReport')).toEqual(10); - - capacity$.next(60); - expect(taskClaimingGetCapacity()).toEqual(120); - expect(taskClaimingGetCapacity('report')).toEqual(10); - expect(taskClaimingGetCapacity('quickReport')).toEqual(10); - - capacity$.next(4); - expect(taskClaimingGetCapacity()).toEqual(8); - expect(taskClaimingGetCapacity('report')).toEqual(8); - expect(taskClaimingGetCapacity('quickReport')).toEqual(8); + expect(taskClaimingGetCapacity('quickReport')).toEqual(2); }); }); describe('stop', () => { test('stops polling once the ES and SavedObjects services become unavailable', () => { const elasticsearchAndSOAvailability$ = new Subject(); - new TaskPollingLifecycle({ elasticsearchAndSOAvailability$, ...taskManagerOpts }); + new TaskPollingLifecycle({ + elasticsearchAndSOAvailability$, + ...taskManagerOpts, + }); elasticsearchAndSOAvailability$.next(true); @@ -244,7 +216,7 @@ describe('TaskPollingLifecycle', () => { of( asOk({ docs: [], - stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0 }, + stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0, tasksRejected: 0 }, }) ) ); @@ -326,47 +298,7 @@ describe('TaskPollingLifecycle', () => { of( asOk({ docs: [], - stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0 }, - }) - ) - ); - const elasticsearchAndSOAvailability$ = new Subject(); - const taskPollingLifecycle = new TaskPollingLifecycle({ - ...taskManagerOpts, - elasticsearchAndSOAvailability$, - }); - - const emittedEvents: TaskLifecycleEvent[] = []; - - taskPollingLifecycle.events.subscribe((event: TaskLifecycleEvent) => - emittedEvents.push(event) - ); - - elasticsearchAndSOAvailability$.next(true); - expect(mockTaskClaiming.claimAvailableTasksIfCapacityIsAvailable).toHaveBeenCalled(); - await retryUntil('workerUtilizationEvent emitted', () => { - return !!emittedEvents.find( - (event: TaskLifecycleEvent) => event.id === 'workerUtilization' - ); - }); - - const workerUtilizationEvent = emittedEvents.find( - (event: TaskLifecycleEvent) => event.id === 'workerUtilization' - ); - expect(workerUtilizationEvent).toEqual({ - id: 'workerUtilization', - type: 'TASK_MANAGER_STAT', - event: { tag: 'ok', value: 0 }, - }); - }); - - test('should set utilization to max when capacity is not fully reached but there are tasks left unclaimed', async () => { - clock.restore(); - mockTaskClaiming.claimAvailableTasksIfCapacityIsAvailable.mockImplementation(() => - of( - asOk({ - docs: [], - stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0, tasksLeftUnclaimed: 2 }, + stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0, tasksRejected: 0 }, }) ) ); @@ -389,15 +321,6 @@ describe('TaskPollingLifecycle', () => { (event: TaskLifecycleEvent) => event.id === 'workerUtilization' ); }); - - const workerUtilizationEvent = emittedEvents.find( - (event: TaskLifecycleEvent) => event.id === 'workerUtilization' - ); - expect(workerUtilizationEvent).toEqual({ - id: 'workerUtilization', - type: 'TASK_MANAGER_STAT', - event: { tag: 'ok', value: 100 }, - }); }); test('should emit event when polling error occurs', async () => { diff --git a/x-pack/plugins/task_manager/server/polling_lifecycle.ts b/x-pack/plugins/task_manager/server/polling_lifecycle.ts index f13a7ad20806c..3b9c5621da0b9 100644 --- a/x-pack/plugins/task_manager/server/polling_lifecycle.ts +++ b/x-pack/plugins/task_manager/server/polling_lifecycle.ts @@ -45,8 +45,6 @@ import { TaskClaiming } from './queries/task_claiming'; import { ClaimOwnershipResult } from './task_claimers'; import { TaskPartitioner } from './lib/task_partitioner'; -const MAX_BUFFER_OPERATIONS = 100; - export interface ITaskEventEmitter { get events(): Observable; } @@ -103,7 +101,7 @@ export class TaskPollingLifecycle implements ITaskEventEmitter this.events$.next(event); this.bufferedStore = new BufferedTaskStore(this.store, { - bufferMaxOperations: MAX_BUFFER_OPERATIONS, + bufferMaxOperations: config.max_workers, logger, }); this.pool = new TaskPool({ logger, - strategy: config.claim_strategy, - capacity$: capacityConfiguration$, - definitions: this.definitions, + maxWorkers$: maxWorkersConfiguration$, }); this.pool.load.subscribe(emitEvent); @@ -146,7 +142,17 @@ export class TaskPollingLifecycle implements ITaskEventEmitter this.pool.availableCapacity(taskType), + getCapacity: (taskType?: string) => + taskType && this.definitions.get(taskType)?.maxConcurrency + ? Math.max( + Math.min( + this.pool.availableWorkers, + this.definitions.get(taskType)!.maxConcurrency! - + this.pool.getOccupiedWorkersByType(taskType) + ), + 0 + ) + : this.pool.availableWorkers, taskPartitioner, }); // pipe taskClaiming events into the lifecycle event stream @@ -157,7 +163,7 @@ export class TaskPollingLifecycle implements ITaskEventEmitter | undefined; if (claimStrategy === CLAIM_STRATEGY_DEFAULT) { pollIntervalDelay$ = delayOnClaimConflicts( - capacityConfiguration$, + maxWorkersConfiguration$, pollIntervalConfiguration$, this.events$, config.version_conflict_threshold, @@ -171,22 +177,19 @@ export class TaskPollingLifecycle implements ITaskEventEmitter { - const capacity = this.pool.availableCapacity(); + const capacity = this.pool.availableWorkers; if (!capacity) { - const usedCapacityPercentage = this.pool.usedCapacityPercentage; - // if there isn't capacity, emit a load event so that we can expose how often // high load causes the poller to skip work (work isn't called when there is no capacity) - this.emitEvent(asTaskManagerStatEvent('load', asOk(usedCapacityPercentage))); + this.emitEvent(asTaskManagerStatEvent('load', asOk(this.pool.workerLoad))); // Emit event indicating task manager utilization - this.emitEvent(asTaskManagerStatEvent('workerUtilization', asOk(usedCapacityPercentage))); + this.emitEvent(asTaskManagerStatEvent('workerUtilization', asOk(this.pool.workerLoad))); } return capacity; }, work: this.pollForWork, }); - this.subscribeToPoller(poller.events$); elasticsearchAndSOAvailability$.subscribe((areESAndSOAvailable) => { @@ -259,7 +262,7 @@ export class TaskPollingLifecycle implements ITaskEventEmitter { + mapOk(() => { // Emit event indicating task manager utilization % at the end of a polling cycle - - // Get the actual utilization as a percentage - let tmUtilization = this.pool.usedCapacityPercentage; - - // Check whether there are any tasks left unclaimed - // If we're not at capacity and there are unclaimed tasks, then - // there must be high cost tasks that need to be claimed - // Artificially inflate the utilization to represent the unclaimed load - if (tmUtilization < 100 && (results.stats?.tasksLeftUnclaimed ?? 0) > 0) { - tmUtilization = 100; - } - - this.emitEvent(asTaskManagerStatEvent('workerUtilization', asOk(tmUtilization))); + // This represents the number of workers busy + number of tasks claimed in this cycle + this.emitEvent(asTaskManagerStatEvent('workerUtilization', asOk(this.pool.workerLoad))); }) ) ) diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts index de57a73f80533..bc4adb71dd4a1 100644 --- a/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts +++ b/x-pack/plugins/task_manager/server/queries/task_claiming.test.ts @@ -80,7 +80,7 @@ describe('TaskClaiming', () => { unusedTypes: [], taskStore: taskStoreMock.create({ taskManagerId: '' }), maxAttempts: 2, - getAvailableCapacity: () => 10, + getCapacity: () => 10, taskPartitioner, }); @@ -130,7 +130,7 @@ describe('TaskClaiming', () => { unusedTypes: [], taskStore: taskStoreMock.create({ taskManagerId: '' }), maxAttempts: 2, - getAvailableCapacity: () => 10, + getCapacity: () => 10, taskPartitioner, }); diff --git a/x-pack/plugins/task_manager/server/queries/task_claiming.ts b/x-pack/plugins/task_manager/server/queries/task_claiming.ts index f5ef18452509b..188f47b0d2d2f 100644 --- a/x-pack/plugins/task_manager/server/queries/task_claiming.ts +++ b/x-pack/plugins/task_manager/server/queries/task_claiming.ts @@ -38,7 +38,7 @@ export interface TaskClaimingOpts { taskStore: TaskStore; maxAttempts: number; excludedTaskTypes: string[]; - getAvailableCapacity: (taskType?: string) => number; + getCapacity: (taskType?: string) => number; taskPartitioner: TaskPartitioner; } @@ -87,7 +87,7 @@ export class TaskClaiming { private definitions: TaskTypeDictionary; private events$: Subject; private taskStore: TaskStore; - private getAvailableCapacity: (taskType?: string) => number; + private getCapacity: (taskType?: string) => number; private logger: Logger; private readonly taskClaimingBatchesByType: TaskClaimingBatches; private readonly taskMaxAttempts: Record; @@ -106,7 +106,7 @@ export class TaskClaiming { this.definitions = opts.definitions; this.maxAttempts = opts.maxAttempts; this.taskStore = opts.taskStore; - this.getAvailableCapacity = opts.getAvailableCapacity; + this.getCapacity = opts.getCapacity; this.logger = opts.logger.get('taskClaiming'); this.taskClaimingBatchesByType = this.partitionIntoClaimingBatches(this.definitions); this.taskMaxAttempts = Object.fromEntries(this.normalizeMaxAttempts(this.definitions)); @@ -170,13 +170,13 @@ export class TaskClaiming { public claimAvailableTasksIfCapacityIsAvailable( claimingOptions: Omit ): Observable> { - if (this.getAvailableCapacity()) { + if (this.getCapacity()) { const opts: TaskClaimerOpts = { batches: this.getClaimingBatches(), claimOwnershipUntil: claimingOptions.claimOwnershipUntil, taskStore: this.taskStore, events$: this.events$, - getCapacity: this.getAvailableCapacity, + getCapacity: this.getCapacity, unusedTypes: this.unusedTypes, definitions: this.definitions, taskMaxAttempts: this.taskMaxAttempts, diff --git a/x-pack/plugins/task_manager/server/routes/health.test.ts b/x-pack/plugins/task_manager/server/routes/health.test.ts index 9c08c5b5fb4c4..a97d99079bc58 100644 --- a/x-pack/plugins/task_manager/server/routes/health.test.ts +++ b/x-pack/plugins/task_manager/server/routes/health.test.ts @@ -823,8 +823,7 @@ function mockHealthStats(overrides = {}) { configuration: { timestamp: new Date().toISOString(), value: { - capacity: { config: 10, as_cost: 20, as_workers: 10 }, - claim_strategy: 'default', + max_workers: 10, poll_interval: 3000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -842,19 +841,16 @@ function mockHealthStats(overrides = {}) { timestamp: new Date().toISOString(), value: { count: 4, - cost: 8, task_types: { - actions_telemetry: { count: 2, cost: 4, status: { idle: 2 } }, - alerting_telemetry: { count: 1, cost: 2, status: { idle: 1 } }, - session_cleanup: { count: 1, cost: 2, status: { idle: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 1, status: { idle: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, schedule: [], overdue: 0, - overdue_cost: 2, overdue_non_recurring: 0, estimatedScheduleDensity: [], non_recurring: 20, - non_recurring_cost: 40, owner_ids: [0, 0, 0, 1, 2, 0, 0, 2, 2, 2, 1, 2, 1, 1], estimated_schedule_density: [], capacity_requirements: { diff --git a/x-pack/plugins/task_manager/server/task.ts b/x-pack/plugins/task_manager/server/task.ts index 96df4a703c5f7..fae99bb8f1f5b 100644 --- a/x-pack/plugins/task_manager/server/task.ts +++ b/x-pack/plugins/task_manager/server/task.ts @@ -16,12 +16,6 @@ export enum TaskPriority { Normal = 50, } -export enum TaskCost { - Tiny = 1, - Normal = 2, - ExtraLarge = 10, -} - /* * Type definitions and validations for tasks. */ @@ -133,10 +127,6 @@ export const taskDefinitionSchema = schema.object( * Priority of this task type. Defaults to "NORMAL" if not defined */ priority: schema.maybe(schema.number()), - /** - * Cost to run this task type. Defaults to "Normal". - */ - cost: schema.number({ defaultValue: TaskCost.Normal }), /** * An optional more detailed description of what this task does. */ @@ -182,7 +172,7 @@ export const taskDefinitionSchema = schema.object( paramsSchema: schema.maybe(schema.any()), }, { - validate({ timeout, priority, cost }) { + validate({ timeout, priority }) { if (!isInterval(timeout) || isErr(tryAsResult(() => parseIntervalAsMillisecond(timeout)))) { return `Invalid timeout "${timeout}". Timeout must be of the form "{number}{cadance}" where number is an integer. Example: 5m.`; } @@ -192,12 +182,6 @@ export const taskDefinitionSchema = schema.object( .filter((key) => isNaN(Number(key))) .map((key) => `${key} => ${TaskPriority[key as keyof typeof TaskPriority]}`)}`; } - - if (cost && (!isNumber(cost) || !(cost in TaskCost))) { - return `Invalid cost "${cost}". Cost must be one of ${Object.keys(TaskCost) - .filter((key) => isNaN(Number(key))) - .map((key) => `${key} => ${TaskCost[key as keyof typeof TaskCost]}`)}`; - } }, } ); diff --git a/x-pack/plugins/task_manager/server/task_claimers/index.ts b/x-pack/plugins/task_manager/server/task_claimers/index.ts index 134c72041f96f..1caa6e2addb0f 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/index.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/index.ts @@ -37,7 +37,6 @@ export interface ClaimOwnershipResult { tasksUpdated: number; tasksConflicted: number; tasksClaimed: number; - tasksLeftUnclaimed?: number; }; docs: ConcreteTaskInstance[]; timing?: TaskTiming; @@ -62,12 +61,13 @@ export function getTaskClaimer(logger: Logger, strategy: string): TaskClaimerFn return claimAvailableTasksDefault; } -export function getEmptyClaimOwnershipResult(): ClaimOwnershipResult { +export function getEmptyClaimOwnershipResult() { return { stats: { tasksUpdated: 0, tasksConflicted: 0, tasksClaimed: 0, + tasksRejected: 0, }, docs: [], }; diff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_default.test.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_default.test.ts index d58fd83486efa..8aa206bbe1872 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/strategy_default.test.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_default.test.ts @@ -133,7 +133,7 @@ describe('TaskClaiming', () => { excludedTaskTypes, unusedTypes: unusedTaskTypes, maxAttempts: taskClaimingOpts.maxAttempts ?? 2, - getAvailableCapacity: taskClaimingOpts.getAvailableCapacity ?? (() => 10), + getCapacity: taskClaimingOpts.getCapacity ?? (() => 10), taskPartitioner, ...taskClaimingOpts, }); @@ -158,7 +158,7 @@ describe('TaskClaiming', () => { excludedTaskTypes?: string[]; unusedTaskTypes?: string[]; }) { - const getCapacity = taskClaimingOpts.getAvailableCapacity ?? (() => 10); + const getCapacity = taskClaimingOpts.getCapacity ?? (() => 10); const { taskClaiming, store } = initialiseTestClaiming({ storeOpts, taskClaimingOpts, @@ -447,7 +447,7 @@ if (doc['task.runAt'].size()!=0) { }, taskClaimingOpts: { maxAttempts, - getAvailableCapacity: (type) => { + getCapacity: (type) => { switch (type) { case 'limitedToOne': case 'anotherLimitedToOne': @@ -577,7 +577,7 @@ if (doc['task.runAt'].size()!=0) { }, taskClaimingOpts: { maxAttempts, - getAvailableCapacity: (type) => { + getCapacity: (type) => { switch (type) { case 'limitedToTwo': return 2; @@ -686,7 +686,7 @@ if (doc['task.runAt'].size()!=0) { }, taskClaimingOpts: { maxAttempts, - getAvailableCapacity: (type) => { + getCapacity: (type) => { switch (type) { case 'limitedToOne': case 'anotherLimitedToOne': @@ -1139,7 +1139,7 @@ if (doc['task.runAt'].size()!=0) { storeOpts: { taskManagerId, }, - taskClaimingOpts: { getAvailableCapacity: () => maxDocs }, + taskClaimingOpts: { getCapacity: () => maxDocs }, claimingOpts: { claimOwnershipUntil, }, @@ -1219,9 +1219,9 @@ if (doc['task.runAt'].size()!=0) { function instantiateStoreWithMockedApiResponses({ taskManagerId = uuidv4(), definitions = taskDefinitions, - getAvailableCapacity = () => 10, + getCapacity = () => 10, tasksClaimed, - }: Partial> & { + }: Partial> & { taskManagerId?: string; tasksClaimed?: ConcreteTaskInstance[][]; } = {}) { @@ -1254,7 +1254,7 @@ if (doc['task.runAt'].size()!=0) { unusedTypes: [], taskStore, maxAttempts: 2, - getAvailableCapacity, + getCapacity, taskPartitioner, }); diff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.test.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.test.ts index 2c4b5fd6a96c6..b58ea02893c10 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.test.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.test.ts @@ -15,11 +15,10 @@ import { ConcreteTaskInstance, ConcreteTaskInstanceVersion, TaskPriority, - TaskCost, } from '../task'; import { SearchOpts, StoreOpts } from '../task_store'; import { asTaskClaimEvent, TaskEvent } from '../task_events'; -import { asOk, asErr, isOk, unwrap } from '../lib/result_type'; +import { asOk, isOk, unwrap } from '../lib/result_type'; import { TaskTypeDictionary } from '../task_type_dictionary'; import { mockLogger } from '../test_utils'; import { @@ -34,7 +33,6 @@ import apm from 'elastic-apm-node'; import { TASK_MANAGER_TRANSACTION_TYPE } from '../task_running'; import { ClaimOwnershipResult } from '.'; import { FillPoolResult } from '../lib/fill_pool'; -import { SavedObjectsErrorHelpers } from '@kbn/core/server'; import { TaskPartitioner } from '../lib/task_partitioner'; import type { MustNotCondition } from '../queries/query_clauses'; import { @@ -54,7 +52,6 @@ jest.mock('../constants', () => ({ 'anotherLimitedToOne', 'limitedToTwo', 'limitedToFive', - 'yawn', ], })); @@ -77,18 +74,14 @@ const taskDefinitions = new TaskTypeDictionary(taskManagerLogger); taskDefinitions.registerTaskDefinitions({ report: { title: 'report', - cost: TaskCost.Normal, createTaskRunner: jest.fn(), }, dernstraight: { title: 'dernstraight', - cost: TaskCost.ExtraLarge, createTaskRunner: jest.fn(), }, yawn: { title: 'yawn', - cost: TaskCost.Tiny, - maxConcurrency: 1, createTaskRunner: jest.fn(), }, }); @@ -117,17 +110,6 @@ describe('TaskClaiming', () => { }); describe('claimAvailableTasks', () => { - function getVersionMapsFromTasks(tasks: ConcreteTaskInstance[]) { - const versionMap = new Map(); - const docLatestVersions = new Map(); - for (const task of tasks) { - versionMap.set(task.id, { esId: task.id, seqNo: 32, primaryTerm: 32 }); - docLatestVersions.set(`task:${task.id}`, { esId: task.id, seqNo: 32, primaryTerm: 32 }); - } - - return { versionMap, docLatestVersions }; - } - function initialiseTestClaiming({ storeOpts = {}, taskClaimingOpts = {}, @@ -148,27 +130,20 @@ describe('TaskClaiming', () => { store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); if (hits == null) hits = [generateFakeTasks(1)]; - - const docVersion = []; if (versionMaps == null) { - versionMaps = []; + versionMaps = [new Map()]; for (const oneHit of hits) { const map = new Map(); - const mapWithTaskPrefix = new Map(); + versionMaps.push(map); for (const task of oneHit) { map.set(task.id, { esId: task.id, seqNo: 32, primaryTerm: 32 }); - mapWithTaskPrefix.set(`task:${task.id}`, { esId: task.id, seqNo: 32, primaryTerm: 32 }); } - versionMaps.push(map); - docVersion.push(mapWithTaskPrefix); } } for (let i = 0; i < hits.length; i++) { store.fetch.mockResolvedValueOnce({ docs: hits[i], versionMap: versionMaps[i] }); - store.getDocVersions.mockResolvedValueOnce(docVersion[i]); - const oneBulkGetResult = hits[i].map((hit) => asOk(hit)); - store.bulkGet.mockResolvedValueOnce(oneBulkGetResult); + store.getDocVersions.mockResolvedValueOnce(versionMaps[i]); const oneBulkResult = hits[i].map((hit) => asOk(hit)); store.bulkUpdate.mockResolvedValueOnce(oneBulkResult); } @@ -181,7 +156,7 @@ describe('TaskClaiming', () => { excludedTaskTypes, unusedTypes: unusedTaskTypes, maxAttempts: taskClaimingOpts.maxAttempts ?? 2, - getAvailableCapacity: taskClaimingOpts.getAvailableCapacity ?? (() => 10), + getCapacity: taskClaimingOpts.getCapacity ?? (() => 10), taskPartitioner, ...taskClaimingOpts, }); @@ -228,14 +203,6 @@ describe('TaskClaiming', () => { return unwrap(resultOrErr) as ClaimOwnershipResult; }); - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(store.fetch.mock.calls).toMatchObject({}); - expect(store.getDocVersions.mock.calls).toMatchObject({}); return results.map((result, index) => ({ result, args: { @@ -322,1250 +289,8 @@ describe('TaskClaiming', () => { expect(result).toMatchObject({}); }); - test('should limit claimed tasks based on task cost and available capacity', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), // total cost = 2 - mockInstance({ id: `id-2`, taskType: 'report' }), // total cost = 4 - mockInstance({ id: `id-3`, taskType: 'yawn' }), // total cost = 5 - mockInstance({ id: `id-4`, taskType: 'dernstraight' }), // claiming this will exceed the available capacity - mockInstance({ id: `id-5`, taskType: 'report' }), - mockInstance({ id: `id-6`, taskType: 'report' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2]].map(asOk) - ); - store.bulkUpdate.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2]].map(asOk) - ); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 3; stale: 0; conflicts: 0; missing: 0; capacity reached: 3; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - 'task:id-5', - 'task:id-6', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[0].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-1', 'id-2', 'id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 3, - tasksConflicted: 0, - tasksUpdated: 3, - tasksLeftUnclaimed: 3, - }); - expect(result.docs.length).toEqual(3); - }); - - test('should not claim tasks of removed type', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[0], fetchedTasks[1]].map(asOk)); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: ['report'], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 1; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 2;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(2); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 1, - [ - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 2, - [ - { - ...fetchedTasks[0], - status: 'unrecognized', - }, - { - ...fetchedTasks[1], - status: 'unrecognized', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 1, - tasksConflicted: 0, - tasksUpdated: 1, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(1); - }); - - test('should log warning if error updating single removed task as unrecognized', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([ - asOk(fetchedTasks[0]), - // @ts-expect-error - asErr({ - type: 'task', - id: fetchedTasks[1].id, - error: SavedObjectsErrorHelpers.createBadRequestError(), - }), - ]); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: ['report'], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error updating task id-2:task to mark as unrecognized during claim: Bad Request', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 1; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 1;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(2); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 1, - [ - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 2, - [ - { - ...fetchedTasks[0], - status: 'unrecognized', - }, - { - ...fetchedTasks[1], - status: 'unrecognized', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 1, - tasksConflicted: 0, - tasksUpdated: 1, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(1); - }); - - test('should log warning if error updating all removed tasks as unrecognized', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockRejectedValueOnce(new Error('Oh no')); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: ['report'], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error updating tasks to mark as unrecognized during claim: Error: Oh no', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 1; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkGet).toHaveBeenCalledWith(['id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(2); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 1, - [ - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkUpdate).toHaveBeenNthCalledWith( - 2, - [ - { - ...fetchedTasks[0], - status: 'unrecognized', - }, - { - ...fetchedTasks[1], - status: 'unrecognized', - }, - ], - { validate: false, excludeLargeFields: true } - ); - - expect(result.stats).toEqual({ - tasksClaimed: 1, - tasksConflicted: 0, - tasksUpdated: 1, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(1); - }); - - test('should handle no tasks to claim', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks: ConcreteTaskInstance[] = []; - - const { versionMap } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).not.toHaveBeenCalled(); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).not.toHaveBeenCalled(); - expect(store.bulkGet).not.toHaveBeenCalled(); - expect(store.bulkUpdate).not.toHaveBeenCalled(); - - expect(result.stats).toEqual({ - tasksClaimed: 0, - tasksConflicted: 0, - tasksUpdated: 0, - }); - expect(result.docs.length).toEqual(0); - }); - - test('should handle tasks with no search version', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - versionMap.delete('id-1'); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 2; stale: 0; conflicts: 0; missing: 1; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-2', 'id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 2, - tasksConflicted: 0, - tasksUpdated: 2, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(2); - }); - - test('should handle tasks with no latest version', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - docLatestVersions.delete('task:id-1'); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 2; stale: 0; conflicts: 0; missing: 1; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-2', 'id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 2, - tasksConflicted: 0, - tasksUpdated: 2, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(2); - }); - - test('should handle stale tasks', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - docLatestVersions.set('task:id-1', { esId: 'task:id-1', seqNo: 33, primaryTerm: 33 }); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - store.bulkUpdate.mockResolvedValueOnce([fetchedTasks[1], fetchedTasks[2]].map(asOk)); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 2; stale: 1; conflicts: 1; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith(['task:id-1', 'task:id-2', 'task:id-3']); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-2', 'id-3']); - - expect(result.stats).toEqual({ - tasksClaimed: 2, - tasksConflicted: 1, - tasksUpdated: 2, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(2); - }); - - test('should correctly handle limited concurrency tasks', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - mockInstance({ id: `id-4`, taskType: 'yawn' }), - mockInstance({ id: `id-5`, taskType: 'report' }), - mockInstance({ id: `id-6`, taskType: 'yawn' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - - store.bulkGet.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2], fetchedTasks[4]].map(asOk) - ); - store.bulkUpdate.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2], fetchedTasks[4]].map(asOk) - ); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 4; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - 'task:id-5', - 'task:id-6', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[4], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-1', 'id-2', 'id-3', 'id-5']); - - expect(result.stats).toEqual({ - tasksClaimed: 4, - tasksConflicted: 0, - tasksUpdated: 4, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(4); - }); - - test('should handle individual errors when bulk getting the full task doc', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - mockInstance({ id: `id-4`, taskType: 'report' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - store.bulkUpdate.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2], fetchedTasks[3]].map(asOk) - ); - store.bulkGet.mockResolvedValueOnce([ - asOk(fetchedTasks[0]), - // @ts-expect-error - asErr({ - type: 'task', - id: fetchedTasks[1].id, - error: new Error('Oh no'), - }), - asOk(fetchedTasks[2]), - asOk(fetchedTasks[3]), - ]); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 3; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error getting full task id-2:task during claim: Oh no', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[0].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[3], - ownerId: 'test-test', - retryAt: fetchedTasks[3].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-1', 'id-2', 'id-3', 'id-4']); - - expect(result.stats).toEqual({ - tasksClaimed: 3, - tasksConflicted: 0, - tasksUpdated: 3, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(3); - }); - - test('should handle error when bulk getting all full task docs', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - mockInstance({ id: `id-4`, taskType: 'report' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - store.bulkUpdate.mockResolvedValueOnce( - [fetchedTasks[0], fetchedTasks[1], fetchedTasks[2], fetchedTasks[3]].map(asOk) - ); - store.bulkGet.mockRejectedValueOnce(new Error('oh no')); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 0; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error getting full task documents during claim: Error: oh no', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[0].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[3], - ownerId: 'test-test', - retryAt: fetchedTasks[3].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-1', 'id-2', 'id-3', 'id-4']); - - expect(result.stats).toEqual({ - tasksClaimed: 0, - tasksConflicted: 0, - tasksUpdated: 0, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(0); - }); - - test('should handle individual errors when bulk updating the task doc', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - mockInstance({ id: `id-4`, taskType: 'report' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - store.bulkUpdate.mockResolvedValueOnce([ - asOk(fetchedTasks[0]), - // @ts-expect-error - asErr({ - type: 'task', - id: fetchedTasks[1].id, - error: new Error('Oh no'), - }), - asOk(fetchedTasks[2]), - asOk(fetchedTasks[3]), - ]); - store.bulkGet.mockResolvedValueOnce([ - asOk(fetchedTasks[0]), - asOk(fetchedTasks[2]), - asOk(fetchedTasks[3]), - ]); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 3; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 1; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error updating task id-2:task during claim: Oh no', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[0].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[3], - ownerId: 'test-test', - retryAt: fetchedTasks[3].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith(['id-1', 'id-3', 'id-4']); - - expect(result.stats).toEqual({ - tasksClaimed: 3, - tasksConflicted: 0, - tasksUpdated: 3, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(3); - }); - - test('should handle error when bulk updating all task docs', async () => { - const store = taskStoreMock.create({ taskManagerId: 'test-test' }); - store.convertToSavedObjectIds.mockImplementation((ids) => ids.map((id) => `task:${id}`)); - - const fetchedTasks = [ - mockInstance({ id: `id-1`, taskType: 'report' }), - mockInstance({ id: `id-2`, taskType: 'report' }), - mockInstance({ id: `id-3`, taskType: 'yawn' }), - mockInstance({ id: `id-4`, taskType: 'report' }), - ]; - - const { versionMap, docLatestVersions } = getVersionMapsFromTasks(fetchedTasks); - store.fetch.mockResolvedValueOnce({ docs: fetchedTasks, versionMap }); - store.getDocVersions.mockResolvedValueOnce(docLatestVersions); - store.bulkUpdate.mockRejectedValueOnce(new Error('oh no')); - store.bulkGet.mockResolvedValueOnce([]); - - const taskClaiming = new TaskClaiming({ - logger: taskManagerLogger, - strategy: CLAIM_STRATEGY_MGET, - definitions: taskDefinitions, - taskStore: store, - excludedTaskTypes: [], - unusedTypes: [], - maxAttempts: 2, - getAvailableCapacity: () => 10, - taskPartitioner, - }); - - const [resultOrErr] = await getAllAsPromise( - taskClaiming.claimAvailableTasksIfCapacityIsAvailable({ claimOwnershipUntil: new Date() }) - ); - - if (!isOk(resultOrErr)) { - expect(resultOrErr).toBe(undefined); - } - - const result = unwrap(resultOrErr) as ClaimOwnershipResult; - - expect(apm.startTransaction).toHaveBeenCalledWith( - TASK_MANAGER_MARK_AS_CLAIMED, - TASK_MANAGER_TRANSACTION_TYPE - ); - expect(mockApmTrans.end).toHaveBeenCalledWith('success'); - - expect(taskManagerLogger.debug).toHaveBeenCalledWith( - 'task claimer claimed: 0; stale: 0; conflicts: 0; missing: 0; capacity reached: 0; updateErrors: 0; removed: 0;', - { tags: ['claimAvailableTasksMget'] } - ); - expect(taskManagerLogger.warn).toHaveBeenCalledWith( - 'Error updating tasks during claim: Error: oh no', - { tags: ['claimAvailableTasksMget'] } - ); - - expect(store.fetch.mock.calls[0][0]).toMatchObject({ size: 40, seq_no_primary_term: true }); - expect(store.getDocVersions).toHaveBeenCalledWith([ - 'task:id-1', - 'task:id-2', - 'task:id-3', - 'task:id-4', - ]); - expect(store.bulkUpdate).toHaveBeenCalledTimes(1); - expect(store.bulkUpdate).toHaveBeenCalledWith( - [ - { - ...fetchedTasks[0], - ownerId: 'test-test', - retryAt: fetchedTasks[0].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[1], - ownerId: 'test-test', - retryAt: fetchedTasks[1].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[2], - ownerId: 'test-test', - retryAt: fetchedTasks[2].runAt, - status: 'claiming', - }, - { - ...fetchedTasks[3], - ownerId: 'test-test', - retryAt: fetchedTasks[3].runAt, - status: 'claiming', - }, - ], - { validate: false, excludeLargeFields: true } - ); - expect(store.bulkGet).toHaveBeenCalledWith([]); - - expect(result.stats).toEqual({ - tasksClaimed: 0, - tasksConflicted: 0, - tasksUpdated: 0, - tasksLeftUnclaimed: 0, - }); - expect(result.docs.length).toEqual(0); - }); - test('it should filter for specific partitions and tasks without partitions', async () => { const taskManagerId = uuidv4(); - const definitions = new TaskTypeDictionary(mockLogger()); - definitions.registerTaskDefinitions({ - foo: { - title: 'foo', - createTaskRunner: jest.fn(), - }, - bar: { - title: 'bar', - createTaskRunner: jest.fn(), - }, - }); const [ { args: { @@ -1575,7 +300,6 @@ describe('TaskClaiming', () => { ] = await testClaimAvailableTasks({ storeOpts: { taskManagerId, - definitions, }, taskClaimingOpts: {}, claimingOpts: { @@ -1631,8 +355,9 @@ describe('TaskClaiming', () => { Object { "terms": Object { "task.taskType": Array [ - "foo", - "bar", + "report", + "dernstraight", + "yawn", ], }, }, @@ -1773,9 +498,9 @@ describe('TaskClaiming', () => { function instantiateStoreWithMockedApiResponses({ taskManagerId = uuidv4(), definitions = taskDefinitions, - getAvailableCapacity = () => 10, + getCapacity = () => 10, tasksClaimed, - }: Partial> & { + }: Partial> & { taskManagerId?: string; tasksClaimed?: ConcreteTaskInstance[][]; } = {}) { @@ -1808,7 +533,7 @@ describe('TaskClaiming', () => { unusedTypes: [], taskStore, maxAttempts: 2, - getAvailableCapacity, + getCapacity, taskPartitioner, }); diff --git a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts index 7962fdd2b6f8a..362c38166339f 100644 --- a/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts +++ b/x-pack/plugins/task_manager/server/task_claimers/strategy_mget.ts @@ -7,11 +7,9 @@ // Basic operation of this task claimer: // - search for candidate tasks to run, more than we actually can run -// - initial search returns a slimmer task document for I/O efficiency (no params or state) // - for each task found, do an mget to get the current seq_no and primary_term // - if the mget result doesn't match the search result, the task is stale -// - from the non-stale search results, return as many as we can run based on available -// capacity and the cost of each task type to run +// - from the non-stale search results, return as many as we can run import { SavedObjectsErrorHelpers } from '@kbn/core/server'; @@ -20,7 +18,7 @@ import { Subject, Observable } from 'rxjs'; import { TaskTypeDictionary } from '../task_type_dictionary'; import { TaskClaimerOpts, ClaimOwnershipResult, getEmptyClaimOwnershipResult } from '.'; -import { ConcreteTaskInstance, TaskStatus, ConcreteTaskInstanceVersion, TaskCost } from '../task'; +import { ConcreteTaskInstance, TaskStatus, ConcreteTaskInstanceVersion } from '../task'; import { TASK_MANAGER_TRANSACTION_TYPE } from '../task_running'; import { isLimited, @@ -114,10 +112,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise { + if (task.retryAt != null && new Date(task.retryAt).getTime() < Date.now()) { + task.scheduledAt = task.retryAt; + } else { + task.scheduledAt = task.runAt; + } + task.retryAt = claimOwnershipUntil; + task.ownerId = taskStore.taskManagerId; + task.status = TaskStatus.Claiming; + + return task; }); - } // perform the task object updates, deal with errors - const updatedTasks: ConcreteTaskInstance[] = []; + const finalResults: ConcreteTaskInstance[] = []; let conflicts = staleTasks.length; let bulkErrors = 0; try { - const updateResults = await taskStore.bulkUpdate(taskUpdates, { - validate: false, - excludeLargeFields: true, - }); + const updateResults = await taskStore.bulkUpdate(taskUpdates, { validate: false }); for (const updateResult of updateResults) { if (isOk(updateResult)) { - updatedTasks.push(updateResult.value); + finalResults.push(updateResult.value); } else { const { id, type, error } = updateResult.error; @@ -233,27 +209,6 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise task.id))).reduce< - ConcreteTaskInstance[] - >((acc, task) => { - if (isOk(task)) { - acc.push(task.value); - } else { - const { id, type, error } = task.error; - logger.warn( - `Error getting full task ${id}:${type} during claim: ${error.message}`, - logMeta - ); - } - return acc; - }, []); - } catch (err) { - logger.warn(`Error getting full task documents during claim: ${err}`, logMeta); - } - // separate update for removed tasks; shouldn't happen often, so unlikely // a performance concern, and keeps the rest of the logic simpler let removedCount = 0; @@ -265,10 +220,7 @@ async function claimAvailableTasks(opts: TaskClaimerOpts): Promise Partial<{ load: number; - usedCapacity: number; - usedCapacityPercentage: number; - availableCapacity: number; + occupiedWorkers: number; + workerLoad: number; + max: number; + availableWorkers: number; }> = () => ({ load: 0, - usedCapacity: 0, - usedCapacityPercentage: 0, - availableCapacity: 20, + occupiedWorkers: 0, + workerLoad: 0, + max: 10, + availableWorkers: 10, }); const createTaskPoolMock = (getCapacityOverride = defaultGetCapacityOverride) => { @@ -23,16 +25,19 @@ const createTaskPoolMock = (getCapacityOverride = defaultGetCapacityOverride) => get load() { return getCapacityOverride().load ?? 0; }, - get usedCapacity() { - return getCapacityOverride().usedCapacity ?? 0; + get occupiedWorkers() { + return getCapacityOverride().occupiedWorkers ?? 0; }, - get usedCapacityPercentage() { - return getCapacityOverride().usedCapacityPercentage ?? 0; + get workerLoad() { + return getCapacityOverride().workerLoad ?? 0; }, - availableCapacity() { - return getCapacityOverride().availableCapacity ?? 20; + get max() { + return getCapacityOverride().max ?? 10; }, - getUsedCapacityByType: jest.fn(), + get availableWorkers() { + return getCapacityOverride().availableWorkers ?? 10; + }, + getOccupiedWorkersByType: jest.fn(), run: jest.fn(), cancelRunningTasks: jest.fn(), } as unknown as jest.Mocked; diff --git a/x-pack/plugins/task_manager/server/task_pool.test.ts b/x-pack/plugins/task_manager/server/task_pool.test.ts new file mode 100644 index 0000000000000..5fb1325da3df9 --- /dev/null +++ b/x-pack/plugins/task_manager/server/task_pool.test.ts @@ -0,0 +1,471 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ +import sinon from 'sinon'; +import { of, Subject } from 'rxjs'; +import { TaskPool, TaskPoolRunResult } from './task_pool'; +import { resolvable, sleep } from './test_utils'; +import { loggingSystemMock } from '@kbn/core/server/mocks'; +import { Logger } from '@kbn/core/server'; +import { asOk } from './lib/result_type'; +import { SavedObjectsErrorHelpers } from '@kbn/core/server'; +import moment from 'moment'; +import { v4 as uuidv4 } from 'uuid'; +import { TaskRunningStage } from './task_running'; + +describe('TaskPool', () => { + beforeEach(() => { + jest.useFakeTimers(); + jest.setSystemTime(new Date(2021, 12, 30)); + }); + + afterEach(() => { + jest.useRealTimers(); + }); + + test('occupiedWorkers are a sum of running tasks', async () => { + const pool = new TaskPool({ + maxWorkers$: of(200), + logger: loggingSystemMock.create().get(), + }); + + const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); + + expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); + expect(pool.occupiedWorkers).toEqual(3); + }); + + test('availableWorkers are a function of total_capacity - occupiedWorkers', async () => { + const pool = new TaskPool({ + maxWorkers$: of(10), + logger: loggingSystemMock.create().get(), + }); + + const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); + + expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); + expect(pool.availableWorkers).toEqual(7); + }); + + test('availableWorkers is 0 until maxWorkers$ pushes a value', async () => { + const maxWorkers$ = new Subject(); + const pool = new TaskPool({ + maxWorkers$, + logger: loggingSystemMock.create().get(), + }); + + expect(pool.availableWorkers).toEqual(0); + maxWorkers$.next(10); + expect(pool.availableWorkers).toEqual(10); + }); + + test('does not run tasks that are beyond its available capacity', async () => { + const pool = new TaskPool({ + maxWorkers$: of(2), + logger: loggingSystemMock.create().get(), + }); + + const shouldRun = mockRun(); + const shouldNotRun = mockRun(); + + const result = await pool.run([ + { ...mockTask(), run: shouldRun }, + { ...mockTask(), run: shouldRun }, + { ...mockTask(), run: shouldNotRun }, + ]); + + expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); + expect(pool.availableWorkers).toEqual(0); + expect(shouldRun).toHaveBeenCalledTimes(2); + expect(shouldNotRun).not.toHaveBeenCalled(); + }); + + test('should log when marking a Task as running fails', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(2), + logger, + }); + + const taskFailedToMarkAsRunning = mockTask(); + taskFailedToMarkAsRunning.markTaskAsRunning.mockImplementation(async () => { + throw new Error(`Mark Task as running has failed miserably`); + }); + + const result = await pool.run([mockTask(), taskFailedToMarkAsRunning, mockTask()]); + + expect((logger as jest.Mocked).error.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "Failed to mark Task TaskType \\"shooooo\\" as running: Mark Task as running has failed miserably", + ] + `); + + expect(result).toEqual(TaskPoolRunResult.RunningAtCapacity); + }); + + test('should log when running a Task fails', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(3), + logger, + }); + + const taskFailedToRun = mockTask(); + taskFailedToRun.run.mockImplementation(async () => { + throw new Error(`Run Task has failed miserably`); + }); + + const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); + + expect((logger as jest.Mocked).warn.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "Task TaskType \\"shooooo\\" failed in attempt to run: Run Task has failed miserably", + ] + `); + + expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); + }); + + test('should not log when running a Task fails due to the Task SO having been deleted while in flight', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(3), + logger, + }); + + const taskFailedToRun = mockTask(); + taskFailedToRun.run.mockImplementation(async () => { + throw SavedObjectsErrorHelpers.createGenericNotFoundError('task', taskFailedToRun.id); + }); + + const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); + + expect(logger.debug).toHaveBeenCalledWith( + `Task TaskType "shooooo" failed in attempt to run: Saved object [task/${taskFailedToRun.id}] not found` + ); + expect(logger.warn).not.toHaveBeenCalled(); + + expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); + }); + + test('Running a task which fails still takes up capacity', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(1), + logger, + }); + + const taskFailedToRun = mockTask(); + taskFailedToRun.run.mockImplementation(async () => { + await sleep(0); + throw new Error(`Run Task has failed miserably`); + }); + + const result = await pool.run([taskFailedToRun, mockTask()]); + + expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); + }); + + test('clears up capacity when a task completes', async () => { + const pool = new TaskPool({ + maxWorkers$: of(1), + logger: loggingSystemMock.create().get(), + }); + + const firstWork = resolvable(); + const firstRun = sinon.spy(async () => { + await sleep(0); + firstWork.resolve(); + return asOk({ state: {} }); + }); + const secondWork = resolvable(); + const secondRun = sinon.spy(async () => { + await sleep(0); + secondWork.resolve(); + return asOk({ state: {} }); + }); + + const result = await pool.run([ + { ...mockTask(), run: firstRun }, + { ...mockTask(), run: secondRun }, + ]); + + expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); + expect(pool.occupiedWorkers).toEqual(1); + expect(pool.availableWorkers).toEqual(0); + + await firstWork; + sinon.assert.calledOnce(firstRun); + sinon.assert.notCalled(secondRun); + + expect(pool.occupiedWorkers).toEqual(0); + await pool.run([{ ...mockTask(), run: secondRun }]); + expect(pool.occupiedWorkers).toEqual(1); + + expect(pool.availableWorkers).toEqual(0); + + await secondWork; + + expect(pool.occupiedWorkers).toEqual(0); + expect(pool.availableWorkers).toEqual(1); + sinon.assert.calledOnce(secondRun); + }); + + test('run cancels expired tasks prior to running new tasks', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(2), + logger, + }); + + const haltUntilWeAfterFirstRun = resolvable(); + const taskHasExpired = resolvable(); + const haltTaskSoThatItCanBeCanceled = resolvable(); + + const shouldRun = sinon.spy(() => Promise.resolve()); + const shouldNotRun = sinon.spy(() => Promise.resolve()); + const now = new Date(); + const result = await pool.run([ + { + ...mockTask({ id: '1' }), + async run() { + await haltUntilWeAfterFirstRun; + this.isExpired = true; + taskHasExpired.resolve(); + await haltTaskSoThatItCanBeCanceled; + return asOk({ state: {} }); + }, + get expiration() { + return now; + }, + get startedAt() { + // 5 and a half minutes + return moment(now).subtract(5, 'm').subtract(30, 's').toDate(); + }, + cancel: shouldRun, + }, + { + ...mockTask({ id: '2' }), + async run() { + // halt here so that we can verify that this task is counted in `occupiedWorkers` + await haltUntilWeAfterFirstRun; + return asOk({ state: {} }); + }, + cancel: shouldNotRun, + }, + ]); + + expect(result).toEqual(TaskPoolRunResult.RunningAtCapacity); + expect(pool.occupiedWorkers).toEqual(2); + expect(pool.availableWorkers).toEqual(0); + + // release first stage in task so that it has time to expire, but not complete + haltUntilWeAfterFirstRun.resolve(); + await taskHasExpired; + + expect(await pool.run([{ ...mockTask({ id: '3' }) }])).toBeTruthy(); + + sinon.assert.calledOnce(shouldRun); + sinon.assert.notCalled(shouldNotRun); + + expect(pool.occupiedWorkers).toEqual(1); + expect(pool.availableWorkers).toEqual(1); + + haltTaskSoThatItCanBeCanceled.resolve(); + + expect(logger.warn).toHaveBeenCalledWith( + `Cancelling task TaskType "shooooo" as it expired at ${now.toISOString()} after running for 05m 30s (with timeout set at 5m).` + ); + }); + + test('calls to availableWorkers ensures we cancel expired tasks', async () => { + const pool = new TaskPool({ + maxWorkers$: of(1), + logger: loggingSystemMock.create().get(), + }); + + const taskIsRunning = resolvable(); + const taskHasExpired = resolvable(); + const cancel = sinon.spy(() => Promise.resolve()); + const now = new Date(); + expect( + await pool.run([ + { + ...mockTask(), + async run() { + await sleep(10); + this.isExpired = true; + taskIsRunning.resolve(); + await taskHasExpired; + return asOk({ state: {} }); + }, + get expiration() { + return new Date(now.getTime() + 10); + }, + get startedAt() { + return now; + }, + cancel, + }, + ]) + ).toEqual(TaskPoolRunResult.RunningAtCapacity); + + await taskIsRunning; + + sinon.assert.notCalled(cancel); + expect(pool.occupiedWorkers).toEqual(1); + // The call to `availableWorkers` will clear the expired task so it's 1 instead of 0 + expect(pool.availableWorkers).toEqual(1); + sinon.assert.calledOnce(cancel); + + expect(pool.occupiedWorkers).toEqual(0); + expect(pool.availableWorkers).toEqual(1); + // ensure cancel isn't called twice + sinon.assert.calledOnce(cancel); + taskHasExpired.resolve(); + }); + + test('logs if cancellation errors', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + logger, + maxWorkers$: of(20), + }); + + const cancelled = resolvable(); + const result = await pool.run([ + { + ...mockTask(), + async run() { + this.isExpired = true; + await sleep(10); + return asOk({ state: {} }); + }, + async cancel() { + cancelled.resolve(); + throw new Error('Dern!'); + }, + toString: () => '"shooooo!"', + }, + ]); + + expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); + await pool.run([]); + + expect(pool.occupiedWorkers).toEqual(0); + + // Allow the task to cancel... + await cancelled; + + expect((logger as jest.Mocked).error.mock.calls[0][0]).toMatchInlineSnapshot( + `"Failed to cancel task \\"shooooo!\\": Error: Dern!"` + ); + }); + + test('only allows one task with the same id in the task pool', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(2), + logger, + }); + + const shouldRun = mockRun(); + const shouldNotRun = mockRun(); + + const taskId = uuidv4(); + const task1 = mockTask({ id: taskId, run: shouldRun }); + const task2 = mockTask({ + id: taskId, + run: shouldNotRun, + isSameTask() { + return true; + }, + }); + + await pool.run([task1]); + await pool.run([task2]); + + expect(shouldRun).toHaveBeenCalledTimes(1); + expect(shouldNotRun).not.toHaveBeenCalled(); + }); + + // This test is from https://github.com/elastic/kibana/issues/172116 + // It's not clear how to reproduce the actual error, but it is easy to + // reproduce with the wacky test below. It does log the exact error + // from that issue, without the corresponding fix in task_pool.ts + test('works when available workers is 0 but there are tasks to run', async () => { + const logger = loggingSystemMock.create().get(); + const pool = new TaskPool({ + maxWorkers$: of(2), + logger, + }); + + const shouldRun = mockRun(); + + const taskId = uuidv4(); + const task1 = mockTask({ id: taskId, run: shouldRun }); + + // we need to alternate the values of `availableWorkers`. First it + // should be 0, then 1, then 0, then 1, etc. This will cause task_pool.run + // to partition tasks (0 to run, everything as leftover), then at the + // end of run(), to check if it should recurse, it should be > 0. + let awValue = 1; + Object.defineProperty(pool, 'availableWorkers', { + get() { + return ++awValue % 2; + }, + }); + + const result = await pool.run([task1]); + expect(result).toBe(TaskPoolRunResult.RanOutOfCapacity); + + expect((logger as jest.Mocked).warn.mock.calls[0]).toMatchInlineSnapshot(` + Array [ + "task pool run attempts exceeded 3; assuming ran out of capacity; availableWorkers: 0, tasksToRun: 0, leftOverTasks: 1, maxWorkers: 2, occupiedWorkers: 0, workerLoad: 0", + ] + `); + }); + + function mockRun() { + return jest.fn(async () => { + await sleep(0); + return asOk({ state: {} }); + }); + } + + function mockTask(overrides = {}) { + return { + isExpired: false, + taskExecutionId: uuidv4(), + id: uuidv4(), + cancel: async () => undefined, + markTaskAsRunning: jest.fn(async () => true), + run: mockRun(), + stage: TaskRunningStage.PENDING, + toString: () => `TaskType "shooooo"`, + isAdHocTaskAndOutOfAttempts: false, + removeTask: jest.fn(), + get expiration() { + return new Date(); + }, + get startedAt() { + return new Date(); + }, + get definition() { + return { + type: '', + title: '', + timeout: '5m', + createTaskRunner: jest.fn(), + }; + }, + isSameTask() { + return false; + }, + ...overrides, + }; + } +}); diff --git a/x-pack/plugins/task_manager/server/task_pool/task_pool.ts b/x-pack/plugins/task_manager/server/task_pool.ts similarity index 73% rename from x-pack/plugins/task_manager/server/task_pool/task_pool.ts rename to x-pack/plugins/task_manager/server/task_pool.ts index 493aaa77ab41b..c0784f0458f72 100644 --- a/x-pack/plugins/task_manager/server/task_pool/task_pool.ts +++ b/x-pack/plugins/task_manager/server/task_pool.ts @@ -13,20 +13,13 @@ import { Observable, Subject } from 'rxjs'; import moment, { Duration } from 'moment'; import { padStart } from 'lodash'; import { Logger } from '@kbn/core/server'; -import { TaskRunner } from '../task_running'; -import { isTaskSavedObjectNotFoundError } from '../lib/is_task_not_found_error'; -import { TaskManagerStat } from '../task_events'; -import { ICapacity } from './types'; -import { CLAIM_STRATEGY_MGET } from '../config'; -import { WorkerCapacity } from './worker_capacity'; -import { CostCapacity } from './cost_capacity'; -import { TaskTypeDictionary } from '../task_type_dictionary'; +import { TaskRunner } from './task_running'; +import { isTaskSavedObjectNotFoundError } from './lib/is_task_not_found_error'; +import { TaskManagerStat } from './task_events'; -interface TaskPoolOpts { - capacity$: Observable; - definitions: TaskTypeDictionary; +interface Opts { + maxWorkers$: Observable; logger: Logger; - strategy: string; } export enum TaskPoolRunResult { @@ -41,43 +34,31 @@ export enum TaskPoolRunResult { } const VERSION_CONFLICT_MESSAGE = 'Task has been claimed by another Kibana service'; +const MAX_RUN_ATTEMPTS = 3; /** * Runs tasks in batches, taking costs into account. */ export class TaskPool { + private maxWorkers: number = 0; private tasksInPool = new Map(); private logger: Logger; private load$ = new Subject(); - private definitions: TaskTypeDictionary; - private capacityCalculator: ICapacity; /** * Creates an instance of TaskPool. * * @param {Opts} opts - * @prop {number} capacity - The total capacity available - * (e.g. capacity is 4, then 2 tasks of cost 2 can run at a time, or 4 tasks of cost 1) + * @prop {number} maxWorkers - The total number of workers / work slots available + * (e.g. maxWorkers is 4, then 2 tasks of cost 2 can run at a time, or 4 tasks of cost 1) * @prop {Logger} logger - The task manager logger. */ - constructor(opts: TaskPoolOpts) { + constructor(opts: Opts) { this.logger = opts.logger; - this.definitions = opts.definitions; - - switch (opts.strategy) { - case CLAIM_STRATEGY_MGET: - this.capacityCalculator = new CostCapacity({ - capacity$: opts.capacity$, - logger: this.logger, - }); - break; - - default: - this.capacityCalculator = new WorkerCapacity({ - capacity$: opts.capacity$, - logger: this.logger, - }); - } + opts.maxWorkers$.subscribe((maxWorkers) => { + this.logger.debug(`Task pool now using ${maxWorkers} as the max worker value`); + this.maxWorkers = maxWorkers; + }); } public get load(): Observable { @@ -85,39 +66,38 @@ export class TaskPool { } /** - * Gets how much capacity is currently in use. + * Gets how many workers are currently in use. */ - public get usedCapacity() { - return this.capacityCalculator.usedCapacity(this.tasksInPool); + public get occupiedWorkers() { + return this.tasksInPool.size; } /** - * Gets how much capacity is currently in use as a percentage + * Gets % of workers in use */ - public get usedCapacityPercentage() { - return this.capacityCalculator.usedCapacityPercentage(this.tasksInPool); + public get workerLoad() { + return this.maxWorkers ? Math.round((this.occupiedWorkers * 100) / this.maxWorkers) : 100; } /** - * Gets how much capacity is currently available. + * Gets how many workers are currently available. */ - public availableCapacity(taskType?: string) { + public get availableWorkers() { // cancel expired task whenever a call is made to check for capacity // this ensures that we don't end up with a queue of hung tasks causing both // the poller and the pool from hanging due to lack of capacity this.cancelExpiredTasks(); - - return this.capacityCalculator.availableCapacity( - this.tasksInPool, - taskType ? this.definitions.get(taskType) : null - ); + return this.maxWorkers - this.occupiedWorkers; } /** - * Gets how much capacity is currently in use by each type. + * Gets how many workers are currently in use by type. */ - public getUsedCapacityByType(type: string) { - return this.capacityCalculator.getUsedCapacityByType([...this.tasksInPool.values()], type); + public getOccupiedWorkersByType(type: string) { + return [...this.tasksInPool.values()].reduce( + (count, runningTask) => (runningTask.definition.type === type ? ++count : count), + 0 + ); } /** @@ -128,14 +108,26 @@ export class TaskPool { * @param {TaskRunner[]} tasks * @returns {Promise} */ - public async run(tasks: TaskRunner[]): Promise { - // Note `this.availableCapacity` has side effects, so we just want + public async run(tasks: TaskRunner[], attempt = 1): Promise { + // Note `this.availableWorkers` is a getter with side effects, so we just want // to call it once for this bit of the code. - const availableCapacity = this.availableCapacity(); - const [tasksToRun, leftOverTasks] = this.capacityCalculator.determineTasksToRunBasedOnCapacity( - tasks, - availableCapacity - ); + const availableWorkers = this.availableWorkers; + const [tasksToRun, leftOverTasks] = partitionListByCount(tasks, availableWorkers); + + if (attempt > MAX_RUN_ATTEMPTS) { + const stats = [ + `availableWorkers: ${availableWorkers}`, + `tasksToRun: ${tasksToRun.length}`, + `leftOverTasks: ${leftOverTasks.length}`, + `maxWorkers: ${this.maxWorkers}`, + `occupiedWorkers: ${this.occupiedWorkers}`, + `workerLoad: ${this.workerLoad}`, + ].join(', '); + this.logger.warn( + `task pool run attempts exceeded ${MAX_RUN_ATTEMPTS}; assuming ran out of capacity; ${stats}` + ); + return TaskPoolRunResult.RanOutOfCapacity; + } if (tasksToRun.length) { await Promise.all( @@ -171,10 +163,11 @@ export class TaskPool { } if (leftOverTasks.length) { - // leave any leftover tasks - // they will be available for claiming in 30 seconds + if (this.availableWorkers) { + return this.run(leftOverTasks, attempt + 1); + } return TaskPoolRunResult.RanOutOfCapacity; - } else if (!this.availableCapacity()) { + } else if (!this.availableWorkers) { return TaskPoolRunResult.RunningAtCapacity; } return TaskPoolRunResult.RunningAllClaimedTasks; @@ -249,6 +242,11 @@ export class TaskPool { } } +function partitionListByCount(list: T[], count: number): [T[], T[]] { + const listInCount = list.splice(0, count); + return [listInCount, list]; +} + function durationAsString(duration: Duration): string { const [m, s] = [duration.minutes(), duration.seconds()].map((value) => padStart(`${value}`, 2, '0') diff --git a/x-pack/plugins/task_manager/server/task_pool/capacity.mock.ts b/x-pack/plugins/task_manager/server/task_pool/capacity.mock.ts deleted file mode 100644 index ed3fd3b07f07c..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/capacity.mock.ts +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -const createCapacityMock = () => { - return jest.fn().mockImplementation(() => { - return { - determineTasksToRunBasedOnCapacity: jest.fn(), - getUsedCapacityByType: jest.fn(), - usedCapacityPercentage: jest.fn(), - usedCapacity: jest.fn(), - capacity: jest.fn(), - }; - }); -}; - -export const capacityMock = { - create: createCapacityMock(), -}; diff --git a/x-pack/plugins/task_manager/server/task_pool/cost_capacity.test.ts b/x-pack/plugins/task_manager/server/task_pool/cost_capacity.test.ts deleted file mode 100644 index b40c6eb2af37d..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/cost_capacity.test.ts +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { of, Subject } from 'rxjs'; -import { TaskCost } from '../task'; -import { CostCapacity } from './cost_capacity'; -import { mockTask } from './test_utils'; - -const logger = loggingSystemMock.create().get(); - -describe('CostCapacity', () => { - beforeEach(() => { - jest.resetAllMocks(); - }); - - test('capacity responds to changes from capacity$ observable', () => { - const capacity$ = new Subject(); - const pool = new CostCapacity({ capacity$, logger }); - - expect(pool.capacity).toBe(0); - - capacity$.next(20); - expect(pool.capacity).toBe(40); - - capacity$.next(16); - expect(pool.capacity).toBe(32); - - expect(logger.debug).toHaveBeenCalledTimes(2); - expect(logger.debug).toHaveBeenNthCalledWith( - 1, - `Task pool now using 40 as the max allowed cost which is based on a capacity of 20` - ); - expect(logger.debug).toHaveBeenNthCalledWith( - 2, - `Task pool now using 32 as the max allowed cost which is based on a capacity of 16` - ); - }); - - test('usedCapacity returns the sum of costs of tasks in the pool', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.usedCapacity(tasksInPool)).toBe(5); - }); - - test('usedCapacityPercentage returns the percentage of capacity used based on cost of tasks in the pool', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.usedCapacityPercentage(tasksInPool)).toBe(25); - }); - - test('usedCapacityByType returns the sum of of costs of tasks of specified type in the pool', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = [ - { ...mockTask({}, { type: 'type1' }) }, - { ...mockTask({}, { type: 'type1', cost: TaskCost.Tiny }) }, - { ...mockTask({}, { type: 'type2' }) }, - ]; - - expect(pool.getUsedCapacityByType(tasksInPool, 'type1')).toBe(3); - expect(pool.getUsedCapacityByType(tasksInPool, 'type2')).toBe(2); - expect(pool.getUsedCapacityByType(tasksInPool, 'type3')).toBe(0); - }); - - test('availableCapacity returns the full available capacity when no task type is defined', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.availableCapacity(tasksInPool)).toBe(15); - }); - - test('availableCapacity returns the full available capacity when task type with no maxConcurrency is provided', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect( - pool.availableCapacity(tasksInPool, { - type: 'type1', - cost: TaskCost.Normal, - createTaskRunner: jest.fn(), - timeout: '5m', - }) - ).toBe(15); - }); - - test('availableCapacity returns the available capacity for the task type when task type with maxConcurrency is provided', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask({}, { type: 'type1' }) }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect( - pool.availableCapacity(tasksInPool, { - type: 'type1', - maxConcurrency: 3, - cost: TaskCost.Normal, - createTaskRunner: jest.fn(), - timeout: '5m', - }) - ).toBe(4); - }); - - describe('determineTasksToRunBasedOnCapacity', () => { - test('runs all tasks if there is capacity', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - const tasks = [{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 20); - - expect(tasksToRun).toEqual(tasks); - expect(leftoverTasks).toEqual([]); - }); - - test('runs task in order until capacity is reached', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - const tasks = [ - { ...mockTask() }, - { ...mockTask() }, - { ...mockTask() }, - { ...mockTask({}, { cost: TaskCost.ExtraLarge }) }, - { ...mockTask({}, { cost: TaskCost.ExtraLarge }) }, - // technically have capacity for these tasks if we skip the previous task, but we're running - // in order to avoid possibly starving large cost tasks - { ...mockTask() }, - { ...mockTask() }, - ]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 20); - - expect(tasksToRun).toEqual([tasks[0], tasks[1], tasks[2], tasks[3]]); - expect(leftoverTasks).toEqual([tasks[4], tasks[5], tasks[6]]); - }); - - test('does not run tasks if there is no capacity', () => { - const pool = new CostCapacity({ capacity$: of(10), logger }); - const tasks = [{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 1); - - expect(tasksToRun).toEqual([]); - expect(leftoverTasks).toEqual(tasks); - }); - }); -}); diff --git a/x-pack/plugins/task_manager/server/task_pool/cost_capacity.ts b/x-pack/plugins/task_manager/server/task_pool/cost_capacity.ts deleted file mode 100644 index 8073cb374c5ff..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/cost_capacity.ts +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { Logger } from '@kbn/core/server'; -import { TaskDefinition } from '../task'; -import { TaskRunner } from '../task_running'; -import { CapacityOpts, ICapacity } from './types'; -import { getCapacityInCost } from './utils'; - -export class CostCapacity implements ICapacity { - private maxAllowedCost: number = 0; - private logger: Logger; - - constructor(opts: CapacityOpts) { - this.logger = opts.logger; - opts.capacity$.subscribe((capacity) => { - // Capacity config describes the number of normal-cost tasks that can be - // run simulatenously. Multiple by the cost of a normal cost to determine - // the maximum allowed cost - this.maxAllowedCost = getCapacityInCost(capacity); - this.logger.debug( - `Task pool now using ${this.maxAllowedCost} as the max allowed cost which is based on a capacity of ${capacity}` - ); - }); - } - - public get capacity(): number { - return this.maxAllowedCost; - } - - /** - * Gets how much capacity is currently in use. - */ - public usedCapacity(tasksInPool: Map) { - let result = 0; - tasksInPool.forEach((task) => { - result += task.definition.cost; - }); - return result; - } - - /** - * Gets % of capacity in use - */ - public usedCapacityPercentage(tasksInPool: Map) { - return this.capacity ? Math.round((this.usedCapacity(tasksInPool) * 100) / this.capacity) : 100; - } - - /** - * Gets how much capacity is currently in use by each type. - */ - public getUsedCapacityByType(tasksInPool: TaskRunner[], type: string) { - return tasksInPool.reduce( - (count, runningTask) => - runningTask.definition.type === type ? count + runningTask.definition.cost : count, - 0 - ); - } - - public availableCapacity( - tasksInPool: Map, - taskDefinition?: TaskDefinition | null - ): number { - const allAvailableCapacity = this.capacity - this.usedCapacity(tasksInPool); - if (taskDefinition && taskDefinition.maxConcurrency) { - // calculate the max capacity that can be used for this task type based on cost - const maxCapacityForType = taskDefinition.maxConcurrency * taskDefinition.cost; - return Math.max( - Math.min( - allAvailableCapacity, - maxCapacityForType - - this.getUsedCapacityByType([...tasksInPool.values()], taskDefinition.type) - ), - 0 - ); - } - - return allAvailableCapacity; - } - - public determineTasksToRunBasedOnCapacity( - tasks: TaskRunner[], - availableCapacity: number - ): [TaskRunner[], TaskRunner[]] { - const tasksToRun: TaskRunner[] = []; - const leftOverTasks: TaskRunner[] = []; - - let capacityAccumulator = 0; - for (const task of tasks) { - const taskCost = task.definition.cost; - if (capacityAccumulator + taskCost <= availableCapacity) { - tasksToRun.push(task); - capacityAccumulator += taskCost; - } else { - leftOverTasks.push(task); - // Don't claim further tasks even if lower cost tasks are next. - // It may be an extra large task and we need to make room for it - // for the next claiming cycle - capacityAccumulator = availableCapacity; - } - } - - return [tasksToRun, leftOverTasks]; - } -} diff --git a/x-pack/plugins/task_manager/server/task_pool/task_pool.test.ts b/x-pack/plugins/task_manager/server/task_pool/task_pool.test.ts deleted file mode 100644 index e2936b7ccec0a..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/task_pool.test.ts +++ /dev/null @@ -1,867 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import sinon from 'sinon'; -import { of, Subject } from 'rxjs'; -import { TaskPool, TaskPoolRunResult } from './task_pool'; -import { resolvable, sleep } from '../test_utils'; -import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { Logger } from '@kbn/core/server'; -import { asOk } from '../lib/result_type'; -import { SavedObjectsErrorHelpers } from '@kbn/core/server'; -import moment from 'moment'; -import { v4 as uuidv4 } from 'uuid'; -import { TaskCost } from '../task'; -import * as CostCapacityModule from './cost_capacity'; -import * as WorkerCapacityModule from './worker_capacity'; -import { capacityMock } from './capacity.mock'; -import { CLAIM_STRATEGY_DEFAULT, CLAIM_STRATEGY_MGET } from '../config'; -import { mockRun, mockTask } from './test_utils'; -import { TaskTypeDictionary } from '../task_type_dictionary'; - -jest.mock('../constants', () => ({ - CONCURRENCY_ALLOW_LIST_BY_TASK_TYPE: ['report', 'quickReport'], -})); - -describe('TaskPool', () => { - const costCapacityMock = capacityMock.create(); - const workerCapacityMock = capacityMock.create(); - const logger = loggingSystemMock.create().get(); - - const definitions = new TaskTypeDictionary(logger); - definitions.registerTaskDefinitions({ - report: { - title: 'report', - maxConcurrency: 1, - cost: TaskCost.ExtraLarge, - createTaskRunner: jest.fn(), - }, - quickReport: { - title: 'quickReport', - maxConcurrency: 5, - createTaskRunner: jest.fn(), - }, - }); - - beforeEach(() => { - jest.resetAllMocks(); - jest.useFakeTimers(); - jest.setSystemTime(new Date(2021, 12, 30)); - }); - - afterEach(() => { - jest.useRealTimers(); - }); - - describe('uses the correct capacity calculator based on the strategy', () => { - let costCapacitySpy: jest.SpyInstance; - let workerCapacitySpy: jest.SpyInstance; - beforeEach(() => { - costCapacitySpy = jest - .spyOn(CostCapacityModule, 'CostCapacity') - .mockImplementation(() => costCapacityMock); - - workerCapacitySpy = jest - .spyOn(WorkerCapacityModule, 'WorkerCapacity') - .mockImplementation(() => workerCapacityMock); - }); - - afterEach(() => { - costCapacitySpy.mockRestore(); - workerCapacitySpy.mockRestore(); - }); - - test('uses CostCapacity to calculate capacity when strategy is mget', () => { - new TaskPool({ capacity$: of(20), definitions, logger, strategy: CLAIM_STRATEGY_MGET }); - - expect(CostCapacityModule.CostCapacity).toHaveBeenCalledTimes(1); - expect(WorkerCapacityModule.WorkerCapacity).not.toHaveBeenCalled(); - }); - - test('uses WorkerCapacity to calculate capacity when strategy is default', () => { - new TaskPool({ capacity$: of(20), definitions, logger, strategy: CLAIM_STRATEGY_DEFAULT }); - - expect(CostCapacityModule.CostCapacity).not.toHaveBeenCalled(); - expect(WorkerCapacityModule.WorkerCapacity).toHaveBeenCalledTimes(1); - }); - - test('uses WorkerCapacity to calculate capacity when strategy is unrecognized', () => { - new TaskPool({ capacity$: of(20), definitions, logger, strategy: 'any old strategy' }); - - expect(CostCapacityModule.CostCapacity).not.toHaveBeenCalled(); - expect(WorkerCapacityModule.WorkerCapacity).toHaveBeenCalledTimes(1); - }); - }); - - describe('with CLAIM_STRATEGY_DEFAULT', () => { - test('usedCapacity is the number running tasks', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - expect(pool.usedCapacity).toEqual(3); - }); - - test('availableCapacity are a function of total_capacity - usedCapacity', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - expect(pool.availableCapacity()).toEqual(7); - }); - - test('availableCapacity is 0 until capacity$ pushes a value', async () => { - const capacity$ = new Subject(); - const pool = new TaskPool({ - capacity$, - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - expect(pool.availableCapacity()).toEqual(0); - capacity$.next(10); - expect(pool.availableCapacity()).toEqual(10); - }); - - test('does not run tasks that are beyond its available capacity', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const shouldRun = mockRun(); - const shouldNotRun = mockRun(); - - const result = await pool.run([ - { ...mockTask(), run: shouldRun }, - { ...mockTask(), run: shouldRun }, - { ...mockTask(), run: shouldNotRun }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - expect(pool.availableCapacity()).toEqual(0); - expect(shouldRun).toHaveBeenCalledTimes(2); - expect(shouldNotRun).not.toHaveBeenCalled(); - }); - - test('should log when marking a Task as running fails', async () => { - const pool = new TaskPool({ - capacity$: of(3), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const taskFailedToMarkAsRunning = mockTask(); - taskFailedToMarkAsRunning.markTaskAsRunning.mockImplementation(async () => { - throw new Error(`Mark Task as running has failed miserably`); - }); - - const result = await pool.run([mockTask(), taskFailedToMarkAsRunning, mockTask()]); - - expect((logger as jest.Mocked).error.mock.calls[0]).toMatchInlineSnapshot(` - Array [ - "Failed to mark Task TaskType \\"shooooo\\" as running: Mark Task as running has failed miserably", - ] - `); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('should log when running a Task fails', async () => { - const pool = new TaskPool({ - capacity$: of(3), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - throw new Error(`Run Task has failed miserably`); - }); - - const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); - - expect((logger as jest.Mocked).warn.mock.calls[0]).toMatchInlineSnapshot(` - Array [ - "Task TaskType \\"shooooo\\" failed in attempt to run: Run Task has failed miserably", - ] - `); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('should not log when running a Task fails due to the Task SO having been deleted while in flight', async () => { - const pool = new TaskPool({ - capacity$: of(3), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - throw SavedObjectsErrorHelpers.createGenericNotFoundError('task', taskFailedToRun.id); - }); - - const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); - - expect(logger.debug).toHaveBeenCalledWith( - `Task TaskType "shooooo" failed in attempt to run: Saved object [task/${taskFailedToRun.id}] not found` - ); - expect(logger.warn).not.toHaveBeenCalled(); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('Running a task which fails still takes up capacity', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - await sleep(0); - throw new Error(`Run Task has failed miserably`); - }); - - const result = await pool.run([taskFailedToRun, mockTask()]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - }); - - test('clears up capacity when a task completes', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const firstWork = resolvable(); - const firstRun = sinon.spy(async () => { - await sleep(0); - firstWork.resolve(); - return asOk({ state: {} }); - }); - const secondWork = resolvable(); - const secondRun = sinon.spy(async () => { - await sleep(0); - secondWork.resolve(); - return asOk({ state: {} }); - }); - - const result = await pool.run([ - { ...mockTask(), run: firstRun }, - { ...mockTask(), run: secondRun }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - expect(pool.usedCapacity).toEqual(1); - expect(pool.availableCapacity()).toEqual(0); - - await firstWork; - sinon.assert.calledOnce(firstRun); - sinon.assert.notCalled(secondRun); - - expect(pool.usedCapacity).toEqual(0); - await pool.run([{ ...mockTask(), run: secondRun }]); - expect(pool.usedCapacity).toEqual(1); - - expect(pool.availableCapacity()).toEqual(0); - - await secondWork; - - expect(pool.usedCapacity).toEqual(0); - expect(pool.availableCapacity()).toEqual(1); - sinon.assert.calledOnce(secondRun); - }); - - test('run cancels expired tasks prior to running new tasks', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const haltUntilWeAfterFirstRun = resolvable(); - const taskHasExpired = resolvable(); - const haltTaskSoThatItCanBeCanceled = resolvable(); - - const shouldRun = sinon.spy(() => Promise.resolve()); - const shouldNotRun = sinon.spy(() => Promise.resolve()); - const now = new Date(); - const result = await pool.run([ - { - ...mockTask({ id: '1' }), - async run() { - await haltUntilWeAfterFirstRun; - this.isExpired = true; - taskHasExpired.resolve(); - await haltTaskSoThatItCanBeCanceled; - return asOk({ state: {} }); - }, - get expiration() { - return now; - }, - get startedAt() { - // 5 and a half minutes - return moment(now).subtract(5, 'm').subtract(30, 's').toDate(); - }, - cancel: shouldRun, - }, - { - ...mockTask({ id: '2' }), - async run() { - // halt here so that we can verify that this task is counted in `occupiedWorkers` - await haltUntilWeAfterFirstRun; - return asOk({ state: {} }); - }, - cancel: shouldNotRun, - }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RunningAtCapacity); - expect(pool.usedCapacity).toEqual(2); - expect(pool.availableCapacity()).toEqual(0); - - // release first stage in task so that it has time to expire, but not complete - haltUntilWeAfterFirstRun.resolve(); - await taskHasExpired; - - expect(await pool.run([{ ...mockTask({ id: '3' }) }])).toBeTruthy(); - - sinon.assert.calledOnce(shouldRun); - sinon.assert.notCalled(shouldNotRun); - - expect(pool.usedCapacity).toEqual(1); - expect(pool.availableCapacity()).toEqual(1); - - haltTaskSoThatItCanBeCanceled.resolve(); - - expect(logger.warn).toHaveBeenCalledWith( - `Cancelling task TaskType "shooooo" as it expired at ${now.toISOString()} after running for 05m 30s (with timeout set at 5m).` - ); - }); - - test('calls to availableWorkers ensures we cancel expired tasks', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const taskIsRunning = resolvable(); - const taskHasExpired = resolvable(); - const cancel = sinon.spy(() => Promise.resolve()); - const now = new Date(); - expect( - await pool.run([ - { - ...mockTask(), - async run() { - await sleep(10); - this.isExpired = true; - taskIsRunning.resolve(); - await taskHasExpired; - return asOk({ state: {} }); - }, - get expiration() { - return new Date(now.getTime() + 10); - }, - get startedAt() { - return now; - }, - cancel, - }, - ]) - ).toEqual(TaskPoolRunResult.RunningAtCapacity); - - await taskIsRunning; - - sinon.assert.notCalled(cancel); - expect(pool.usedCapacity).toEqual(1); - // The call to `availableCapacity` will clear the expired task so it's 1 instead of 0 - expect(pool.availableCapacity()).toEqual(1); - sinon.assert.calledOnce(cancel); - - expect(pool.usedCapacity).toEqual(0); - expect(pool.availableCapacity()).toEqual(1); - // ensure cancel isn't called twice - sinon.assert.calledOnce(cancel); - taskHasExpired.resolve(); - }); - - test('logs if cancellation errors', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const cancelled = resolvable(); - const result = await pool.run([ - { - ...mockTask(), - async run() { - this.isExpired = true; - await sleep(10); - return asOk({ state: {} }); - }, - async cancel() { - cancelled.resolve(); - throw new Error('Dern!'); - }, - toString: () => '"shooooo!"', - }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - await pool.run([]); - - expect(pool.usedCapacity).toEqual(0); - - // Allow the task to cancel... - await cancelled; - - expect((logger as jest.Mocked).error.mock.calls[0][0]).toMatchInlineSnapshot( - `"Failed to cancel task \\"shooooo!\\": Error: Dern!"` - ); - }); - - test('only allows one task with the same id in the task pool', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_DEFAULT, - }); - - const shouldRun = mockRun(); - const shouldNotRun = mockRun(); - - const taskId = uuidv4(); - const task1 = mockTask({ id: taskId, run: shouldRun }); - const task2 = mockTask({ - id: taskId, - run: shouldNotRun, - isSameTask() { - return true; - }, - }); - - await pool.run([task1]); - await pool.run([task2]); - - expect(shouldRun).toHaveBeenCalledTimes(1); - expect(shouldNotRun).not.toHaveBeenCalled(); - }); - }); - - describe('with CLAIM_STRATEGY_MGET', () => { - test('usedCapacity is the sum of the cost of running tasks', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - expect(pool.usedCapacity).toEqual(3 * TaskCost.Normal); - }); - - test('availableCapacity are a function of total_capacity - usedCapacity', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const result = await pool.run([{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - expect(pool.availableCapacity()).toEqual(14); - }); - - test('availableCapacity is 0 until capacity$ pushes a value', async () => { - const capacity$ = new Subject(); - const pool = new TaskPool({ capacity$, definitions, logger, strategy: CLAIM_STRATEGY_MGET }); - - expect(pool.availableCapacity()).toEqual(0); - capacity$.next(20); - expect(pool.availableCapacity()).toEqual(40); - }); - - test('does not run tasks that are beyond its available capacity', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const shouldRun = mockRun(); - const shouldNotRun = mockRun(); - - const result = await pool.run([ - { ...mockTask(), run: shouldRun }, - { ...mockTask(), run: shouldRun }, - { ...mockTask(), run: shouldNotRun }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - expect(pool.availableCapacity()).toEqual(0); - expect(shouldRun).toHaveBeenCalledTimes(2); - expect(shouldNotRun).not.toHaveBeenCalled(); - }); - - test('should log when marking a Task as running fails', async () => { - const pool = new TaskPool({ - capacity$: of(6), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const taskFailedToMarkAsRunning = mockTask(); - taskFailedToMarkAsRunning.markTaskAsRunning.mockImplementation(async () => { - throw new Error(`Mark Task as running has failed miserably`); - }); - - const result = await pool.run([mockTask(), taskFailedToMarkAsRunning, mockTask()]); - - expect((logger as jest.Mocked).error.mock.calls[0]).toMatchInlineSnapshot(` - Array [ - "Failed to mark Task TaskType \\"shooooo\\" as running: Mark Task as running has failed miserably", - ] - `); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('should log when running a Task fails', async () => { - const pool = new TaskPool({ - capacity$: of(3), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - throw new Error(`Run Task has failed miserably`); - }); - - const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); - - expect((logger as jest.Mocked).warn.mock.calls[0]).toMatchInlineSnapshot(` - Array [ - "Task TaskType \\"shooooo\\" failed in attempt to run: Run Task has failed miserably", - ] - `); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('should not log when running a Task fails due to the Task SO having been deleted while in flight', async () => { - const pool = new TaskPool({ - capacity$: of(3), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - throw SavedObjectsErrorHelpers.createGenericNotFoundError('task', taskFailedToRun.id); - }); - - const result = await pool.run([mockTask(), taskFailedToRun, mockTask()]); - - expect(logger.debug).toHaveBeenCalledWith( - `Task TaskType "shooooo" failed in attempt to run: Saved object [task/${taskFailedToRun.id}] not found` - ); - expect(logger.warn).not.toHaveBeenCalled(); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - }); - - test('Running a task which fails still takes up capacity', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const taskFailedToRun = mockTask(); - taskFailedToRun.run.mockImplementation(async () => { - await sleep(0); - throw new Error(`Run Task has failed miserably`); - }); - - const result = await pool.run([taskFailedToRun, mockTask()]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - }); - - test('clears up capacity when a task completes', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const firstWork = resolvable(); - const firstRun = sinon.spy(async () => { - await sleep(0); - firstWork.resolve(); - return asOk({ state: {} }); - }); - const secondWork = resolvable(); - const secondRun = sinon.spy(async () => { - await sleep(0); - secondWork.resolve(); - return asOk({ state: {} }); - }); - - const result = await pool.run([ - { ...mockTask(), run: firstRun }, - { ...mockTask(), run: secondRun }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RanOutOfCapacity); - expect(pool.usedCapacity).toEqual(2); - expect(pool.availableCapacity()).toEqual(0); - - await firstWork; - sinon.assert.calledOnce(firstRun); - sinon.assert.notCalled(secondRun); - - expect(pool.usedCapacity).toEqual(0); - await pool.run([{ ...mockTask(), run: secondRun }]); - expect(pool.usedCapacity).toEqual(2); - - expect(pool.availableCapacity()).toEqual(0); - - await secondWork; - - expect(pool.usedCapacity).toEqual(0); - expect(pool.availableCapacity()).toEqual(2); - sinon.assert.calledOnce(secondRun); - }); - - test('run cancels expired tasks prior to running new tasks', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const haltUntilWeAfterFirstRun = resolvable(); - const taskHasExpired = resolvable(); - const haltTaskSoThatItCanBeCanceled = resolvable(); - - const shouldRun = sinon.spy(() => Promise.resolve()); - const shouldNotRun = sinon.spy(() => Promise.resolve()); - const now = new Date(); - const result = await pool.run([ - { - ...mockTask({ id: '1' }), - async run() { - await haltUntilWeAfterFirstRun; - this.isExpired = true; - taskHasExpired.resolve(); - await haltTaskSoThatItCanBeCanceled; - return asOk({ state: {} }); - }, - get expiration() { - return now; - }, - get startedAt() { - // 5 and a half minutes - return moment(now).subtract(5, 'm').subtract(30, 's').toDate(); - }, - cancel: shouldRun, - }, - { - ...mockTask({ id: '2' }), - async run() { - // halt here so that we can verify that this task is counted in `occupiedWorkers` - await haltUntilWeAfterFirstRun; - return asOk({ state: {} }); - }, - cancel: shouldNotRun, - }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RunningAtCapacity); - expect(pool.usedCapacity).toEqual(4); - expect(pool.availableCapacity()).toEqual(0); - - // release first stage in task so that it has time to expire, but not complete - haltUntilWeAfterFirstRun.resolve(); - await taskHasExpired; - - expect(await pool.run([{ ...mockTask({ id: '3' }) }])).toBeTruthy(); - - sinon.assert.calledOnce(shouldRun); - sinon.assert.notCalled(shouldNotRun); - - expect(pool.usedCapacity).toEqual(2); - expect(pool.availableCapacity()).toEqual(2); - - haltTaskSoThatItCanBeCanceled.resolve(); - - expect(logger.warn).toHaveBeenCalledWith( - `Cancelling task TaskType "shooooo" as it expired at ${now.toISOString()} after running for 05m 30s (with timeout set at 5m).` - ); - }); - - test('calls to availableWorkers ensures we cancel expired tasks', async () => { - const pool = new TaskPool({ - capacity$: of(1), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const taskIsRunning = resolvable(); - const taskHasExpired = resolvable(); - const cancel = sinon.spy(() => Promise.resolve()); - const now = new Date(); - expect( - await pool.run([ - { - ...mockTask(), - async run() { - await sleep(10); - this.isExpired = true; - taskIsRunning.resolve(); - await taskHasExpired; - return asOk({ state: {} }); - }, - get expiration() { - return new Date(now.getTime() + 10); - }, - get startedAt() { - return now; - }, - cancel, - }, - ]) - ).toEqual(TaskPoolRunResult.RunningAtCapacity); - - await taskIsRunning; - - sinon.assert.notCalled(cancel); - expect(pool.usedCapacity).toEqual(2); - // The call to `availableCapacity` will clear the expired task so it's 2 instead of 0 - expect(pool.availableCapacity()).toEqual(2); - sinon.assert.calledOnce(cancel); - - expect(pool.usedCapacity).toEqual(0); - expect(pool.availableCapacity()).toEqual(2); - // ensure cancel isn't called twice - sinon.assert.calledOnce(cancel); - taskHasExpired.resolve(); - }); - - test('logs if cancellation errors', async () => { - const pool = new TaskPool({ - capacity$: of(10), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const cancelled = resolvable(); - const result = await pool.run([ - { - ...mockTask(), - async run() { - this.isExpired = true; - await sleep(10); - return asOk({ state: {} }); - }, - async cancel() { - cancelled.resolve(); - throw new Error('Dern!'); - }, - toString: () => '"shooooo!"', - }, - ]); - - expect(result).toEqual(TaskPoolRunResult.RunningAllClaimedTasks); - await pool.run([]); - - expect(pool.usedCapacity).toEqual(0); - - // Allow the task to cancel... - await cancelled; - - expect((logger as jest.Mocked).error.mock.calls[0][0]).toMatchInlineSnapshot( - `"Failed to cancel task \\"shooooo!\\": Error: Dern!"` - ); - }); - - test('only allows one task with the same id in the task pool', async () => { - const pool = new TaskPool({ - capacity$: of(2), - definitions, - logger, - strategy: CLAIM_STRATEGY_MGET, - }); - - const shouldRun = mockRun(); - const shouldNotRun = mockRun(); - - const taskId = uuidv4(); - const task1 = mockTask({ id: taskId, run: shouldRun }); - const task2 = mockTask({ - id: taskId, - run: shouldNotRun, - isSameTask() { - return true; - }, - }); - - await pool.run([task1]); - await pool.run([task2]); - - expect(shouldRun).toHaveBeenCalledTimes(1); - expect(shouldNotRun).not.toHaveBeenCalled(); - }); - }); -}); diff --git a/x-pack/plugins/task_manager/server/task_pool/test_utils.ts b/x-pack/plugins/task_manager/server/task_pool/test_utils.ts deleted file mode 100644 index b518ed7b8f8f5..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/test_utils.ts +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ -import { v4 as uuidv4 } from 'uuid'; -import { asOk } from '../lib/result_type'; -import { sleep } from '../test_utils'; -import { TaskRunningStage } from '../task_running'; -import { TaskCost } from '../task'; - -export function mockRun() { - return jest.fn(async () => { - await sleep(0); - return asOk({ state: {} }); - }); -} - -export function mockTask(overrides = {}, definitionOverrides = {}) { - return { - isExpired: false, - taskExecutionId: uuidv4(), - id: uuidv4(), - cancel: async () => undefined, - markTaskAsRunning: jest.fn(async () => true), - run: mockRun(), - stage: TaskRunningStage.PENDING, - toString: () => `TaskType "shooooo"`, - isAdHocTaskAndOutOfAttempts: false, - removeTask: jest.fn(), - get expiration() { - return new Date(); - }, - get startedAt() { - return new Date(); - }, - get definition() { - return { - type: '', - title: '', - timeout: '5m', - cost: TaskCost.Normal, - createTaskRunner: jest.fn(), - ...definitionOverrides, - }; - }, - isSameTask() { - return false; - }, - ...overrides, - }; -} diff --git a/x-pack/plugins/task_manager/server/task_pool/types.ts b/x-pack/plugins/task_manager/server/task_pool/types.ts deleted file mode 100644 index 759af4f6d6e70..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/types.ts +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { Observable } from 'rxjs'; -import { Logger } from '@kbn/core/server'; -import { TaskRunner } from '../task_running'; -import { TaskDefinition } from '../task'; - -export interface ICapacity { - get capacity(): number; - availableCapacity( - tasksInPool: Map, - taskDefinition?: TaskDefinition | null - ): number; - usedCapacity(tasksInPool: Map): number; - usedCapacityPercentage(tasksInPool: Map): number; - getUsedCapacityByType(tasksInPool: TaskRunner[], type: string): number; - determineTasksToRunBasedOnCapacity( - tasks: TaskRunner[], - availableCapacity: number - ): [TaskRunner[], TaskRunner[]]; -} - -export interface CapacityOpts { - capacity$: Observable; - logger: Logger; -} diff --git a/x-pack/plugins/task_manager/server/task_pool/utils.ts b/x-pack/plugins/task_manager/server/task_pool/utils.ts deleted file mode 100644 index d4c89be46e02d..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/utils.ts +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { TaskCost } from '../task'; - -// When configured capacity is the number of normal cost tasks that this Kibana -// can run, the total available workers equals the capacity -export const getCapacityInWorkers = (capacity: number) => capacity; - -// When configured capacity is the number of normal cost tasks that this Kibana -// can run, the total available cost equals the capacity multiplied by the cost of a normal task -export const getCapacityInCost = (capacity: number) => capacity * TaskCost.Normal; diff --git a/x-pack/plugins/task_manager/server/task_pool/worker_capacity.test.ts b/x-pack/plugins/task_manager/server/task_pool/worker_capacity.test.ts deleted file mode 100644 index 7ed7485ccdd52..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/worker_capacity.test.ts +++ /dev/null @@ -1,176 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { loggingSystemMock } from '@kbn/core/server/mocks'; -import { of, Subject } from 'rxjs'; -import { TaskCost } from '../task'; -import { mockTask } from './test_utils'; -import { WorkerCapacity } from './worker_capacity'; - -const logger = loggingSystemMock.create().get(); - -describe('WorkerCapacity', () => { - beforeEach(() => { - jest.resetAllMocks(); - }); - - test('workers set based on capacity responds to changes from capacity$ observable', () => { - const capacity$ = new Subject(); - const pool = new WorkerCapacity({ capacity$, logger }); - - expect(pool.capacity).toBe(0); - - capacity$.next(20); - expect(pool.capacity).toBe(20); - - capacity$.next(16); - expect(pool.capacity).toBe(16); - - capacity$.next(25); - expect(pool.capacity).toBe(25); - - expect(logger.debug).toHaveBeenCalledTimes(3); - expect(logger.debug).toHaveBeenNthCalledWith( - 1, - 'Task pool now using 20 as the max worker value which is based on a capacity of 20' - ); - expect(logger.debug).toHaveBeenNthCalledWith( - 2, - 'Task pool now using 16 as the max worker value which is based on a capacity of 16' - ); - expect(logger.debug).toHaveBeenNthCalledWith( - 3, - 'Task pool now using 25 as the max worker value which is based on a capacity of 25' - ); - }); - - test('usedCapacity returns the number of tasks in the pool', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.usedCapacity(tasksInPool)).toBe(3); - }); - - test('usedCapacityPercentage returns the percentage of workers in use by tasks in the pool', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.usedCapacityPercentage(tasksInPool)).toBe(30); - }); - - test('usedCapacityByType returns the number of tasks of specified type in the pool', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = [ - { ...mockTask({}, { type: 'type1' }) }, - { ...mockTask({}, { type: 'type1', cost: TaskCost.Tiny }) }, - { ...mockTask({}, { type: 'type2' }) }, - ]; - - expect(pool.getUsedCapacityByType(tasksInPool, 'type1')).toBe(2); - expect(pool.getUsedCapacityByType(tasksInPool, 'type2')).toBe(1); - expect(pool.getUsedCapacityByType(tasksInPool, 'type3')).toBe(0); - }); - - test('availableCapacity returns the overall number of available workers when no task type is defined', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect(pool.availableCapacity(tasksInPool)).toBe(7); - }); - - test('availableCapacity returns the overall number of available workers when task type with no maxConcurrency is provided', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask() }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect( - pool.availableCapacity(tasksInPool, { - type: 'type1', - cost: TaskCost.Normal, - createTaskRunner: jest.fn(), - timeout: '5m', - }) - ).toBe(7); - }); - - test('availableCapacity returns the number of available workers for the task type when task type with maxConcurrency is provided', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - - const tasksInPool = new Map([ - ['1', { ...mockTask({}, { type: 'type1' }) }], - ['2', { ...mockTask({}, { cost: TaskCost.Tiny }) }], - ['3', { ...mockTask() }], - ]); - - expect( - pool.availableCapacity(tasksInPool, { - type: 'type1', - maxConcurrency: 3, - cost: TaskCost.Normal, - createTaskRunner: jest.fn(), - timeout: '5m', - }) - ).toBe(2); - }); - - describe('determineTasksToRunBasedOnCapacity', () => { - test('runs all tasks if there are workers available', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - const tasks = [{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 10); - - expect(tasksToRun).toEqual(tasks); - expect(leftoverTasks).toEqual([]); - }); - - test('splits tasks if there are more tasks than available workers', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - const tasks = [ - { ...mockTask() }, - { ...mockTask() }, - { ...mockTask() }, - { ...mockTask({}, { cost: TaskCost.ExtraLarge }) }, - { ...mockTask({}, { cost: TaskCost.ExtraLarge }) }, - { ...mockTask() }, - { ...mockTask() }, - ]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 5); - - expect(tasksToRun).toEqual([tasks[0], tasks[1], tasks[2], tasks[3], tasks[4]]); - expect(leftoverTasks).toEqual([tasks[5], tasks[6]]); - }); - - test('does not run tasks if there is no capacity', () => { - const pool = new WorkerCapacity({ capacity$: of(10), logger }); - const tasks = [{ ...mockTask() }, { ...mockTask() }, { ...mockTask() }]; - const [tasksToRun, leftoverTasks] = pool.determineTasksToRunBasedOnCapacity(tasks, 0); - - expect(tasksToRun).toEqual([]); - expect(leftoverTasks).toEqual(tasks); - }); - }); -}); diff --git a/x-pack/plugins/task_manager/server/task_pool/worker_capacity.ts b/x-pack/plugins/task_manager/server/task_pool/worker_capacity.ts deleted file mode 100644 index 13de1cb266add..0000000000000 --- a/x-pack/plugins/task_manager/server/task_pool/worker_capacity.ts +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one - * or more contributor license agreements. Licensed under the Elastic License - * 2.0; you may not use this file except in compliance with the Elastic License - * 2.0. - */ - -import { Logger } from '@kbn/core/server'; -import { TaskRunner } from '../task_running'; -import { CapacityOpts, ICapacity } from './types'; -import { TaskDefinition } from '../task'; -import { getCapacityInWorkers } from './utils'; - -export class WorkerCapacity implements ICapacity { - private workers: number = 0; - private logger: Logger; - - constructor(opts: CapacityOpts) { - this.logger = opts.logger; - opts.capacity$.subscribe((capacity) => { - // Capacity config describes the number of normal-cost tasks that can be - // run simulatenously. This directly corresponds to the number of workers to use. - this.workers = getCapacityInWorkers(capacity); - this.logger.debug( - `Task pool now using ${this.workers} as the max worker value which is based on a capacity of ${capacity}` - ); - }); - } - - public get capacity(): number { - return this.workers; - } - - /** - * Gets how many workers are currently in use. - */ - public usedCapacity(tasksInPool: Map) { - return tasksInPool.size; - } - - /** - * Gets % of workers in use - */ - public usedCapacityPercentage(tasksInPool: Map) { - return this.capacity ? Math.round((this.usedCapacity(tasksInPool) * 100) / this.capacity) : 100; - } - - /** - * Gets how many workers are currently in use by each type. - */ - public getUsedCapacityByType(tasksInPool: TaskRunner[], type: string) { - return tasksInPool.reduce( - (count, runningTask) => (runningTask.definition.type === type ? ++count : count), - 0 - ); - } - - public availableCapacity( - tasksInPool: Map, - taskDefinition?: TaskDefinition | null - ): number { - const allAvailableCapacity = this.capacity - this.usedCapacity(tasksInPool); - if (taskDefinition && taskDefinition.maxConcurrency) { - // calculate the max workers that can be used for this task type - return Math.max( - Math.min( - allAvailableCapacity, - taskDefinition.maxConcurrency - - this.getUsedCapacityByType([...tasksInPool.values()], taskDefinition.type) - ), - 0 - ); - } - - return allAvailableCapacity; - } - - public determineTasksToRunBasedOnCapacity( - tasks: TaskRunner[], - availableCapacity: number - ): [TaskRunner[], TaskRunner[]] { - const tasksToRun: TaskRunner[] = []; - const leftOverTasks: TaskRunner[] = []; - - for (let i = 0; i < tasks.length; i++) { - if (i >= availableCapacity) { - leftOverTasks.push(tasks[i]); - } else { - tasksToRun.push(tasks[i]); - } - } - - return [tasksToRun, leftOverTasks]; - } -} diff --git a/x-pack/plugins/task_manager/server/task_store.test.ts b/x-pack/plugins/task_manager/server/task_store.test.ts index 9bc1a64140647..afde0ae91ea55 100644 --- a/x-pack/plugins/task_manager/server/task_store.test.ts +++ b/x-pack/plugins/task_manager/server/task_store.test.ts @@ -8,7 +8,7 @@ import { schema } from '@kbn/config-schema'; import { Client } from '@elastic/elasticsearch'; import type * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey'; -import _, { omit } from 'lodash'; +import _ from 'lodash'; import { first } from 'rxjs'; import { @@ -18,7 +18,7 @@ import { SerializedConcreteTaskInstance, } from './task'; import { elasticsearchServiceMock, savedObjectsServiceMock } from '@kbn/core/server/mocks'; -import { TaskStore, SearchOpts, AggregationOpts, taskInstanceToAttributes } from './task_store'; +import { TaskStore, SearchOpts, AggregationOpts } from './task_store'; import { savedObjectsRepositoryMock } from '@kbn/core/server/mocks'; import { SavedObjectAttributes, SavedObjectsErrorHelpers } from '@kbn/core/server'; import { TaskTypeDictionary } from './task_type_dictionary'; @@ -292,16 +292,12 @@ describe('TaskStore', () => { }); }); - async function testFetch( - opts?: SearchOpts, - hits: Array> = [], - limitResponse: boolean = false - ) { + async function testFetch(opts?: SearchOpts, hits: Array> = []) { childEsClient.search.mockResponse({ hits: { hits, total: hits.length }, } as estypes.SearchResponse); - const result = await store.fetch(opts, limitResponse); + const result = await store.fetch(opts); expect(childEsClient.search).toHaveBeenCalledTimes(1); @@ -346,18 +342,6 @@ describe('TaskStore', () => { await expect(store.fetch()).rejects.toThrowErrorMatchingInlineSnapshot(`"Failure"`); expect(await firstErrorPromise).toMatchInlineSnapshot(`[Error: Failure]`); }); - - test('excludes state and params from source when excludeState is true', async () => { - const { args } = await testFetch({}, [], true); - expect(args).toMatchObject({ - index: 'tasky', - body: { - sort: [{ 'task.runAt': 'asc' }], - query: { term: { type: 'task' } }, - }, - _source_excludes: ['task.state', 'task.params'], - }); - }); }); describe('aggregate', () => { @@ -631,11 +615,10 @@ describe('TaskStore', () => { describe('bulkUpdate', () => { let store: TaskStore; - const logger = mockLogger(); beforeAll(() => { store = new TaskStore({ - logger, + logger: mockLogger(), index: 'tasky', taskManagerId: '', serializer, @@ -688,125 +671,6 @@ describe('TaskStore', () => { expect(mockGetValidatedTaskInstanceForUpdating).toHaveBeenCalledWith(task, { validate: false, }); - - expect(savedObjectsClient.bulkUpdate).toHaveBeenCalledWith( - [ - { - id: task.id, - type: 'task', - version: task.version, - attributes: taskInstanceToAttributes(task, task.id), - }, - ], - { refresh: false } - ); - }); - - test(`validates whenever validate:true is passed-in`, async () => { - const task = { - runAt: mockedDate, - scheduledAt: mockedDate, - startedAt: null, - retryAt: null, - id: 'task:324242', - params: { hello: 'world' }, - state: { foo: 'bar' }, - taskType: 'report', - attempts: 3, - status: 'idle' as TaskStatus, - version: '123', - ownerId: null, - traceparent: '', - }; - - savedObjectsClient.bulkUpdate.mockResolvedValue({ - saved_objects: [ - { - id: '324242', - type: 'task', - attributes: { - ...task, - state: '{"foo":"bar"}', - params: '{"hello":"world"}', - }, - references: [], - version: '123', - }, - ], - }); - - await store.bulkUpdate([task], { validate: true }); - - expect(mockGetValidatedTaskInstanceForUpdating).toHaveBeenCalledWith(task, { - validate: true, - }); - - expect(savedObjectsClient.bulkUpdate).toHaveBeenCalledWith( - [ - { - id: task.id, - type: 'task', - version: task.version, - attributes: taskInstanceToAttributes(task, task.id), - }, - ], - { refresh: false } - ); - }); - - test(`logs warning and doesn't validate whenever excludeLargeFields option is passed-in`, async () => { - const task = { - runAt: mockedDate, - scheduledAt: mockedDate, - startedAt: null, - retryAt: null, - id: 'task:324242', - params: { hello: 'world' }, - state: { foo: 'bar' }, - taskType: 'report', - attempts: 3, - status: 'idle' as TaskStatus, - version: '123', - ownerId: null, - traceparent: '', - }; - - savedObjectsClient.bulkUpdate.mockResolvedValue({ - saved_objects: [ - { - id: '324242', - type: 'task', - attributes: { - ...task, - state: '{"foo":"bar"}', - params: '{"hello":"world"}', - }, - references: [], - version: '123', - }, - ], - }); - - await store.bulkUpdate([task], { validate: true, excludeLargeFields: true }); - - expect(logger.warn).toHaveBeenCalledWith( - `Skipping validation for bulk update because excludeLargeFields=true.` - ); - expect(mockGetValidatedTaskInstanceForUpdating).toHaveBeenCalledWith(task, { - validate: false, - }); - - expect(savedObjectsClient.bulkUpdate).toHaveBeenCalledWith( - [ - { - id: task.id, - type: 'task', - version: task.version, - attributes: omit(taskInstanceToAttributes(task, task.id), ['state', 'params']), - }, - ], - { refresh: false } - ); }); test('pushes error from saved objects client to errors$', async () => { diff --git a/x-pack/plugins/task_manager/server/task_store.ts b/x-pack/plugins/task_manager/server/task_store.ts index 9b58d7bc3c18b..e0ad3dfae149a 100644 --- a/x-pack/plugins/task_manager/server/task_store.ts +++ b/x-pack/plugins/task_manager/server/task_store.ts @@ -84,11 +84,6 @@ export interface FetchResult { versionMap: Map; } -export interface BulkUpdateOpts { - validate: boolean; - excludeLargeFields?: boolean; -} - export type BulkUpdateResult = Result< ConcreteTaskInstance, { type: string; id: string; error: SavedObjectError } @@ -113,7 +108,6 @@ export class TaskStore { public readonly taskManagerId: string; public readonly errors$ = new Subject(); public readonly taskValidator: TaskValidator; - private readonly logger: Logger; private esClient: ElasticsearchClient; private esClientWithoutRetries: ElasticsearchClient; @@ -140,7 +134,6 @@ export class TaskStore { this.serializer = opts.serializer; this.savedObjectsRepository = opts.savedObjectsRepository; this.adHocTaskCounter = opts.adHocTaskCounter; - this.logger = opts.logger; this.taskValidator = new TaskValidator({ logger: opts.logger, definitions: opts.definitions, @@ -239,13 +232,15 @@ export class TaskStore { * Fetches a list of scheduled tasks with default sorting. * * @param opts - The query options used to filter tasks - * @param limitResponse - Whether to exclude the task state and params from the source for a smaller respose payload */ - public async fetch( - { sort = [{ 'task.runAt': 'asc' }], ...opts }: SearchOpts = {}, - limitResponse: boolean = false - ): Promise { - return this.search({ ...opts, sort }, limitResponse); + public async fetch({ + sort = [{ 'task.runAt': 'asc' }], + ...opts + }: SearchOpts = {}): Promise { + return this.search({ + ...opts, + sort, + }); } /** @@ -301,23 +296,13 @@ export class TaskStore { */ public async bulkUpdate( docs: ConcreteTaskInstance[], - { validate, excludeLargeFields = false }: BulkUpdateOpts + options: { validate: boolean } ): Promise { - // if we're excluding large fields (state and params), we cannot apply validation so log a warning - if (validate && excludeLargeFields) { - validate = false; - this.logger.warn(`Skipping validation for bulk update because excludeLargeFields=true.`); - } - const attributesByDocId = docs.reduce((attrsById, doc) => { const taskInstance = this.taskValidator.getValidatedTaskInstanceForUpdating(doc, { - validate, + validate: options.validate, }); - const taskAttributes = taskInstanceToAttributes(taskInstance, doc.id); - attrsById.set( - doc.id, - excludeLargeFields ? omit(taskAttributes, 'state', 'params') : taskAttributes - ); + attrsById.set(doc.id, taskInstanceToAttributes(taskInstance, doc.id)); return attrsById; }, new Map()); @@ -357,7 +342,7 @@ export class TaskStore { ), }); const result = this.taskValidator.getValidatedTaskInstanceFromReading(taskInstance, { - validate, + validate: options.validate, }); return asOk(result); }); @@ -504,20 +489,18 @@ export class TaskStore { } } - private async search( - opts: SearchOpts = {}, - limitResponse: boolean = false - ): Promise { + private async search(opts: SearchOpts = {}): Promise { const { query } = ensureQueryOnlyReturnsTaskObjects(opts); try { const result = await this.esClientWithoutRetries.search({ index: this.index, ignore_unavailable: true, - body: { ...opts, query }, - ...(limitResponse ? { _source_excludes: ['task.state', 'task.params'] } : {}), + body: { + ...opts, + query, + }, }); - const { hits: { hits: tasks }, } = result; @@ -644,10 +627,7 @@ export function correctVersionConflictsForContinuation( return maxDocs && versionConflicts + updated > maxDocs ? maxDocs - updated : versionConflicts; } -export function taskInstanceToAttributes( - doc: TaskInstance, - id: string -): SerializedConcreteTaskInstance { +function taskInstanceToAttributes(doc: TaskInstance, id: string): SerializedConcreteTaskInstance { return { ...omit(doc, 'id', 'version'), params: JSON.stringify(doc.params || {}), diff --git a/x-pack/plugins/task_manager/server/task_type_dictionary.test.ts b/x-pack/plugins/task_manager/server/task_type_dictionary.test.ts index cd660628cfd99..af2f61b188c3c 100644 --- a/x-pack/plugins/task_manager/server/task_type_dictionary.test.ts +++ b/x-pack/plugins/task_manager/server/task_type_dictionary.test.ts @@ -6,7 +6,7 @@ */ import { get } from 'lodash'; -import { RunContext, TaskCost, TaskDefinition, TaskPriority } from './task'; +import { RunContext, TaskDefinition, TaskPriority } from './task'; import { mockLogger } from './test_utils'; import { sanitizeTaskDefinitions, @@ -53,7 +53,6 @@ describe('taskTypeDictionary', () => { const logger = mockLogger(); beforeEach(() => { - jest.resetAllMocks(); definitions = new TaskTypeDictionary(logger); }); @@ -65,7 +64,6 @@ describe('taskTypeDictionary', () => { expect(result).toMatchInlineSnapshot(` Array [ Object { - "cost": 2, "createTaskRunner": [Function], "description": "one super cool task", "timeout": "5m", @@ -73,7 +71,6 @@ describe('taskTypeDictionary', () => { "type": "test_task_type_0", }, Object { - "cost": 2, "createTaskRunner": [Function], "description": "one super cool task", "timeout": "5m", @@ -81,7 +78,6 @@ describe('taskTypeDictionary', () => { "type": "test_task_type_1", }, Object { - "cost": 2, "createTaskRunner": [Function], "description": "one super cool task", "timeout": "5m", @@ -229,7 +225,6 @@ describe('taskTypeDictionary', () => { createTaskRunner: expect.any(Function), maxConcurrency: 2, priority: 1, - cost: 2, timeout: '5m', title: 'foo', type: 'foo', @@ -256,45 +251,6 @@ describe('taskTypeDictionary', () => { ); }); - it('uses task cost if specified', () => { - definitions.registerTaskDefinitions({ - foo: { - title: 'foo', - maxConcurrency: 2, - cost: TaskCost.ExtraLarge, - createTaskRunner: jest.fn(), - }, - }); - expect(definitions.get('foo')).toEqual({ - createTaskRunner: expect.any(Function), - maxConcurrency: 2, - cost: 10, - timeout: '5m', - title: 'foo', - type: 'foo', - }); - }); - - it('does not register task with invalid cost schema', () => { - definitions.registerTaskDefinitions({ - foo: { - title: 'foo', - maxConcurrency: 2, - // @ts-expect-error upgrade typescript v5.1.6 - cost: 23, - createTaskRunner: jest.fn(), - }, - }); - expect(logger.error).toHaveBeenCalledWith( - `Could not sanitize task definitions: Invalid cost \"23\". Cost must be one of Tiny => 1,Normal => 2,ExtraLarge => 10` - ); - expect(() => { - definitions.get('foo'); - }).toThrowErrorMatchingInlineSnapshot( - `"Unsupported task type \\"foo\\". Supported types are "` - ); - }); - it('throws error when registering duplicate task type', () => { definitions.registerTaskDefinitions({ foo: { diff --git a/x-pack/plugins/task_manager/server/task_type_dictionary.ts b/x-pack/plugins/task_manager/server/task_type_dictionary.ts index 0a2368860c0cf..f45cbad172d5a 100644 --- a/x-pack/plugins/task_manager/server/task_type_dictionary.ts +++ b/x-pack/plugins/task_manager/server/task_type_dictionary.ts @@ -7,13 +7,7 @@ import { ObjectType } from '@kbn/config-schema'; import { Logger } from '@kbn/core/server'; -import { - TaskDefinition, - taskDefinitionSchema, - TaskRunCreatorFunction, - TaskPriority, - TaskCost, -} from './task'; +import { TaskDefinition, taskDefinitionSchema, TaskRunCreatorFunction, TaskPriority } from './task'; import { CONCURRENCY_ALLOW_LIST_BY_TASK_TYPE } from './constants'; /** @@ -56,10 +50,6 @@ export interface TaskRegisterDefinition { * claimed before low priority */ priority?: TaskPriority; - /** - * An optional definition of the cost associated with running the task. - */ - cost?: TaskCost; /** * An optional more detailed description of what this task does. */ diff --git a/x-pack/plugins/task_manager/server/usage/task_manager_usage_collector.test.ts b/x-pack/plugins/task_manager/server/usage/task_manager_usage_collector.test.ts index 067a32c8a486d..019d8bd47c57a 100644 --- a/x-pack/plugins/task_manager/server/usage/task_manager_usage_collector.test.ts +++ b/x-pack/plugins/task_manager/server/usage/task_manager_usage_collector.test.ts @@ -174,8 +174,7 @@ function getMockMonitoredHealth(overrides = {}): MonitoredHealth { timestamp: new Date().toISOString(), status: HealthStatus.OK, value: { - capacity: { config: 10, as_cost: 20, as_workers: 10 }, - claim_strategy: 'default', + max_workers: 10, poll_interval: 3000, request_capacity: 1000, monitored_aggregated_stats_refresh_rate: 5000, @@ -194,19 +193,16 @@ function getMockMonitoredHealth(overrides = {}): MonitoredHealth { status: HealthStatus.OK, value: { count: 4, - cost: 8, task_types: { - actions_telemetry: { count: 2, cost: 4, status: { idle: 2 } }, - alerting_telemetry: { count: 1, cost: 2, status: { idle: 1 } }, - session_cleanup: { count: 1, cost: 2, status: { idle: 1 } }, + actions_telemetry: { count: 2, status: { idle: 2 } }, + alerting_telemetry: { count: 1, status: { idle: 1 } }, + session_cleanup: { count: 1, status: { idle: 1 } }, }, schedule: [], overdue: 0, - overdue_cost: 0, overdue_non_recurring: 0, estimatedScheduleDensity: [], non_recurring: 20, - non_recurring_cost: 40, owner_ids: 2, estimated_schedule_density: [], capacity_requirements: { diff --git a/x-pack/plugins/task_manager/tsconfig.json b/x-pack/plugins/task_manager/tsconfig.json index 5b666031a69ad..5ae81e9097114 100644 --- a/x-pack/plugins/task_manager/tsconfig.json +++ b/x-pack/plugins/task_manager/tsconfig.json @@ -25,9 +25,7 @@ "@kbn/alerting-state-types", "@kbn/core-saved-objects-api-server", "@kbn/logging", - "@kbn/core-lifecycle-server", - "@kbn/serverless", - "@kbn/cloud-plugin" + "@kbn/core-lifecycle-server" ], "exclude": ["target/**/*"] } diff --git a/x-pack/plugins/translations/translations/fr-FR.json b/x-pack/plugins/translations/translations/fr-FR.json index 62ce477ecca04..a528782abc0ec 100644 --- a/x-pack/plugins/translations/translations/fr-FR.json +++ b/x-pack/plugins/translations/translations/fr-FR.json @@ -10079,13 +10079,6 @@ "xpack.apm.serviceGroups.selectServicesList.nameColumnLabel": "Nom", "xpack.apm.serviceGroups.selectServicesList.notFoundLabel": "Aucun service disponible dans les dernières 24 heures. Vous pouvez toujours créer le groupe et les services qui correspondent à votre requête.", "xpack.apm.serviceGroups.sortLabel": "Trier", - "xpack.apm.serviceGroups.tour.content.link": "Découvrez plus d'informations dans le {docsLink}.", - "xpack.apm.serviceGroups.tour.content.link.docs": "documents", - "xpack.apm.serviceGroups.tour.createGroups.content": "Regroupez les services afin de créer des vues d'inventaire organisées qui éliminent le bruit et simplifient les enquêtes sur les services. Les groupes sont spécifiques à l'espace Kibana et sont disponibles pour tous les utilisateurs ayant un accès approprié.", - "xpack.apm.serviceGroups.tour.createGroups.title": "Présentation des groupes de services", - "xpack.apm.serviceGroups.tour.dismiss": "Rejeter", - "xpack.apm.serviceGroups.tour.editGroups.content": "Utilisez l'option de modification pour changer le nom, la requête ou les détails de ce groupe de services.", - "xpack.apm.serviceGroups.tour.editGroups.title": "Modifier ce groupe de services", "xpack.apm.serviceHealthStatus.critical": "Critique", "xpack.apm.serviceHealthStatus.healthy": "Intègre", "xpack.apm.serviceHealthStatus.unknown": "Inconnu", diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index bba91c32ffc4c..6a3ba57b57fae 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -10042,13 +10042,6 @@ "xpack.apm.serviceGroups.selectServicesList.nameColumnLabel": "名前", "xpack.apm.serviceGroups.selectServicesList.notFoundLabel": "過去24時間以内にサービスはありません。グループを作成できます。クエリと一致するサービスが追加されます。", "xpack.apm.serviceGroups.sortLabel": "並べ替え", - "xpack.apm.serviceGroups.tour.content.link": "詳細は{docsLink}をご覧ください。", - "xpack.apm.serviceGroups.tour.content.link.docs": "ドキュメント", - "xpack.apm.serviceGroups.tour.createGroups.content": "サービスをグループ化し、ノイズを減らした編集済みのインベントリビューを作成し、サービス全体での調査を簡素化します。グループはKibanaスペース固有であり、適切なアクセス権のあるユーザーが使用できます。", - "xpack.apm.serviceGroups.tour.createGroups.title": "サービスグループの概要", - "xpack.apm.serviceGroups.tour.dismiss": "閉じる", - "xpack.apm.serviceGroups.tour.editGroups.content": "編集オプションを使用して、名前、クエリ、このサービスグループの詳細を変更します。", - "xpack.apm.serviceGroups.tour.editGroups.title": "このサービスグループを編集", "xpack.apm.serviceHealthStatus.critical": "重大", "xpack.apm.serviceHealthStatus.healthy": "正常", "xpack.apm.serviceHealthStatus.unknown": "不明", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index b2fb6ec9b4f02..4051e74ceb544 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -10095,13 +10095,6 @@ "xpack.apm.serviceGroups.selectServicesList.nameColumnLabel": "名称", "xpack.apm.serviceGroups.selectServicesList.notFoundLabel": "过去 24 小时内没有服务可用。您仍然可以创建该组,并且会添加与您的查询匹配的服务。", "xpack.apm.serviceGroups.sortLabel": "排序", - "xpack.apm.serviceGroups.tour.content.link": "在{docsLink}中了解详情。", - "xpack.apm.serviceGroups.tour.content.link.docs": "文档", - "xpack.apm.serviceGroups.tour.createGroups.content": "将服务组合在一起以构建策展库存视图,进而跨服务消除噪音并简化调查。组特定于 Kibana 工作区,并且可用于任何具有适当访问权限的用户。", - "xpack.apm.serviceGroups.tour.createGroups.title": "服务组简介", - "xpack.apm.serviceGroups.tour.dismiss": "关闭", - "xpack.apm.serviceGroups.tour.editGroups.content": "使用编辑选项更改此服务组的名称、查询或详情。", - "xpack.apm.serviceGroups.tour.editGroups.title": "编辑此服务组", "xpack.apm.serviceHealthStatus.critical": "紧急", "xpack.apm.serviceHealthStatus.healthy": "运行正常", "xpack.apm.serviceHealthStatus.unknown": "未知", diff --git a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts index 3656fb9ea3469..7e1110daac623 100644 --- a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts +++ b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.test.ts @@ -4,6 +4,7 @@ * 2.0; you may not use this file except in compliance with the Elastic License * 2.0. */ + import { buildAggregation } from './build_agg'; describe('buildAgg', () => { @@ -902,6 +903,75 @@ describe('buildAgg', () => { }, }); }); + + it('should limit size of topHitsAgg', () => { + let returnedMessage: string | undefined; + expect( + buildAggregation({ + timeSeries: { + timeField: 'time-field', + timeWindowSize: 5, + timeWindowUnit: 'm', + dateStart: '2021-04-22T15:19:31Z', + dateEnd: '2021-04-22T15:20:31Z', + interval: '1m', + }, + aggType: 'avg', + aggField: 'avg-field', + termField: 'the-field', + termSize: 20, + topHitsSize: 150, + loggerCb: (message: string) => (returnedMessage = message), + }) + ).toEqual({ + groupAgg: { + terms: { + field: 'the-field', + order: { + sortValueAgg: 'desc', + }, + size: 20, + }, + aggs: { + topHitsAgg: { + top_hits: { + size: 100, + }, + }, + dateAgg: { + date_range: { + field: 'time-field', + format: 'strict_date_time', + ranges: [ + { + from: '2021-04-22T15:14:31.000Z', + to: '2021-04-22T15:19:31.000Z', + }, + { + from: '2021-04-22T15:15:31.000Z', + to: '2021-04-22T15:20:31.000Z', + }, + ], + }, + aggs: { + metricAgg: { + avg: { + field: 'avg-field', + }, + }, + }, + }, + sortValueAgg: { + avg: { + field: 'avg-field', + }, + }, + }, + }, + }); + + expect(returnedMessage).toEqual(`Top hits size is capped at 100`); + }); }); it('should correctly apply the resultLimit if specified', async () => { diff --git a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts index 3c61368543b8c..0a5bc5cc97fe2 100644 --- a/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts +++ b/x-pack/plugins/triggers_actions_ui/common/data/lib/build_agg.ts @@ -26,6 +26,7 @@ export interface BuildAggregationOpts { resultLimit?: number; conditionScript: string; }; + loggerCb?: (message: string) => void; } export const BUCKET_SELECTOR_PATH_NAME = 'compareValue'; @@ -33,6 +34,8 @@ export const BUCKET_SELECTOR_FIELD = `params.${BUCKET_SELECTOR_PATH_NAME}`; export const DEFAULT_GROUPS = 100; export const MAX_SOURCE_FIELDS_TO_COPY = 10; +const MAX_TOP_HITS_SIZE = 100; + export const isCountAggregation = (aggType: string) => aggType === 'count'; export const isGroupAggregation = (termField?: string | string[]) => !!termField; @@ -45,6 +48,7 @@ export const buildAggregation = ({ sourceFieldsParams, condition, topHitsSize, + loggerCb, }: BuildAggregationOpts): Record => { const aggContainer: AggregationsAggregationContainer = { aggs: {}, @@ -165,6 +169,11 @@ export const buildAggregation = ({ } if (isGroupAgg && topHitsSize) { + if (topHitsSize > MAX_TOP_HITS_SIZE) { + topHitsSize = MAX_TOP_HITS_SIZE; + if (loggerCb) loggerCb(`Top hits size is capped at ${MAX_TOP_HITS_SIZE}`); + } + aggParent.aggs = { ...aggParent.aggs, topHitsAgg: { diff --git a/x-pack/test/alerting_api_integration/common/config.ts b/x-pack/test/alerting_api_integration/common/config.ts index 2b4f8e2cd8aff..80439bc1cb489 100644 --- a/x-pack/test/alerting_api_integration/common/config.ts +++ b/x-pack/test/alerting_api_integration/common/config.ts @@ -56,6 +56,7 @@ const enabledActionTypes = [ CROWDSTRIKE_CONNECTOR_ID, '.slack', '.slack_api', + '.thehive', '.tines', '.webhook', '.xmatters', diff --git a/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/thehive_simulation.ts b/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/thehive_simulation.ts new file mode 100644 index 0000000000000..fc6ff59cc2498 --- /dev/null +++ b/x-pack/test/alerting_api_integration/common/plugins/actions_simulators/server/thehive_simulation.ts @@ -0,0 +1,101 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import http from 'http'; + +import { ProxyArgs, Simulator } from './simulator'; + +export class TheHiveSimulator extends Simulator { + private readonly returnError: boolean; + + constructor({ returnError = false, proxy }: { returnError?: boolean; proxy?: ProxyArgs }) { + super(proxy); + + this.returnError = returnError; + } + + public async handler( + request: http.IncomingMessage, + response: http.ServerResponse, + data: Record + ) { + if (this.returnError) { + return TheHiveSimulator.sendErrorResponse(response); + } + + return TheHiveSimulator.sendResponse(response); + } + + private static sendResponse(response: http.ServerResponse) { + response.statusCode = 201; + response.setHeader('Content-Type', 'application/json'); + response.end(JSON.stringify(theHiveSuccessResponse, null, 4)); + } + + private static sendErrorResponse(response: http.ServerResponse) { + response.statusCode = 400; + response.setHeader('Content-Type', 'application/json'); + response.end(JSON.stringify(theHiveFailedResponse, null, 4)); + } +} + +export const theHiveSuccessResponse = { + _id: '~172064', + _type: 'Case', + _createdBy: 'user1@thehive.local', + _createdAt: 1712128153041, + number: 67, + title: 'title', + description: 'description', + severity: 1, + severityLabel: 'LOW', + startDate: 1712128153029, + tags: ['tag1', 'tag2'], + flag: false, + tlp: 2, + tlpLabel: 'AMBER', + pap: 2, + papLabel: 'AMBER', + status: 'New', + stage: 'New', + assignee: 'user1@thehive.local', + customFields: [], + userPermissions: [ + 'manageCase/create', + 'manageAlert/update', + 'manageProcedure', + 'managePage', + 'manageObservable', + 'manageCase/delete', + 'manageAlert/create', + 'manageCaseReport', + 'manageAlert/delete', + 'accessTheHiveFS', + 'manageKnowledgeBase', + 'manageAction', + 'manageShare', + 'manageAnalyse', + 'manageFunction/invoke', + 'manageTask', + 'manageCase/merge', + 'manageCustomEvent', + 'manageAlert/import', + 'manageCase/changeOwnership', + 'manageComment', + 'manageAlert/reopen', + 'manageCase/update', + 'manageCase/reopen', + ], + extraData: {}, + newDate: 1712128153029, + timeToDetect: 0, +}; + +export const theHiveFailedResponse = { + type: 'BadRequest', + message: 'Invalid json', +}; diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/thehive.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/thehive.ts new file mode 100644 index 0000000000000..e1bf048606bc1 --- /dev/null +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/connector_types/thehive.ts @@ -0,0 +1,330 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; + +import { TheHiveSimulator } from '@kbn/actions-simulators-plugin/server/thehive_simulation'; +import { TaskErrorSource } from '@kbn/task-manager-plugin/common'; +import { FtrProviderContext } from '../../../../../common/ftr_provider_context'; + +const connectorTypeId = '.thehive'; +const name = 'TheHive action'; +const secrets = { + apiKey: 'token12345', +}; + +// eslint-disable-next-line import/no-default-export +export default function theHiveTest({ getService }: FtrProviderContext) { + const supertest = getService('supertest'); + const configService = getService('config'); + + const createConnector = async (url: string) => { + const { body } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config: { url, organisation: null }, + secrets, + }) + .expect(200); + + return body.id; + }; + + describe('TheHive', () => { + describe('action creation', () => { + const simulator = new TheHiveSimulator({ + returnError: false, + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + const config = { url: '', organisation: null }; + + before(async () => { + config.url = await simulator.start(); + }); + + after(() => { + simulator.close(); + }); + + it('should return 200 when creating the connector without organisation', async () => { + const { body: createdAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config, + secrets, + }) + .expect(200); + + expect(createdAction).to.eql({ + id: createdAction.id, + is_preconfigured: false, + is_system_action: false, + is_deprecated: false, + name, + connector_type_id: connectorTypeId, + is_missing_secrets: false, + config, + }); + }); + + it('should return 200 when creating the connector with the organisation', async () => { + const { body: createdAction } = await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config: { ...config, organisation: 'test-organisation' }, + secrets, + }) + .expect(200); + + expect(createdAction).to.eql({ + id: createdAction.id, + is_preconfigured: false, + is_system_action: false, + is_deprecated: false, + name, + connector_type_id: connectorTypeId, + is_missing_secrets: false, + config: { ...config, organisation: 'test-organisation' }, + }); + }); + + it('should return 400 Bad Request when creating the connector without the url', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config: {}, + secrets, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type config: [url]: expected value of type [string] but got [undefined]', + }); + }); + }); + + it('should return 400 Bad Request when creating the connector with a url that is not allowed', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config: { + url: 'http://thehive.mynonexistent.com', + }, + secrets, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type config: error validating url: target url "http://thehive.mynonexistent.com" is not added to the Kibana config xpack.actions.allowedHosts', + }); + }); + }); + + it('should return 400 Bad Request when creating the connector without secrets', async () => { + await supertest + .post('/api/actions/connector') + .set('kbn-xsrf', 'foo') + .send({ + name, + connector_type_id: connectorTypeId, + config, + }) + .expect(400) + .then((resp: any) => { + expect(resp.body).to.eql({ + statusCode: 400, + error: 'Bad Request', + message: + 'error validating action type secrets: [apiKey]: expected value of type [string] but got [undefined]', + }); + }); + }); + }); + + describe('executor', () => { + describe('validation', () => { + const simulator = new TheHiveSimulator({ + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + let theHiveActionId: string; + + before(async () => { + const url = await simulator.start(); + theHiveActionId = await createConnector(url); + }); + + after(() => { + simulator.close(); + }); + + it('should fail when the params is empty', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${theHiveActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: {}, + }); + expect(200); + + expect(body).to.eql({ + status: 'error', + connector_id: theHiveActionId, + message: + 'error validating action params: [subAction]: expected value of type [string] but got [undefined]', + retry: false, + errorSource: TaskErrorSource.FRAMEWORK, + }); + }); + + it('should fail when the subAction is invalid', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${theHiveActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { subAction: 'invalidAction' }, + }) + .expect(200); + + expect(body).to.eql({ + connector_id: theHiveActionId, + status: 'error', + retry: true, + message: 'an error occurred while running the action', + errorSource: TaskErrorSource.FRAMEWORK, + service_message: `Sub action "invalidAction" is not registered. Connector id: ${theHiveActionId}. Connector name: TheHive. Connector type: .thehive`, + }); + }); + }); + + describe('execution', () => { + describe('successful response simulator', () => { + const simulator = new TheHiveSimulator({ + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + let url: string; + let theHiveActionId: string; + + before(async () => { + url = await simulator.start(); + theHiveActionId = await createConnector(url); + }); + + after(() => { + simulator.close(); + }); + + it('should send a formatted JSON object', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${theHiveActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: { + subAction: 'pushToService', + subActionParams: { + incident: { + title: 'title', + description: 'description', + tlp: 2, + severity: 1, + tags: ['tag1', 'tag2'], + }, + comments: [], + }, + }, + }) + .expect(200); + + expect(simulator.requestData).to.eql({ + title: 'title', + description: 'description', + tlp: 2, + severity: 1, + tags: ['tag1', 'tag2'], + }); + + expect(body).to.eql({ + status: 'ok', + connector_id: theHiveActionId, + data: { + id: '~172064', + title: 'title', + url: `${url}/cases/~172064/details`, + pushedDate: new Date(1712128153041).toISOString(), + }, + }); + }); + }); + + describe('error response simulator', () => { + const simulator = new TheHiveSimulator({ + returnError: true, + proxy: { + config: configService.get('kbnTestServer.serverArgs'), + }, + }); + + let theHiveActionId: string; + + before(async () => { + const url = await simulator.start(); + theHiveActionId = await createConnector(url); + }); + + after(() => { + simulator.close(); + }); + + it('should return a failure when error happens', async () => { + const { body } = await supertest + .post(`/api/actions/connector/${theHiveActionId}/_execute`) + .set('kbn-xsrf', 'foo') + .send({ + params: {}, + }) + .expect(200); + + expect(body).to.eql({ + status: 'error', + connector_id: theHiveActionId, + message: + 'error validating action params: [subAction]: expected value of type [string] but got [undefined]', + retry: false, + errorSource: TaskErrorSource.FRAMEWORK, + }); + }); + }); + }); + }); + }); +} diff --git a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts index ab79a189839e2..2f773c7bbf43b 100644 --- a/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts +++ b/x-pack/test/alerting_api_integration/security_and_spaces/group2/tests/actions/index.ts @@ -43,6 +43,7 @@ export default function connectorsTests({ loadTestFile, getService }: FtrProvide loadTestFile(require.resolve('./connector_types/torq')); loadTestFile(require.resolve('./connector_types/openai')); loadTestFile(require.resolve('./connector_types/d3security')); + loadTestFile(require.resolve('./connector_types/thehive')); loadTestFile(require.resolve('./connector_types/bedrock')); loadTestFile(require.resolve('./create')); loadTestFile(require.resolve('./delete')); diff --git a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts index ac491f0e99aad..4b7dd28d63b5c 100644 --- a/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts +++ b/x-pack/test/alerting_api_integration/spaces_only/tests/actions/check_registered_connector_types.ts @@ -46,6 +46,7 @@ export default function createRegisteredConnectorTypeTests({ getService }: FtrPr '.observability-ai-assistant', '.resilient', '.teams', + '.thehive', '.tines', '.torq', '.opsgenie', diff --git a/x-pack/test/api_integration/apis/aiops/index.ts b/x-pack/test/api_integration/apis/aiops/index.ts index 143d532d73e8e..0a8c5dd297fe2 100644 --- a/x-pack/test/api_integration/apis/aiops/index.ts +++ b/x-pack/test/api_integration/apis/aiops/index.ts @@ -14,5 +14,6 @@ export default function ({ loadTestFile }: FtrProviderContext) { loadTestFile(require.resolve('./log_rate_analysis_full_analysis')); loadTestFile(require.resolve('./log_rate_analysis_groups_only')); loadTestFile(require.resolve('./log_rate_analysis_no_index')); + loadTestFile(require.resolve('./log_rate_analysis_field_candidates')); }); } diff --git a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_field_candidates.ts b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_field_candidates.ts new file mode 100644 index 0000000000000..4b43cfc48c93c --- /dev/null +++ b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_field_candidates.ts @@ -0,0 +1,68 @@ +/* + * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one + * or more contributor license agreements. Licensed under the Elastic License + * 2.0; you may not use this file except in compliance with the Elastic License + * 2.0. + */ + +import expect from '@kbn/expect'; +import type { AiopsLogRateAnalysisSchema } from '@kbn/aiops-log-rate-analysis/api/schema'; +import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common'; + +import type { FetchFieldCandidatesResponse } from '@kbn/aiops-log-rate-analysis/queries/fetch_field_candidates'; + +import type { FtrProviderContext } from '../../ftr_provider_context'; + +import { getLogRateAnalysisTestData } from './test_data'; + +export default ({ getService }: FtrProviderContext) => { + const aiops = getService('aiops'); + const supertest = getService('supertest'); + const esArchiver = getService('esArchiver'); + + describe('POST /internal/aiops/log_rate_analysis/field_candidates', () => { + getLogRateAnalysisTestData<'3'>().forEach((testData) => { + describe(`with ${testData.testName}`, () => { + before(async () => { + if (testData.esArchive) { + await esArchiver.loadIfNeeded(testData.esArchive); + } else if (testData.dataGenerator) { + await aiops.logRateAnalysisDataGenerator.generateData(testData.dataGenerator); + } + }); + + after(async () => { + if (testData.esArchive) { + await esArchiver.unload(testData.esArchive); + } else if (testData.dataGenerator) { + await aiops.logRateAnalysisDataGenerator.removeGeneratedData(testData.dataGenerator); + } + }); + + async function assertFieldCandidates(data: FetchFieldCandidatesResponse) { + expect(data).to.eql( + testData.expected.fieldCandidates, + `Expected fieldCandidates to be ${JSON.stringify( + testData.expected.fieldCandidates + )}, got ${JSON.stringify(data)}` + ); + } + + async function requestFieldCandidates(body: AiopsLogRateAnalysisSchema<'3'>) { + const resp = await supertest + .post(`/internal/aiops/log_rate_analysis/field_candidates`) + .set('kbn-xsrf', 'kibana') + .set(ELASTIC_HTTP_VERSION_HEADER, '1') + .send(body) + .expect(200); + + await assertFieldCandidates(resp.body); + } + + it('should return field candidates', async () => { + await requestFieldCandidates(testData.requestBody); + }); + }); + }); + }); +}; diff --git a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts index d3a7aaed19a40..26bbd5c545846 100644 --- a/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts +++ b/x-pack/test/api_integration/apis/aiops/log_rate_analysis_groups_only.ts @@ -11,7 +11,7 @@ import { format as formatUrl } from 'url'; import expect from '@kbn/expect'; import type { AiopsLogRateAnalysisSchema } from '@kbn/aiops-log-rate-analysis/api/schema'; -import type { AiopsLogRateAnalysisSchemaSignificantItem } from '@kbn/aiops-log-rate-analysis/api/schema_v2'; +import type { AiopsLogRateAnalysisSchemaSignificantItem } from '@kbn/aiops-log-rate-analysis/api/schema_v3'; import { ELASTIC_HTTP_VERSION_HEADER } from '@kbn/core-http-common'; import type { FtrProviderContext } from '../../ftr_provider_context'; @@ -37,13 +37,24 @@ export default ({ getService }: FtrProviderContext) => { getLogRateAnalysisTestData().forEach((testData) => { let overrides: AiopsLogRateAnalysisSchema['overrides'] = {}; - overrides = { - loaded: 0, - remainingFieldCandidates: [], - significantItems: testData.expected - .significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], - regroupOnly: true, - } as AiopsLogRateAnalysisSchema['overrides']; + if (apiVersion === '2') { + overrides = { + loaded: 0, + remainingFieldCandidates: [], + significantItems: testData.expected + .significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], + regroupOnly: true, + } as AiopsLogRateAnalysisSchema['overrides']; + } else if (apiVersion === '3') { + overrides = { + loaded: 0, + remainingKeywordFieldCandidates: [], + remainingTextFieldCandidates: [], + significantItems: testData.expected + .significantItems as AiopsLogRateAnalysisSchemaSignificantItem[], + regroupOnly: true, + } as AiopsLogRateAnalysisSchema['overrides']; + } describe(`with v${apiVersion} - ${testData.testName}`, () => { before(async () => { diff --git a/x-pack/test/api_integration/apis/aiops/test_data.ts b/x-pack/test/api_integration/apis/aiops/test_data.ts index 72d791248e9b2..c26aad813992a 100644 --- a/x-pack/test/api_integration/apis/aiops/test_data.ts +++ b/x-pack/test/api_integration/apis/aiops/test_data.ts @@ -25,7 +25,49 @@ import { import type { TestData } from './types'; -export const API_VERSIONS: ApiVersion[] = ['2']; +export const API_VERSIONS: ApiVersion[] = ['2', '3']; +export const API_VERSIONS_FIELD_CANDIDATES: ApiVersion[] = ['3']; + +const expectedEcommerceFieldCandidates = [ + 'category.keyword', + 'currency', + 'customer_first_name.keyword', + 'customer_full_name.keyword', + 'customer_gender', + 'customer_id', + 'customer_last_name.keyword', + 'customer_phone', + 'day_of_week', + 'email', + 'geoip.city_name', + 'geoip.continent_name', + 'geoip.country_iso_code', + 'geoip.region_name', + 'manufacturer.keyword', + 'order_id', + 'products._id.keyword', + 'products.category.keyword', + 'products.manufacturer.keyword', + 'products.product_name.keyword', + 'products.sku', + 'sku', + 'type', + 'user', +]; + +const expectedArtificialLogsFieldCandidates = { + isECS: false, + keywordFieldCandidates: ['response_code', 'url', 'user', 'version'], + selectedKeywordFieldCandidates: ['response_code', 'url', 'user', 'version'], + selectedTextFieldCandidates: [], + textFieldCandidates: [], +}; + +const expectedArtificialLogsFieldCandidatesWithTextfield = { + ...expectedArtificialLogsFieldCandidates, + selectedTextFieldCandidates: ['message'], + textFieldCandidates: ['message'], +}; export const getLogRateAnalysisTestData = (): Array> => [ { @@ -76,6 +118,13 @@ export const getLogRateAnalysisTestData = (): Array(): Array(): Array(): Array(): Array(): Array(): Array(): Array { significantItems: SignificantItem[]; groups: SignificantItemGroup[]; histogramLength: number; + fieldCandidates: FetchFieldCandidatesResponse; }; } diff --git a/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts b/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts index 7126f4ea07517..9dab57c649f84 100644 --- a/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts +++ b/x-pack/test/api_integration/apis/management/index_management/inference_endpoints.ts @@ -21,6 +21,7 @@ export default function ({ getService }: FtrProviderContext) { const modelId = '.elser_model_2'; // FLAKY: https://github.com/elastic/kibana/issues/189333 + // Failing: See https://github.com/elastic/kibana/issues/189333 describe.skip('Inference endpoints', function () { after(async () => { try { diff --git a/x-pack/test/api_integration/apis/metrics_ui/infra.ts b/x-pack/test/api_integration/apis/metrics_ui/infra.ts index c3465c68ae7fe..f70cd61dc7635 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/infra.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/infra.ts @@ -54,7 +54,6 @@ export default function ({ getService }: FtrProviderContext) { to: new Date(DATES['8.0.0'].logs_and_metrics.max).toISOString(), }, query: { bool: { must_not: [], filter: [], should: [], must: [] } }, - sourceId: 'default', }; const makeRequest = async ({ diff --git a/x-pack/test/api_integration/apis/metrics_ui/sources.ts b/x-pack/test/api_integration/apis/metrics_ui/sources.ts index c58b332c7102f..d9a119fa10db1 100644 --- a/x-pack/test/api_integration/apis/metrics_ui/sources.ts +++ b/x-pack/test/api_integration/apis/metrics_ui/sources.ts @@ -17,18 +17,9 @@ import { FtrProviderContext } from '../../ftr_provider_context'; export default function ({ getService }: FtrProviderContext) { const esArchiver = getService('esArchiver'); const supertest = getService('supertest'); - const SOURCE_API_URL = '/api/metrics/source/default'; + const SOURCE_API_URL = '/api/metrics/source'; + const SOURCE_ID = 'default'; const kibanaServer = getService('kibanaServer'); - const patchRequest = async ( - body: PartialMetricsSourceConfigurationProperties - ): Promise => { - const response = await supertest - .patch(SOURCE_API_URL) - .set('kbn-xsrf', 'xxx') - .send(body) - .expect(200); - return response.body; - }; describe('sources', () => { before(() => esArchiver.load('x-pack/test/functional/es_archives/infra/metrics_and_logs')); @@ -36,6 +27,17 @@ export default function ({ getService }: FtrProviderContext) { before(() => kibanaServer.savedObjects.cleanStandardList()); after(() => kibanaServer.savedObjects.cleanStandardList()); + const patchRequest = async ( + body: PartialMetricsSourceConfigurationProperties + ): Promise => { + const response = await supertest + .patch(`${SOURCE_API_URL}/${SOURCE_ID}`) + .set('kbn-xsrf', 'xxx') + .send(body) + .expect(200); + return response.body; + }; + describe('patch request', () => { it('applies all top-level field updates to an existing source', async () => { const creationResponse = await patchRequest({ @@ -103,28 +105,65 @@ export default function ({ getService }: FtrProviderContext) { it('validates anomalyThreshold is between range 1-100', async () => { // create config with bad request await supertest - .patch(SOURCE_API_URL) + .patch(`${SOURCE_API_URL}/${SOURCE_ID}`) .set('kbn-xsrf', 'xxx') .send({ name: 'NAME', anomalyThreshold: -20 }) .expect(400); // create config with good request await supertest - .patch(SOURCE_API_URL) + .patch(`${SOURCE_API_URL}/${SOURCE_ID}`) .set('kbn-xsrf', 'xxx') .send({ name: 'NAME', anomalyThreshold: 20 }) .expect(200); await supertest - .patch(SOURCE_API_URL) + .patch(`${SOURCE_API_URL}/${SOURCE_ID}`) .set('kbn-xsrf', 'xxx') .send({ anomalyThreshold: -2 }) .expect(400); await supertest - .patch(SOURCE_API_URL) + .patch(`${SOURCE_API_URL}/${SOURCE_ID}`) .set('kbn-xsrf', 'xxx') .send({ anomalyThreshold: 101 }) .expect(400); }); }); + + describe('has data', () => { + const makeRequest = async (params?: { + modules?: string[]; + expectedHttpStatusCode?: number; + }) => { + const { modules, expectedHttpStatusCode = 200 } = params ?? {}; + return supertest + .get(`${SOURCE_API_URL}/hasData`) + .query(modules ? { modules } : '') + .set('kbn-xsrf', 'xxx') + .expect(expectedHttpStatusCode); + }; + + before(() => patchRequest({ name: 'default', metricAlias: 'metrics-*,metricbeat-*' })); + + it('should return "hasData" true when modules is "system"', async () => { + const response = await makeRequest({ modules: ['system'] }); + expect(response.body.hasData).to.be(true); + }); + it('should return "hasData" false when modules is "nginx"', async () => { + const response = await makeRequest({ modules: ['nginx'] }); + expect(response.body.hasData).to.be(true); + }); + + it('should return "hasData" true when modules is not passed', async () => { + const response = await makeRequest(); + expect(response.body.hasData).to.be(true); + }); + + it('should fail when "modules" size is greater than 5', async () => { + await makeRequest({ + modules: ['system', 'nginx', 'kubernetes', 'aws', 'kafka', 'azure'], + expectedHttpStatusCode: 400, + }); + }); + }); }); } diff --git a/x-pack/test/api_integration_basic/apis/aiops/permissions.ts b/x-pack/test/api_integration_basic/apis/aiops/permissions.ts index 239696215c759..ce87ad05ef8d5 100644 --- a/x-pack/test/api_integration_basic/apis/aiops/permissions.ts +++ b/x-pack/test/api_integration_basic/apis/aiops/permissions.ts @@ -17,7 +17,7 @@ import type { import type { FtrProviderContext } from '../../ftr_provider_context'; -const API_VERSIONS: ApiVersion[] = ['2']; +const API_VERSIONS: ApiVersion[] = ['3']; export default ({ getService }: FtrProviderContext) => { const supertest = getService('supertest'); diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/artificial_log_data_view_test_data.ts b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/artificial_log_data_view_test_data.ts index e92f6aa7121a3..cc178aeeb9aef 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/artificial_log_data_view_test_data.ts +++ b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/artificial_log_data_view_test_data.ts @@ -71,10 +71,7 @@ export const getArtificialLogDataViewTestData = ({ } function getFieldSelectorPopover() { - if (zeroDocsFallback) { - return [...(textField ? ['message'] : []), 'response_code', 'url', 'user', 'version']; - } - return [...(textField ? ['message'] : []), 'response_code', 'url', 'user']; + return [...(textField ? ['message'] : []), 'response_code', 'url', 'user', 'version']; } function getSuiteTitle() { diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts index 9a0295f2b55bb..31cfcda6924f8 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts +++ b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/farequote_data_view_test_data_with_query.ts @@ -10,7 +10,7 @@ import { LOG_RATE_ANALYSIS_TYPE } from '@kbn/aiops-log-rate-analysis'; import type { TestData } from '../../types'; export const farequoteDataViewTestDataWithQuery: TestData = { - suiteTitle: 'farequote with spike', + suiteTitle: 'farequote with spike with query', analysisType: LOG_RATE_ANALYSIS_TYPE.SPIKE, autoRun: false, dataGenerator: 'farequote_with_spike', @@ -21,7 +21,7 @@ export const farequoteDataViewTestDataWithQuery: TestData = { chartClickCoordinates: [0, 0], columnSelectorSearch: 'p-value', fieldSelectorSearch: 'airline', - fieldSelectorApplyAvailable: false, + fieldSelectorApplyAvailable: true, query: 'NOT airline:("SWR" OR "ACA" OR "AWE" OR "BAW" OR "JAL" OR "JBU" OR "JZA" OR "KLM")', expected: { totalDocCountFormatted: '48,799', @@ -54,7 +54,7 @@ export const farequoteDataViewTestDataWithQuery: TestData = { 'Log rate change', 'Actions', ], - fieldSelectorPopover: ['airline', 'custom_field.keyword'], + fieldSelectorPopover: ['@version.keyword', 'airline', 'custom_field.keyword', 'type.keyword'], globalState: { refreshInterval: { pause: true, value: 60000 }, time: { from: '2016-02-07T00:00:00.000Z', to: '2016-02-11T23:59:54.000Z' }, diff --git a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/kibana_logs_data_view_test_data.ts b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/kibana_logs_data_view_test_data.ts index 9759cc149bf9f..6d52d90876c6a 100644 --- a/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/kibana_logs_data_view_test_data.ts +++ b/x-pack/test/functional/apps/aiops/log_rate_analysis/test_data/kibana_logs_data_view_test_data.ts @@ -83,15 +83,21 @@ export const kibanaLogsDataViewTestData: TestData = { fieldSelectorPopover: [ 'agent.keyword', 'clientip', + 'event.dataset', 'extension.keyword', 'geo.dest', + 'geo.src', 'geo.srcdest', 'host.keyword', + 'index.keyword', 'ip', 'machine.os.keyword', + 'message', 'referer', + 'request', 'response.keyword', 'tags.keyword', + 'url', ], prompt: 'change-point', }, diff --git a/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts b/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts index b986d29c7fee7..3b8b33f853f6a 100644 --- a/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts +++ b/x-pack/test/functional/apps/ml/permissions/full_ml_access.ts @@ -176,7 +176,9 @@ export default function ({ getService }: FtrProviderContext) { }); for (const testUser of testUsers) { - describe(`(${testUser.user})`, function () { + // FLAKY: https://github.com/elastic/kibana/issues/189565 + // FLAKY: https://github.com/elastic/kibana/issues/189537 + describe.skip(`(${testUser.user})`, function () { before(async () => { await ml.securityUI.loginAs(testUser.user); }); diff --git a/x-pack/test/functional/apps/visualize/reporting.ts b/x-pack/test/functional/apps/visualize/reporting.ts index bee29b551f6bf..cb29379fbbffb 100644 --- a/x-pack/test/functional/apps/visualize/reporting.ts +++ b/x-pack/test/functional/apps/visualize/reporting.ts @@ -123,7 +123,8 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await PageObjects.share.closeShareModal(); }); - it('TSVB Gauge: PNG file matches the baseline image', async function () { + // FAILING ARTIFACTS SNAPSHOT: https://github.com/elastic/kibana/issues/189590 + it.skip('TSVB Gauge: PNG file matches the baseline image', async function () { log.debug('load saved visualization'); await PageObjects.visualize.loadSavedVisualization( '[K7.6-eCommerce] Sold Products per Day', diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts index 011da0ff699bd..576f08d890e5b 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/check_registered_task_types.ts @@ -75,6 +75,7 @@ export default function ({ getService }: FtrProviderContext) { 'actions:.slack_api', 'actions:.swimlane', 'actions:.teams', + 'actions:.thehive', 'actions:.tines', 'actions:.torq', 'actions:.webhook', diff --git a/x-pack/test/plugin_api_integration/test_suites/task_manager/health_route.ts b/x-pack/test/plugin_api_integration/test_suites/task_manager/health_route.ts index 44d2257f8a957..066a004df3814 100644 --- a/x-pack/test/plugin_api_integration/test_suites/task_manager/health_route.ts +++ b/x-pack/test/plugin_api_integration/test_suites/task_manager/health_route.ts @@ -140,12 +140,7 @@ export default function ({ getService }: FtrProviderContext) { }, }, request_capacity: 1000, - capacity: { - config: 10, - as_workers: 10, - as_cost: 20, - }, - claim_strategy: 'default', + max_workers: 10, }); }); diff --git a/x-pack/test/task_manager_claimer_mget/test_suites/task_manager/health_route.ts b/x-pack/test/task_manager_claimer_mget/test_suites/task_manager/health_route.ts index aa4f68e1fedd8..066a004df3814 100644 --- a/x-pack/test/task_manager_claimer_mget/test_suites/task_manager/health_route.ts +++ b/x-pack/test/task_manager_claimer_mget/test_suites/task_manager/health_route.ts @@ -140,12 +140,7 @@ export default function ({ getService }: FtrProviderContext) { }, }, request_capacity: 1000, - capacity: { - config: 10, - as_workers: 10, - as_cost: 20, - }, - claim_strategy: 'unsafe_mget', + max_workers: 10, }); }); diff --git a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts index c288e1522694b..1c1a63223cb72 100644 --- a/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts +++ b/x-pack/test_serverless/api_integration/test_suites/common/index_management/inference_endpoints.ts @@ -26,7 +26,8 @@ export default function ({ getService }: FtrProviderContext) { let roleAuthc: RoleCredentials; let internalReqHeader: InternalRequestHeader; - describe('Inference endpoints', function () { + // FLAKY: https://github.com/elastic/kibana/issues/189464 + describe.skip('Inference endpoints', function () { before(async () => { roleAuthc = await svlUserManager.createM2mApiKeyWithRoleScope('admin'); internalReqHeader = svlCommonApi.getInternalRequestHeader(); diff --git a/x-pack/test_serverless/api_integration/test_suites/observability/infra/infra.ts b/x-pack/test_serverless/api_integration/test_suites/observability/infra/infra.ts index edceb0b13a174..f196598aa37fd 100644 --- a/x-pack/test_serverless/api_integration/test_suites/observability/infra/infra.ts +++ b/x-pack/test_serverless/api_integration/test_suites/observability/infra/infra.ts @@ -89,7 +89,6 @@ export default function ({ getService }: FtrProviderContext) { from: timeRange.from, to: timeRange.to, }, - sourceId: 'default', }, roleAuthc ); diff --git a/yarn.lock b/yarn.lock index 812ba6964e561..2a6fc9cb5f857 100644 --- a/yarn.lock +++ b/yarn.lock @@ -22134,16 +22134,16 @@ listr2@^3.8.3: through "^2.3.8" wrap-ansi "^7.0.0" -listr2@^8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.1.tgz#06a1a6efe85f23c5324180d7c1ddbd96b5eefd6d" - integrity sha512-irTfvpib/rNiD637xeevjO2l3Z5loZmuaRi0L0YE5LfijwVY96oyVn0DFD3o/teAok7nfobMG1THvvcHh/BP6g== +listr2@^8.2.3: + version "8.2.3" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-8.2.3.tgz#c494bb89b34329cf900e4e0ae8aeef9081d7d7a5" + integrity sha512-Lllokma2mtoniUOS94CcOErHWAug5iu7HOmDrvWgpw8jyQH2fomgB+7lZS4HWZxytUuQwkGOwe49FvwVaA85Xw== dependencies: cli-truncate "^4.0.0" colorette "^2.0.20" eventemitter3 "^5.0.1" log-update "^6.0.0" - rfdc "^1.3.1" + rfdc "^1.4.1" wrap-ansi "^9.0.0" lmdb@^2.9.2: @@ -27791,10 +27791,10 @@ rfc4648@^1.5.2: resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.2.tgz#cf5dac417dd83e7f4debf52e3797a723c1373383" integrity sha512-tLOizhR6YGovrEBLatX1sdcuhoSCXddw3mqNVAcKxGJ+J0hFeJ+SjeWCv5UPA/WU3YzWPPuCVYgXBKZUPGpKtg== -rfdc@^1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.1.tgz#2b6d4df52dffe8bb346992a10ea9451f24373a8f" - integrity sha512-r5a3l5HzYlIC68TpmYKlxWjmOP6wiPJ1vWv2HeLhNsRZMrCkxeqxiHlQ21oXmQ4F3SiryXBHhAD7JZqvOJjFmg== +rfdc@^1.4.1: + version "1.4.1" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.4.1.tgz#778f76c4fb731d93414e8f925fbecf64cce7f6ca" + integrity sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA== rgbcolor@^1.0.1: version "1.0.1"